Removed the inline functions from SDL_stdinc.h

Having the SDL functions inline is causing build issues, and in the case of malloc(), etc. causing malloc/free mismatches, if the application build environment differs from the SDL build environment.

In the interest of safety and consistency, the functions will always be in the SDL library and will only be redirected to the C library there, if they are available.

See the following threads on the SDL mailing list for the gruesome details:
* SDL_stdinc.h inlines problematic when application not compiled in exact same feature environment
* Error compiling program against SDL2 with -std=c++11 g++ flag
This commit is contained in:
Sam Lantinga 2013-07-05 23:57:19 -07:00
parent 3a78485f2d
commit cfd541e89c
9 changed files with 469 additions and 788 deletions

View file

@ -98,13 +98,7 @@
#endif
#define PIXEL_COPY(to, from, len, bpp) \
do { \
if(bpp == 4) { \
SDL_memcpy4(to, from, (size_t)(len)); \
} else { \
SDL_memcpy(to, from, (size_t)(len) * (bpp)); \
} \
} while(0)
SDL_memcpy(to, from, (size_t)(len) * (bpp))
/*
* Various colorkey blit methods, for opaque and per-surface alpha