Răsfoiți Sursa

add version check to SDL_MALLOC macro (for correctness)

Ozkan Sezer 2 ani în urmă
părinte
comite
e7ea47a1b4
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      include/SDL3/SDL_begin_code.h

+ 3 - 3
include/SDL3/SDL_begin_code.h

@@ -170,12 +170,12 @@
 #endif /* SDL_FALLTHROUGH not defined */
 
 #ifndef SDL_MALLOC
-#if defined(__GNUC__)
+#if defined(__GNUC__) && (__GNUC__ >= 3)
 #define SDL_MALLOC __attribute__((malloc))
-/* FIXME
+/** FIXME
 #elif defined(_MSC_VER)
 #define SDL_MALLOC __declspec(allocator) __desclspec(restrict)
-*/
+**/
 #else
 #define SDL_MALLOC
 #endif