From 213e9febc889d5aaae8ef0e8b777cdb4889e30c1 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 24 Mar 2000 14:26:08 -0300 Subject: limits now are in `llims.n' --- lobject.h | 46 ++-------------------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) (limited to 'lobject.h') diff --git a/lobject.h b/lobject.h index 558af2de..2b3fb2e4 100644 --- a/lobject.h +++ b/lobject.h @@ -1,5 +1,5 @@ /* -** $Id: lobject.h,v 1.52 2000/03/16 21:06:16 roberto Exp roberto $ +** $Id: lobject.h,v 1.53 2000/03/20 19:14:54 roberto Exp roberto $ ** Type definitions for Lua objects ** See Copyright Notice in lua.h */ @@ -8,8 +8,7 @@ #define lobject_h -#include - +#include "llims.h" #include "lua.h" @@ -26,39 +25,6 @@ #define UNUSED(x) (void)x /* to avoid warnings */ -/* -** Define the type `number' of Lua -** GREP LUA_NUMBER to change that -*/ -#ifndef LUA_NUM_TYPE -#define LUA_NUM_TYPE double -#endif - -typedef LUA_NUM_TYPE Number; - - -/* -** type for virtual-machine instructions -** must be an unsigned with 4 bytes (see details in lopcodes.h) -*/ -typedef unsigned long Instruction; - - -#define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */ - - -/* conversion of pointer to int (for hashing only) */ -/* (the shift removes bits that are usually 0 because of alignment) */ -#define IntPoint(L, p) (((unsigned long)(p)) >> 3) - - -/* -** number of `blocks' for garbage collection: each reference to other -** objects count 1, and each 32 bytes of `raw' memory count 1; we add -** 2 to the total as a minimum (and also to count the overhead of malloc) -*/ -#define numblocks(L, o,b) ((o)+((b)>>5)+2) - /* ** Lua TYPES @@ -112,7 +78,6 @@ typedef struct TObject { } TObject; - typedef struct GlobalVar { TObject value; struct GlobalVar *next; @@ -142,8 +107,6 @@ typedef struct TString { } TString; - - /* ** Function Prototypes */ @@ -173,8 +136,6 @@ typedef struct LocVar { - - /* Macros to access structure members */ #define ttype(o) ((o)->ttype) #define nvalue(o) ((o)->value.n) @@ -199,7 +160,6 @@ typedef struct Closure { } Closure; - typedef struct Node { TObject key; TObject val; @@ -221,8 +181,6 @@ extern const TObject luaO_nilobject; #define luaO_typename(o) luaO_typenames[ttype(o)] -#define MINPOWER2 4 /* minimum size for "growing" vectors */ - unsigned long luaO_power2 (unsigned long n); #define luaO_equalObj(t1,t2) (ttype(t1) == ttype(t2) && luaO_equalval(t1,t2)) -- cgit v1.2.3-55-g6feb