diff options
Diffstat (limited to 'lobject.h')
| -rw-r--r-- | lobject.h | 20 |
1 files changed, 10 insertions, 10 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.h,v 1.35 1999/11/04 17:22:26 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.36 1999/11/10 15:39:35 roberto Exp roberto $ |
| 3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -18,11 +18,11 @@ | |||
| 18 | #undef NDEBUG | 18 | #undef NDEBUG |
| 19 | #endif | 19 | #endif |
| 20 | #include <assert.h> | 20 | #include <assert.h> |
| 21 | #define LUA_INTERNALERROR(s) assert(0) | 21 | #define LUA_INTERNALERROR(L,s) assert(0) |
| 22 | #define LUA_ASSERT(c,s) assert(c) | 22 | #define LUA_ASSERT(L,c,s) assert(c) |
| 23 | #else | 23 | #else |
| 24 | #define LUA_INTERNALERROR(s) /* empty */ | 24 | #define LUA_INTERNALERROR(L,s) /* empty */ |
| 25 | #define LUA_ASSERT(c,s) /* empty */ | 25 | #define LUA_ASSERT(L,c,s) /* empty */ |
| 26 | #endif | 26 | #endif |
| 27 | 27 | ||
| 28 | 28 | ||
| @@ -41,11 +41,11 @@ typedef LUA_NUM_TYPE real; | |||
| 41 | typedef unsigned char Byte; /* unsigned 8 bits */ | 41 | typedef unsigned char Byte; /* unsigned 8 bits */ |
| 42 | 42 | ||
| 43 | 43 | ||
| 44 | #define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */ | 44 | #define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */ |
| 45 | 45 | ||
| 46 | 46 | ||
| 47 | /* convertion of pointer to int (for hashing only) */ | 47 | /* convertion of pointer to int (for hashing only) */ |
| 48 | #define IntPoint(p) ((unsigned int)(p)) | 48 | #define IntPoint(L, p) ((unsigned int)(p)) |
| 49 | 49 | ||
| 50 | 50 | ||
| 51 | /* | 51 | /* |
| @@ -53,7 +53,7 @@ typedef unsigned char Byte; /* unsigned 8 bits */ | |||
| 53 | ** objects count 1, and each 32 bytes of `raw' memory count 1; we add | 53 | ** objects count 1, and each 32 bytes of `raw' memory count 1; we add |
| 54 | ** 2 to the total as a minimum (and also to count the overhead of malloc) | 54 | ** 2 to the total as a minimum (and also to count the overhead of malloc) |
| 55 | */ | 55 | */ |
| 56 | #define numblocks(o,b) ((o)+(b)/32+2) | 56 | #define numblocks(L, o,b) ((o)+(b)/32+2) |
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | /* | 59 | /* |
| @@ -195,7 +195,7 @@ typedef struct Hash { | |||
| 195 | extern const char *const luaO_typenames[]; | 195 | extern const char *const luaO_typenames[]; |
| 196 | 196 | ||
| 197 | 197 | ||
| 198 | #define luaO_typename(o) luaO_typenames[-ttype(o)] | 198 | #define luaO_typename(L, o) luaO_typenames[-ttype(o)] |
| 199 | 199 | ||
| 200 | 200 | ||
| 201 | extern const TObject luaO_nilobject; | 201 | extern const TObject luaO_nilobject; |
| @@ -204,7 +204,7 @@ extern const TObject luaO_nilobject; | |||
| 204 | #define luaO_equalObj(t1,t2) ((ttype(t1) != ttype(t2)) ? 0 \ | 204 | #define luaO_equalObj(t1,t2) ((ttype(t1) != ttype(t2)) ? 0 \ |
| 205 | : luaO_equalval(t1,t2)) | 205 | : luaO_equalval(t1,t2)) |
| 206 | int luaO_equalval (const TObject *t1, const TObject *t2); | 206 | int luaO_equalval (const TObject *t1, const TObject *t2); |
| 207 | int luaO_redimension (int oldsize); | 207 | int luaO_redimension (lua_State *L, int oldsize); |
| 208 | int luaO_str2d (const char *s, real *result); | 208 | int luaO_str2d (const char *s, real *result); |
| 209 | 209 | ||
| 210 | #ifdef OLD_ANSI | 210 | #ifdef OLD_ANSI |
