diff options
Diffstat (limited to 'lobject.h')
| -rw-r--r-- | lobject.h | 12 |
1 files changed, 6 insertions, 6 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.h,v 1.40 1999/12/14 18:33:29 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.41 1999/12/23 18:19:57 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 | */ |
| @@ -46,7 +46,7 @@ typedef unsigned char Byte; /* unsigned 8 bits */ | |||
| 46 | #define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */ | 46 | #define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */ |
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | /* convertion of pointer to int (for hashing only) */ | 49 | /* conversion of pointer to int (for hashing only) */ |
| 50 | /* (the shift removes bits that are usually 0 because of alignment) */ | 50 | /* (the shift removes bits that are usually 0 because of alignment) */ |
| 51 | #define IntPoint(L, p) (((unsigned int)(p)) >> 3) | 51 | #define IntPoint(L, p) (((unsigned int)(p)) >> 3) |
| 52 | 52 | ||
| @@ -65,10 +65,10 @@ typedef unsigned char Byte; /* unsigned 8 bits */ | |||
| 65 | ** grep "ORDER LUA_T" | 65 | ** grep "ORDER LUA_T" |
| 66 | */ | 66 | */ |
| 67 | typedef enum { | 67 | typedef enum { |
| 68 | LUA_T_USERDATA = 0, /* tag default for userdata */ | 68 | LUA_T_USERDATA = 0, /* default tag for userdata */ |
| 69 | LUA_T_NUMBER = -1, /* fixed tag for numbers */ | 69 | LUA_T_NUMBER = -1, /* fixed tag for numbers */ |
| 70 | LUA_T_STRING = -2, /* fixed tag for strings */ | 70 | LUA_T_STRING = -2, /* fixed tag for strings */ |
| 71 | LUA_T_ARRAY = -3, /* tag default for tables (or arrays) */ | 71 | LUA_T_ARRAY = -3, /* default tag for tables (or arrays) */ |
| 72 | LUA_T_LPROTO = -4, /* fixed tag for Lua functions */ | 72 | LUA_T_LPROTO = -4, /* fixed tag for Lua functions */ |
| 73 | LUA_T_CPROTO = -5, /* fixed tag for C functions */ | 73 | LUA_T_CPROTO = -5, /* fixed tag for C functions */ |
| 74 | LUA_T_NIL = -6, /* last "pre-defined" tag */ | 74 | LUA_T_NIL = -6, /* last "pre-defined" tag */ |
| @@ -84,7 +84,7 @@ typedef enum { | |||
| 84 | #define NUM_TAGS 7 | 84 | #define NUM_TAGS 7 |
| 85 | 85 | ||
| 86 | /* | 86 | /* |
| 87 | ** chech whether t is a mark; ttypes are negative numbers, so the | 87 | ** chech whether `t' is a mark; ttypes are negative numbers, so the |
| 88 | ** comparisons look reversed. (ORDER LUA_T) | 88 | ** comparisons look reversed. (ORDER LUA_T) |
| 89 | */ | 89 | */ |
| 90 | #define is_T_MARK(t) (LUA_T_CMARK <= (t) && (t) <= LUA_T_LCLMARK) | 90 | #define is_T_MARK(t) (LUA_T_CMARK <= (t) && (t) <= LUA_T_LCLMARK) |
| @@ -181,7 +181,7 @@ typedef struct LocVar { | |||
| 181 | typedef struct Closure { | 181 | typedef struct Closure { |
| 182 | struct Closure *next; | 182 | struct Closure *next; |
| 183 | int marked; | 183 | int marked; |
| 184 | int nelems; /* not included the first one (always the prototype) */ | 184 | int nelems; /* not including the first one (always the prototype) */ |
| 185 | TObject consts[1]; /* at least one for prototype */ | 185 | TObject consts[1]; /* at least one for prototype */ |
| 186 | } Closure; | 186 | } Closure; |
| 187 | 187 | ||
