Mercurial > sdl-ios-xcode
comparison include/SDL_stdinc.h @ 3567:fb9ea4b549c3
Added a warning comment to SDL_putenv().
"Fixes" Bugzilla #779.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 15 Dec 2009 18:00:16 +0000 |
parents | d3baf5ac4e37 |
children | 15eea7a1fa97 |
comparison
equal
deleted
inserted
replaced
3566:07c8339c95c6 | 3567:fb9ea4b549c3 |
---|---|
265 #define SDL_getenv getenv | 265 #define SDL_getenv getenv |
266 #else | 266 #else |
267 extern DECLSPEC char *SDLCALL SDL_getenv(const char *name); | 267 extern DECLSPEC char *SDLCALL SDL_getenv(const char *name); |
268 #endif | 268 #endif |
269 | 269 |
270 /** | |
271 * \warning On some platforms, the string you pass to SDL_putenv() becomes | |
272 * part of the environment table directly...it will use this specific | |
273 * buffer, and not a copy of it! This means you can't free it, and | |
274 * other pieces of code may try to write to it. In practice, this | |
275 * isn't a big deal, but be aware of the possibility. | |
276 * However, due to this issue, you should be prepared to | |
277 * pass a (char*), or be willing to cast away the constness of your | |
278 * string for this call. | |
279 */ | |
270 #ifdef HAVE_PUTENV | 280 #ifdef HAVE_PUTENV |
271 #define SDL_putenv putenv | 281 #define SDL_putenv putenv |
272 #else | 282 #else |
273 extern DECLSPEC int SDLCALL SDL_putenv(const char *variable); | 283 extern DECLSPEC int SDLCALL SDL_putenv(const char *variable); |
274 #endif | 284 #endif |