Userdata

I see “void *userdata” in a lot of places in SDL 1.3. When I see something like that, I immediately think “arbitrary-data tag that’s there for the user’s benefit and not used internally anywhere in SDL.” The Delphi VCL uses a similar system for a lot of its controls. Is that a correct interpretation? Can I write code that assumes that SDL doesn’t care about the contents of anything called userdata and whatever I assign to it won’t change any SDL behavior in any way?

Yes.On Mon, Mar 23, 2009 at 1:53 PM, Mason Wheeler wrote:

I see “void *userdata” in a lot of places in SDL 1.3. When I see
something like that, I immediately think "arbitrary-data tag that’s
there for the user’s benefit and not used internally anywhere in SDL."
The Delphi VCL uses a similar system for a lot of its controls. Is
that a correct interpretation? Can I write code that assumes that SDL
doesn’t care about the contents of anything called userdata and
whatever I assign to it won’t change any SDL behavior in any way?


http://codebad.com/