mirror of
https://github.com/lua/lua.git
synced 2025-01-14 05:43:00 +08:00
small janitor work
This commit is contained in:
parent
41964648ee
commit
6556fcfe5a
51
lobject.h
51
lobject.h
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lobject.h,v 2.110 2015/04/02 21:10:53 roberto Exp roberto $
|
** $Id: lobject.h,v 2.111 2015/06/09 14:21:42 roberto Exp roberto $
|
||||||
** Type definitions for Lua objects
|
** Type definitions for Lua objects
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -19,8 +19,8 @@
|
|||||||
/*
|
/*
|
||||||
** Extra tags for non-values
|
** Extra tags for non-values
|
||||||
*/
|
*/
|
||||||
#define LUA_TPROTO LUA_NUMTAGS
|
#define LUA_TPROTO LUA_NUMTAGS /* function prototypes */
|
||||||
#define LUA_TDEADKEY (LUA_NUMTAGS+1)
|
#define LUA_TDEADKEY (LUA_NUMTAGS+1) /* removed keys in tables */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** number of all possible tags (including LUA_TNONE but excluding DEADKEY)
|
** number of all possible tags (including LUA_TNONE but excluding DEADKEY)
|
||||||
@ -88,22 +88,32 @@ struct GCObject {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Union of all Lua values
|
|
||||||
*/
|
|
||||||
typedef union Value Value;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Tagged Values. This is the basic representation of values in Lua,
|
** Tagged Values. This is the basic representation of values in Lua,
|
||||||
** an actual value plus a tag with its type.
|
** an actual value plus a tag with its type.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Union of all Lua values
|
||||||
|
*/
|
||||||
|
typedef union Value {
|
||||||
|
GCObject *gc; /* collectable objects */
|
||||||
|
void *p; /* light userdata */
|
||||||
|
int b; /* booleans */
|
||||||
|
lua_CFunction f; /* light C functions */
|
||||||
|
lua_Integer i; /* integer numbers */
|
||||||
|
lua_Number n; /* float numbers */
|
||||||
|
} Value;
|
||||||
|
|
||||||
|
|
||||||
#define TValuefields Value value_; int tt_
|
#define TValuefields Value value_; int tt_
|
||||||
|
|
||||||
typedef struct lua_TValue TValue;
|
|
||||||
|
typedef struct lua_TValue {
|
||||||
|
TValuefields;
|
||||||
|
} TValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* macro defining a nil value */
|
/* macro defining a nil value */
|
||||||
@ -280,21 +290,6 @@ typedef struct lua_TValue TValue;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
union Value {
|
|
||||||
GCObject *gc; /* collectable objects */
|
|
||||||
void *p; /* light userdata */
|
|
||||||
int b; /* booleans */
|
|
||||||
lua_CFunction f; /* light C functions */
|
|
||||||
lua_Integer i; /* integer numbers */
|
|
||||||
lua_Number n; /* float numbers */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct lua_TValue {
|
|
||||||
TValuefields;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
typedef TValue *StkId; /* index to stack elements */
|
typedef TValue *StkId; /* index to stack elements */
|
||||||
|
|
||||||
|
|
||||||
@ -419,8 +414,8 @@ typedef struct Proto {
|
|||||||
int sizelineinfo;
|
int sizelineinfo;
|
||||||
int sizep; /* size of 'p' */
|
int sizep; /* size of 'p' */
|
||||||
int sizelocvars;
|
int sizelocvars;
|
||||||
int linedefined;
|
int linedefined; /* debug information */
|
||||||
int lastlinedefined;
|
int lastlinedefined; /* debug information */
|
||||||
TValue *k; /* constants used by the function */
|
TValue *k; /* constants used by the function */
|
||||||
Instruction *code; /* opcodes */
|
Instruction *code; /* opcodes */
|
||||||
struct Proto **p; /* functions defined inside the function */
|
struct Proto **p; /* functions defined inside the function */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user