comparison include/SDL_version.h @ 1046:f09d5edfc7a3

Added some parentheses for a little more macro safety. Recommended by Petri Kero, here: http://www.devolution.com/pipermail/sdl/2005-March/067630.html
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 17 Apr 2005 10:16:30 +0000
parents cca9aeb2934f
children 09c1408645df
comparison
equal deleted inserted replaced
1045:63b8e93a3a52 1046:f09d5edfc7a3
63 /* This macro turns the version numbers into a numeric value: 63 /* This macro turns the version numbers into a numeric value:
64 (1,2,3) -> (1203) 64 (1,2,3) -> (1203)
65 This assumes that there will never be more than 100 patchlevels 65 This assumes that there will never be more than 100 patchlevels
66 */ 66 */
67 #define SDL_VERSIONNUM(X, Y, Z) \ 67 #define SDL_VERSIONNUM(X, Y, Z) \
68 (X)*1000 + (Y)*100 + (Z) 68 ((X)*1000 + (Y)*100 + (Z))
69 69
70 /* This is the version number macro for the current SDL version */ 70 /* This is the version number macro for the current SDL version */
71 #define SDL_COMPILEDVERSION \ 71 #define SDL_COMPILEDVERSION \
72 SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL) 72 SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
73 73