[SDL] Const correctness for SDL video
Ryan C. Gordon
icculus at icculus.org
Wed Feb 14 15:15:12 PST 2007
> Won't that break binary compatibility in SDL 1.2?
Not in these cases. You can flag data passed to functions as const and
not break binary compatibility...C function signatures don't change, and
all you've done is guarantee that you won't change the data passed in to
the function, and previously-compiled code would have assumed you might
do so and have coded appropriately.
C++ is a different story: adding a "const" changes the function
signature and then your program won't be able to find the function
without a recompile. SDL's public API is all C, though...there's a
little C++ in the BeOS port, but none of that is publicly exposed.
--ryan.
More information about the SDL
mailing list