Browse Source

new mark LUAI_DATA for extern data

v5-2
Roberto Ierusalimschy 20 years ago
parent
commit
d987cf1f81
  1. 4
      llex.h
  2. 4
      lobject.h
  3. 6
      lopcodes.h
  4. 4
      ltable.h
  5. 8
      ltests.h
  6. 4
      ltm.h

4
llex.h

@ -1,5 +1,5 @@
/* /*
** $Id: llex.h,v 1.53 2005/04/07 13:09:07 roberto Exp roberto $ ** $Id: llex.h,v 1.54 2005/04/25 19:24:10 roberto Exp roberto $
** Lexical Analyzer ** Lexical Analyzer
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -37,7 +37,7 @@ enum RESERVED {
/* array with token `names' */ /* array with token `names' */
extern const char *const luaX_tokens []; LUAI_DATA const char *const luaX_tokens [];
typedef union { typedef union {

4
lobject.h

@ -1,5 +1,5 @@
/* /*
** $Id: lobject.h,v 2.13 2005/05/05 20:47:02 roberto Exp roberto $ ** $Id: lobject.h,v 2.14 2005/05/31 14:25:18 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
*/ */
@ -357,7 +357,7 @@ typedef struct Table {
extern const TValue luaO_nilobject; LUAI_DATA const TValue luaO_nilobject;
#define ceillog2(x) (luaO_log2((x)-1) + 1) #define ceillog2(x) (luaO_log2((x)-1) + 1)

6
lopcodes.h

@ -1,5 +1,5 @@
/* /*
** $Id: lopcodes.h,v 1.119 2005/05/04 20:42:28 roberto Exp roberto $ ** $Id: lopcodes.h,v 1.120 2005/05/20 15:53:42 roberto Exp roberto $
** Opcodes for Lua virtual machine ** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -248,7 +248,7 @@ enum OpArgMask {
OpArgK /* argument is a constant or register/constant */ OpArgK /* argument is a constant or register/constant */
}; };
extern const lu_byte luaP_opmodes[NUM_OPCODES]; LUAI_DATA const lu_byte luaP_opmodes[NUM_OPCODES];
#define getOpMode(m) (cast(enum OpMode, luaP_opmodes[m] & 3)) #define getOpMode(m) (cast(enum OpMode, luaP_opmodes[m] & 3))
#define getBMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 4) & 3)) #define getBMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 4) & 3))
@ -257,7 +257,7 @@ extern const lu_byte luaP_opmodes[NUM_OPCODES];
#define testTMode(m) (luaP_opmodes[m] & (1 << 7)) #define testTMode(m) (luaP_opmodes[m] & (1 << 7))
extern const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */ LUAI_DATA const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */
/* number of list items to accumulate before a SETLIST instruction */ /* number of list items to accumulate before a SETLIST instruction */

4
ltable.h

@ -1,5 +1,5 @@
/* /*
** $Id: ltable.h,v 2.6 2005/03/16 16:58:41 roberto Exp roberto $ ** $Id: ltable.h,v 2.7 2005/04/25 19:24:10 roberto Exp roberto $
** Lua tables (hash) ** Lua tables (hash)
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -18,7 +18,7 @@
#define key2tval(n) (cast(const TValue *, gkey(n))) #define key2tval(n) (cast(const TValue *, gkey(n)))
extern const Node luaH_dummynode; LUAI_DATA const Node luaH_dummynode;
LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); LUAI_FUNC const TValue *luaH_getnum (Table *t, int key);
LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key);

8
ltests.h

@ -1,5 +1,5 @@
/* /*
** $Id: ltests.h,v 2.13 2005/04/13 17:24:20 roberto Exp roberto $ ** $Id: ltests.h,v 2.14 2005/05/03 19:01:17 roberto Exp roberto $
** Internal Header for Debugging of the Lua Implementation ** Internal Header for Debugging of the Lua Implementation
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -31,13 +31,13 @@ typedef struct Memcontrol {
unsigned long memlimit; unsigned long memlimit;
} Memcontrol; } Memcontrol;
extern Memcontrol memcontrol; LUAI_DATA Memcontrol memcontrol;
/* /*
** generic variable for debug tricks ** generic variable for debug tricks
*/ */
extern int Trick; LUAI_DATA int Trick;
void *debug_realloc (void *ud, void *block, size_t osize, size_t nsize); void *debug_realloc (void *ud, void *block, size_t osize, size_t nsize);
@ -59,7 +59,7 @@ int lua_checkpc (lua_State *L, pCallInfo ci);
#undef lua_unlock #undef lua_unlock
#undef LUAI_EXTRASPACE #undef LUAI_EXTRASPACE
extern int islocked; LUAI_DATA int islocked;
#define LUAI_EXTRASPACE sizeof(double) #define LUAI_EXTRASPACE sizeof(double)
#define getlock(l) (*(cast(int **, l) - 1)) #define getlock(l) (*(cast(int **, l) - 1))
#define luai_userstateopen(l) getlock(l) = &islocked; #define luai_userstateopen(l) getlock(l) = &islocked;

4
ltm.h

@ -1,5 +1,5 @@
/* /*
** $Id: ltm.h,v 2.4 2005/05/05 15:34:03 roberto Exp roberto $ ** $Id: ltm.h,v 2.5 2005/05/20 15:53:42 roberto Exp roberto $
** Tag methods ** Tag methods
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -43,7 +43,7 @@ typedef enum {
#define fasttm(l,et,e) gfasttm(G(l), et, e) #define fasttm(l,et,e) gfasttm(G(l), et, e)
extern const char *const luaT_typenames[]; LUAI_DATA const char *const luaT_typenames[];
LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename);

Loading…
Cancel
Save