diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-04 15:27:32 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-04 15:27:32 -0300 |
| commit | cad91499dd183a2c08012337438730da6418e418 (patch) | |
| tree | 295600a38f870990d44b599a20b5097faa1ae978 | |
| parent | ebdd4e84514cdb81de9569dda796c58c344025bb (diff) | |
| download | lua-cad91499dd183a2c08012337438730da6418e418.tar.gz lua-cad91499dd183a2c08012337438730da6418e418.tar.bz2 lua-cad91499dd183a2c08012337438730da6418e418.zip | |
no more support for single state
| -rw-r--r-- | lauxlib.h | 42 |
1 files changed, 1 insertions, 41 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.h,v 1.20 2000/08/28 17:57:04 roberto Exp roberto $ | 2 | ** $Id: lauxlib.h,v 1.21 2000/08/29 20:43:28 roberto Exp roberto $ |
| 3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -47,8 +47,6 @@ void luaL_oldbuffer (lua_State *L, size_t old); | |||
| 47 | char *luaL_buffer (lua_State *L); | 47 | char *luaL_buffer (lua_State *L); |
| 48 | 48 | ||
| 49 | 49 | ||
| 50 | #ifndef LUA_SINGLESTATE | ||
| 51 | |||
| 52 | /* | 50 | /* |
| 53 | ** =============================================================== | 51 | ** =============================================================== |
| 54 | ** some useful macros | 52 | ** some useful macros |
| @@ -65,44 +63,6 @@ char *luaL_buffer (lua_State *L); | |||
| 65 | #define luaL_opt_long(L,n,d) ((long)luaL_opt_number(L, n,d)) | 63 | #define luaL_opt_long(L,n,d) ((long)luaL_opt_number(L, n,d)) |
| 66 | #define luaL_openl(L,a) luaL_openlib(L, a, (sizeof(a)/sizeof(a[0]))) | 64 | #define luaL_openl(L,a) luaL_openlib(L, a, (sizeof(a)/sizeof(a[0]))) |
| 67 | 65 | ||
| 68 | #else | ||
| 69 | |||
| 70 | |||
| 71 | /* | ||
| 72 | ** =============================================================== | ||
| 73 | ** Macros for single-state use | ||
| 74 | ** =============================================================== | ||
| 75 | */ | ||
| 76 | |||
| 77 | #define luaL_arg_check(cond,numarg,extramsg) if (!(cond)) \ | ||
| 78 | luaL_argerror(numarg,extramsg) | ||
| 79 | #define luaL_check_string(n) (luaL_check_lstr((n), NULL)) | ||
| 80 | #define luaL_opt_string(n, d) (luaL_opt_lstr((n), (d), NULL)) | ||
| 81 | #define luaL_check_int(n) ((int)luaL_check_number(n)) | ||
| 82 | #define luaL_check_long(n) ((long)luaL_check_number(n)) | ||
| 83 | #define luaL_opt_int(n,d) ((int)luaL_opt_number(n,d)) | ||
| 84 | #define luaL_opt_long(n,d) ((long)luaL_opt_number(n,d)) | ||
| 85 | #define luaL_openl(a) luaL_openlib(a, (sizeof(a)/sizeof(a[0]))) | ||
| 86 | |||
| 87 | |||
| 88 | #define luaL_openlib(l,n) (luaL_openlib)(lua_state,l,n) | ||
| 89 | #define luaL_argerror(numarg,extramsg) \ | ||
| 90 | (luaL_argerror)(lua_state,numarg,extramsg) | ||
| 91 | #define luaL_check_lstr(numArg,len) (luaL_check_lstr)(lua_state,numArg,len) | ||
| 92 | #define luaL_opt_lstr(numArg,def,len) \ | ||
| 93 | (luaL_opt_lstr)(lua_state,numArg,def,len) | ||
| 94 | #define luaL_check_number(numArg) (luaL_check_number)(lua_state,numArg) | ||
| 95 | #define luaL_opt_number(numArg,def) (luaL_opt_number)(lua_state,numArg,def) | ||
| 96 | #define luaL_openspace(size) (luaL_openspace)(lua_state,size) | ||
| 97 | #define luaL_resetbuffer() (luaL_resetbuffer)(lua_state) | ||
| 98 | #define luaL_addchar(c) (luaL_addchar)(lua_state,c) | ||
| 99 | #define luaL_getsize() (luaL_getsize)(lua_state) | ||
| 100 | #define luaL_addsize(n) (luaL_addsize)(lua_state,n) | ||
| 101 | #define luaL_newbuffer(size) (luaL_newbuffer)(lua_state,size) | ||
| 102 | #define luaL_oldbuffer(old) (luaL_oldbuffer)(lua_state,old) | ||
| 103 | #define luaL_buffer() (luaL_buffer)(lua_state) | ||
| 104 | |||
| 105 | #endif | ||
| 106 | 66 | ||
| 107 | #endif | 67 | #endif |
| 108 | 68 | ||
