mirror of https://github.com/rusefi/lua.git
details (comments)
This commit is contained in:
parent
212095a601
commit
c80c7a49fd
45
lobject.h
45
lobject.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lobject.h,v 2.133 2018/01/28 15:13:26 roberto Exp roberto $
|
** $Id: lobject.h,v 2.134 2018/02/20 16:52:50 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
|
||||||
*/
|
*/
|
||||||
|
@ -88,12 +88,6 @@ struct GCObject {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Tagged Values. This is the basic representation of values in Lua,
|
|
||||||
** an actual value plus a tag with its type.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Union of all Lua values
|
** Union of all Lua values
|
||||||
*/
|
*/
|
||||||
|
@ -107,8 +101,12 @@ typedef union Value {
|
||||||
} Value;
|
} Value;
|
||||||
|
|
||||||
|
|
||||||
#define TValuefields Value value_; lu_byte tt_
|
/*
|
||||||
|
** Tagged Values. This is the basic representation of values in Lua:
|
||||||
|
** an actual value plus a tag with its type.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define TValuefields Value value_; lu_byte tt_
|
||||||
|
|
||||||
typedef struct TValue {
|
typedef struct TValue {
|
||||||
TValuefields;
|
TValuefields;
|
||||||
|
@ -301,14 +299,6 @@ typedef struct TValue {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
** {======================================================
|
|
||||||
** types and prototypes
|
|
||||||
** =======================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
typedef union StackValue {
|
typedef union StackValue {
|
||||||
TValue val;
|
TValue val;
|
||||||
} StackValue;
|
} StackValue;
|
||||||
|
@ -321,6 +311,12 @@ typedef StackValue *StkId; /* index to stack elements */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
** {==================================================================
|
||||||
|
** Strings
|
||||||
|
** ===================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Header for string value; string bytes follow the end of this structure
|
** Header for string value; string bytes follow the end of this structure
|
||||||
** (aligned according to 'UTString'; see next).
|
** (aligned according to 'UTString'; see next).
|
||||||
|
@ -363,6 +359,8 @@ typedef union UTString {
|
||||||
/* get string length from 'TValue *o' */
|
/* get string length from 'TValue *o' */
|
||||||
#define vslen(o) tsslen(tsvalue(o))
|
#define vslen(o) tsslen(tsvalue(o))
|
||||||
|
|
||||||
|
/* }================================================================== */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** {==================================================================
|
** {==================================================================
|
||||||
|
@ -404,7 +402,6 @@ typedef struct Udata {
|
||||||
/* }================================================================== */
|
/* }================================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** {==================================================================
|
** {==================================================================
|
||||||
** Prototypes
|
** Prototypes
|
||||||
|
@ -480,6 +477,11 @@ typedef struct Proto {
|
||||||
/* }================================================================== */
|
/* }================================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
** {==================================================================
|
||||||
|
** Closures
|
||||||
|
** ===================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Upvalues for Lua closures
|
** Upvalues for Lua closures
|
||||||
|
@ -529,14 +531,17 @@ typedef union Closure {
|
||||||
|
|
||||||
#define getproto(o) (clLvalue(o)->p)
|
#define getproto(o) (clLvalue(o)->p)
|
||||||
|
|
||||||
|
/* }================================================================== */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
** {==================================================================
|
||||||
** Tables
|
** Tables
|
||||||
|
** ===================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Nodes for Hash tables. A pack of two TValue's (key-value pairs)
|
** Nodes for Hash tables: A pack of two TValue's (key-value pairs)
|
||||||
** plus a 'next' field to link colliding entries. The distribution
|
** plus a 'next' field to link colliding entries. The distribution
|
||||||
** of the key's fields ('key_tt' and 'key_val') not forming a proper
|
** of the key's fields ('key_tt' and 'key_val') not forming a proper
|
||||||
** 'TValue' allows for a smaller size for 'Node' both in 4-byte
|
** 'TValue' allows for a smaller size for 'Node' both in 4-byte
|
||||||
|
@ -609,6 +614,8 @@ typedef struct Table {
|
||||||
*/
|
*/
|
||||||
#define setdeadkey(n) (keytt(n) = LUA_TTABLE, gckey(n) = NULL)
|
#define setdeadkey(n) (keytt(n) = LUA_TTABLE, gckey(n) = NULL)
|
||||||
|
|
||||||
|
/* }================================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue