[SDL] SDL-ttf (PATCH)

Nick Whitelegg bssnrw at bath.ac.uk
Tue Sep 3 13:30:01 PDT 2002


> 
> SCNR, but what if someone's code calls it too much and the variable overflows?
> I know, I know 2^31 is quite a lot, but all it takes is one messed-up condition
> in while().
> 
>  From code consistency POV it would be much better if TTF_Init() on initialized library
> as well as TTF_Quit on uninitialized crashed the program on the spot.
> 
> This would help design one's program more sanely too.
> 

Thanks for the feedback on this. I have to admit, global variables and
the ins and outs of them were never my strong point, I never knew that 
by making a global variable "static" it became private!

As far as I'm concerned, the TTF_WasInit() would be very useful indeed,
it would be a bit awkward to have to include a specially-patched version
of the SDL_ttf class with my library. 

Thanks,
Nick





More information about the SDL mailing list