aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-10-16 18:07:40 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-10-16 18:07:40 -0200
commit52d5e8032ce375601a52c0e6fa9b6b72c5327c79 (patch)
treef84ea58ff29a7dac18125e87a4f6a4185682ce42 /lobject.h
parent19c178fa14b7b641637c7be480394ab511a16a13 (diff)
downloadlua-52d5e8032ce375601a52c0e6fa9b6b72c5327c79.tar.gz
lua-52d5e8032ce375601a52c0e6fa9b6b72c5327c79.tar.bz2
lua-52d5e8032ce375601a52c0e6fa9b6b72c5327c79.zip
better identification of types which are tags
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/lobject.h b/lobject.h
index 132108d3..d07436ad 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.h,v 1.3 1997/09/26 16:46:20 roberto Exp roberto $ 2** $Id: lobject.h,v 1.4 1997/10/16 10:59:34 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*/
@@ -35,20 +35,21 @@ typedef unsigned int IntPoint; /* unsigned with same size as a pointer (for hash
35** grep "ORDER LUA_T" 35** grep "ORDER LUA_T"
36*/ 36*/
37typedef enum { 37typedef enum {
38 LUA_T_NIL = -10, 38 LUA_T_USERDATA = 0, /* tag default for userdata */
39 LUA_T_NUMBER = -9, 39 LUA_T_NUMBER = -1, /* fixed tag for numbers */
40 LUA_T_STRING = -8, 40 LUA_T_STRING = -2, /* fixed tag for strings */
41 LUA_T_ARRAY = -7, /* array==table */ 41 LUA_T_ARRAY = -3, /* tag default for tables (or arrays) */
42 LUA_T_PROTO = -6, 42 LUA_T_FUNCTION = -4, /* fixed tag for functions */
43 LUA_T_FUNCTION = -5, 43 LUA_T_CFUNCTION= -5, /* fixed tag for Cfunctions */
44 LUA_T_CFUNCTION= -4, 44 LUA_T_NIL = -6, /* last "pre-defined" tag */
45 LUA_T_MARK = -3, 45 LUA_T_PROTO = -7,
46 LUA_T_CMARK = -2, 46 LUA_T_MARK = -8,
47 LUA_T_LINE = -1, 47 LUA_T_CMARK = -9,
48 LUA_T_USERDATA = 0 48 LUA_T_LINE = -10
49} lua_Type; 49} lua_Type;
50 50
51#define NUM_TYPES 11 51#define NUM_TYPES 11
52#define NUM_TAGS 7
52 53
53 54
54typedef union { 55typedef union {