diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-10-25 11:36:28 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-10-25 11:36:28 -0200 |
commit | 9b5ae6faf97648fdc304a6fa3c2ae641647cb31a (patch) | |
tree | 572ddf8195df4e08316c5a9417c018c52636a392 | |
parent | caf3cfc6ac3214c6116559c205a21d482a65fe79 (diff) | |
download | lua-9b5ae6faf97648fdc304a6fa3c2ae641647cb31a.tar.gz lua-9b5ae6faf97648fdc304a6fa3c2ae641647cb31a.tar.bz2 lua-9b5ae6faf97648fdc304a6fa3c2ae641647cb31a.zip |
better control of which values macros use
-rw-r--r-- | luaconf.h | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.69 2005/10/13 12:22:53 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.70 2005/10/24 17:39:21 roberto Exp $ |
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 | */ |
@@ -273,10 +273,10 @@ | |||
273 | #define lua_freeline(L,b) ((void)L, free(b)) | 273 | #define lua_freeline(L,b) ((void)L, free(b)) |
274 | #else | 274 | #else |
275 | #define lua_readline(L,b,p) \ | 275 | #define lua_readline(L,b,p) \ |
276 | (fputs(p, stdout), fflush(stdout), /* show prompt */ \ | 276 | ((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \ |
277 | fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */ | 277 | fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */ |
278 | #define lua_saveline(L,idx) ((void)L, (void)idx, (void)0) | 278 | #define lua_saveline(L,idx) { (void)L; (void)idx; } |
279 | #define lua_freeline(L,b) ((void)L, (void)b, (void)0) | 279 | #define lua_freeline(L,b) { (void)L; (void)b; } |
280 | #endif | 280 | #endif |
281 | 281 | ||
282 | #endif | 282 | #endif |
@@ -643,19 +643,19 @@ union luai_Cast { double l_d; long l_l; }; | |||
643 | */ | 643 | */ |
644 | #if defined(LUA_USE_POPEN) | 644 | #if defined(LUA_USE_POPEN) |
645 | 645 | ||
646 | #define lua_popen(L,c,m) popen(c,m) | 646 | #define lua_popen(L,c,m) ((void)L, popen(c,m)) |
647 | #define lua_pclose(L,file) (pclose(file) != -1) | 647 | #define lua_pclose(L,file) ((void)L, (pclose(file) != -1)) |
648 | 648 | ||
649 | #elif !defined(LUA_ANSI) && defined(_WIN32) | 649 | #elif !defined(LUA_ANSI) && defined(_WIN32) |
650 | 650 | ||
651 | #define lua_popen(L,c,m) _popen(c,m) | 651 | #define lua_popen(L,c,m) ((void)L, _popen(c,m)) |
652 | #define lua_pclose(L,file) (_pclose(file) != -1) | 652 | #define lua_pclose(L,file) ((void)L, (_pclose(file) != -1)) |
653 | 653 | ||
654 | #else | 654 | #else |
655 | 655 | ||
656 | #define lua_popen(L,c,m) \ | 656 | #define lua_popen(L,c,m) \ |
657 | ((void)c, (void)m, luaL_error(L, LUA_QL("popen") " not supported"), (FILE*)0) | 657 | ((void)c, (void)m, luaL_error(L, LUA_QL("popen") " not supported"), (FILE*)0) |
658 | #define lua_pclose(L,file) ((void)file, 0) | 658 | #define lua_pclose(L,file) ((void)L, (void)file, 0) |
659 | 659 | ||
660 | #endif | 660 | #endif |
661 | 661 | ||
@@ -692,12 +692,12 @@ union luai_Cast { double l_d; long l_l; }; | |||
692 | ** CHANGE them if you defined LUAI_EXTRASPACE and need to do something | 692 | ** CHANGE them if you defined LUAI_EXTRASPACE and need to do something |
693 | ** extra when a thread is created/deleted/resumed/yielded. | 693 | ** extra when a thread is created/deleted/resumed/yielded. |
694 | */ | 694 | */ |
695 | #define luai_userstateopen(L) ((void)0) | 695 | #define luai_userstateopen(L) ((void)L) |
696 | #define luai_userstateclose(L) ((void)0) | 696 | #define luai_userstateclose(L) ((void)L) |
697 | #define luai_userstatethread(L,L1) ((void)0) | 697 | #define luai_userstatethread(L,L1) ((void)L) |
698 | #define luai_userstatefree(L) ((void)0) | 698 | #define luai_userstatefree(L) ((void)L) |
699 | #define luai_userstateresume(L,n) ((void)0) | 699 | #define luai_userstateresume(L,n) ((void)L) |
700 | #define luai_userstateyield(L,n) ((void)0) | 700 | #define luai_userstateyield(L,n) ((void)L) |
701 | 701 | ||
702 | 702 | ||
703 | 703 | ||