diff options
Diffstat (limited to 'lobject.h')
| -rw-r--r-- | lobject.h | 14 |
1 files changed, 12 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.h,v 1.34 1999/10/19 13:33:22 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.35 1999/11/04 17:22:26 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 | */ |
| @@ -43,7 +43,17 @@ typedef unsigned char Byte; /* unsigned 8 bits */ | |||
| 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 | typedef unsigned int IntPoint; /* unsigned with same size as a pointer (for hashing) */ | 46 | |
| 47 | /* convertion of pointer to int (for hashing only) */ | ||
| 48 | #define IntPoint(p) ((unsigned int)(p)) | ||
| 49 | |||
| 50 | |||
| 51 | /* | ||
| 52 | ** number of `blocks' for garbage collection: each reference to other | ||
| 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) | ||
| 55 | */ | ||
| 56 | #define numblocks(o,b) ((o)+(b)/32+2) | ||
| 47 | 57 | ||
| 48 | 58 | ||
| 49 | /* | 59 | /* |
