diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-12 11:17:36 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-12 11:17:36 -0300 |
commit | f5b7f077eca034e03683363d15f28765568372e4 (patch) | |
tree | 3485af48f1dc6248c7f1745037c1abcce9320895 | |
parent | e924a7f9ea495df3b2311eb1a0bcb176f34d0545 (diff) | |
download | lua-f5b7f077eca034e03683363d15f28765568372e4.tar.gz lua-f5b7f077eca034e03683363d15f28765568372e4.tar.bz2 lua-f5b7f077eca034e03683363d15f28765568372e4.zip |
added comments to '#else' and '#endif' in long conditionals
-rw-r--r-- | luaconf.h | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.135 2010/03/26 20:58:11 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.136 2010/05/10 16:38:58 roberto Exp roberto $ |
3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -89,7 +89,7 @@ | |||
89 | #define LUA_CPATH_DEFAULT \ | 89 | #define LUA_CPATH_DEFAULT \ |
90 | LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll;" ".\\?.dll" | 90 | LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll;" ".\\?.dll" |
91 | 91 | ||
92 | #else | 92 | #else /* _WIN32 */ |
93 | #define LUA_ROOT "/usr/local/" | 93 | #define LUA_ROOT "/usr/local/" |
94 | #define LUA_LDIR LUA_ROOT "share/lua/5.2/" | 94 | #define LUA_LDIR LUA_ROOT "share/lua/5.2/" |
95 | #define LUA_CDIR LUA_ROOT "lib/lua/5.2/" | 95 | #define LUA_CDIR LUA_ROOT "lib/lua/5.2/" |
@@ -98,7 +98,7 @@ | |||
98 | LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" "./?.lua" | 98 | LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" "./?.lua" |
99 | #define LUA_CPATH_DEFAULT \ | 99 | #define LUA_CPATH_DEFAULT \ |
100 | LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so" | 100 | LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so" |
101 | #endif | 101 | #endif /* _WIN32 */ |
102 | 102 | ||
103 | 103 | ||
104 | /* | 104 | /* |
@@ -130,11 +130,12 @@ | |||
130 | #define LUA_API __declspec(dllimport) | 130 | #define LUA_API __declspec(dllimport) |
131 | #endif | 131 | #endif |
132 | 132 | ||
133 | #else | 133 | #else /* LUA_BUILD_AS_DLL */ |
134 | 134 | ||
135 | #define LUA_API extern | 135 | #define LUA_API extern |
136 | 136 | ||
137 | #endif | 137 | #endif /* LUA_BUILD_AS_DLL */ |
138 | |||
138 | 139 | ||
139 | /* more often than not the libs go together with the core */ | 140 | /* more often than not the libs go together with the core */ |
140 | #define LUALIB_API LUA_API | 141 | #define LUALIB_API LUA_API |
@@ -166,11 +167,11 @@ | |||
166 | #define LUAI_DDEC LUAI_FUNC | 167 | #define LUAI_DDEC LUAI_FUNC |
167 | #define LUAI_DDEF /* empty */ | 168 | #define LUAI_DDEF /* empty */ |
168 | 169 | ||
169 | #else | 170 | #else /* luaall_c */ |
170 | #define LUAI_FUNC extern | 171 | #define LUAI_FUNC extern |
171 | #define LUAI_DDEC extern | 172 | #define LUAI_DDEC extern |
172 | #define LUAI_DDEF /* empty */ | 173 | #define LUAI_DDEF /* empty */ |
173 | #endif | 174 | #endif /* luaall_c */ |
174 | 175 | ||
175 | 176 | ||
176 | 177 | ||
@@ -268,7 +269,7 @@ | |||
268 | /* compatibility with previous wrong spelling */ | 269 | /* compatibility with previous wrong spelling */ |
269 | #define luaL_typerror luaL_typeerror | 270 | #define luaL_typerror luaL_typeerror |
270 | 271 | ||
271 | #endif | 272 | #endif /* LUA_COMPAT_ALL */ |
272 | 273 | ||
273 | /* }================================================================== */ | 274 | /* }================================================================== */ |
274 | 275 | ||
@@ -445,7 +446,7 @@ | |||
445 | #define lua_number2uint(i,n) \ | 446 | #define lua_number2uint(i,n) \ |
446 | {__int64 l; __asm {__asm fld n __asm fistp l} i = (unsigned int)l;} | 447 | {__int64 l; __asm {__asm fld n __asm fistp l} i = (unsigned int)l;} |
447 | 448 | ||
448 | #else | 449 | #else /* _MSC_VER */ |
449 | /* the next trick should work on any Pentium, but sometimes clashes | 450 | /* the next trick should work on any Pentium, but sometimes clashes |
450 | with a DirectX idiosyncrasy */ | 451 | with a DirectX idiosyncrasy */ |
451 | 452 | ||
@@ -455,16 +456,16 @@ union luai_Cast { double l_d; long l_l; }; | |||
455 | #define lua_number2integer(i,n) lua_number2int(i, n) | 456 | #define lua_number2integer(i,n) lua_number2int(i, n) |
456 | #define lua_number2uint(i,n) lua_number2int(i, n) | 457 | #define lua_number2uint(i,n) lua_number2int(i, n) |
457 | 458 | ||
458 | #endif | 459 | #endif /* _MSC_VER */ |
459 | 460 | ||
460 | 461 | ||
461 | #else | 462 | #else /* LUA_NUMBER_DOUBLE ... (Pentium) */ |
462 | /* this option always works, but may be slow */ | 463 | /* this option always works, but may be slow */ |
463 | #define lua_number2int(i,n) ((i)=(int)(n)) | 464 | #define lua_number2int(i,n) ((i)=(int)(n)) |
464 | #define lua_number2integer(i,n) ((i)=(LUA_INTEGER)(n)) | 465 | #define lua_number2integer(i,n) ((i)=(LUA_INTEGER)(n)) |
465 | #define lua_number2uint(i,n) ((i)=(unsigned LUA_INT32)(n)) | 466 | #define lua_number2uint(i,n) ((i)=(unsigned LUA_INT32)(n)) |
466 | 467 | ||
467 | #endif | 468 | #endif /* LUA_NUMBER_DOUBLE ... (Pentium) */ |
468 | 469 | ||
469 | 470 | ||
470 | /* on several machines, coercion from unsigned to double is too slow, | 471 | /* on several machines, coercion from unsigned to double is too slow, |
@@ -489,7 +490,7 @@ union luai_Cast { double l_d; long l_l; }; | |||
489 | n = frexp(n, &e) * (lua_Number)(INT_MAX - DBL_MAX_EXP); \ | 490 | n = frexp(n, &e) * (lua_Number)(INT_MAX - DBL_MAX_EXP); \ |
490 | lua_number2int(i, n); i += e; } | 491 | lua_number2int(i, n); i += e; } |
491 | 492 | ||
492 | #endif | 493 | #endif /* ltable_c */ |
493 | 494 | ||
494 | /* }================================================================== */ | 495 | /* }================================================================== */ |
495 | 496 | ||