summaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/lobject.h b/lobject.h
index bd8a5a73..d6f667f4 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.h,v 1.76 2000/09/11 20:29:27 roberto Exp roberto $ 2** $Id: lobject.h,v 1.77 2000/09/29 12:42:13 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*/
@@ -48,7 +48,7 @@ typedef enum {
48 TAG_LMARK, /* mark for Lua closures */ 48 TAG_LMARK, /* mark for Lua closures */
49 TAG_CMARK /* mark for C closures */ 49 TAG_CMARK /* mark for C closures */
50 50
51} lua_Type; 51} lua_Tag;
52 52
53/* tags for values visible from Lua == first user-created tag */ 53/* tags for values visible from Lua == first user-created tag */
54#define NUM_TAGS 7 54#define NUM_TAGS 7
@@ -80,7 +80,7 @@ typedef union {
80 80
81 81
82typedef struct lua_TObject { 82typedef struct lua_TObject {
83 lua_Type ttype; 83 lua_Tag ttype;
84 Value value; 84 Value value;
85} TObject; 85} TObject;
86 86
@@ -189,10 +189,12 @@ typedef struct CallInfo {
189} CallInfo; 189} CallInfo;
190 190
191 191
192extern const char *const luaO_typenames[]; 192extern const lua_Type luaO_typearr[];
193extern const TObject luaO_nilobject; 193extern const TObject luaO_nilobject;
194 194
195#define luaO_typename(o) luaO_typenames[ttype(o)] 195#define luaO_tag2type(t) (luaO_typearr[(int)(t)])
196#define luaO_type(o) (luaO_tag2type(ttype(o)))
197#define luaO_typename(L, o) (lua_typename(L, luaO_type(o)))
196 198
197lint32 luaO_power2 (lint32 n); 199lint32 luaO_power2 (lint32 n);
198char *luaO_openspace (lua_State *L, size_t n); 200char *luaO_openspace (lua_State *L, size_t n);