summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-06-06 10:30:25 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-06-06 10:30:25 -0300
commitd987cf1f812b131788029d6de0c81ed64020e522 (patch)
treed67230d0bd44584fc1616349ca14fb6ebfc94418
parenteca9fa02d2887d06cee5e2f742f7e3031ac76a51 (diff)
downloadlua-d987cf1f812b131788029d6de0c81ed64020e522.tar.gz
lua-d987cf1f812b131788029d6de0c81ed64020e522.tar.bz2
lua-d987cf1f812b131788029d6de0c81ed64020e522.zip
new mark LUAI_DATA for extern data
-rw-r--r--llex.h4
-rw-r--r--lobject.h4
-rw-r--r--lopcodes.h6
-rw-r--r--ltable.h4
-rw-r--r--ltests.h8
-rw-r--r--ltm.h4
6 files changed, 15 insertions, 15 deletions
diff --git a/llex.h b/llex.h
index 835a6879..a62a20e0 100644
--- a/llex.h
+++ b/llex.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.h,v 1.53 2005/04/07 13:09:07 roberto Exp roberto $ 2** $Id: llex.h,v 1.54 2005/04/25 19:24:10 roberto Exp roberto $
3** Lexical Analyzer 3** Lexical Analyzer
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -37,7 +37,7 @@ enum RESERVED {
37 37
38 38
39/* array with token `names' */ 39/* array with token `names' */
40extern const char *const luaX_tokens []; 40LUAI_DATA const char *const luaX_tokens [];
41 41
42 42
43typedef union { 43typedef union {
diff --git a/lobject.h b/lobject.h
index 44291f7c..91969bf9 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.h,v 2.13 2005/05/05 20:47:02 roberto Exp roberto $ 2** $Id: lobject.h,v 2.14 2005/05/31 14:25:18 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*/
@@ -357,7 +357,7 @@ typedef struct Table {
357 357
358 358
359 359
360extern const TValue luaO_nilobject; 360LUAI_DATA const TValue luaO_nilobject;
361 361
362#define ceillog2(x) (luaO_log2((x)-1) + 1) 362#define ceillog2(x) (luaO_log2((x)-1) + 1)
363 363
diff --git a/lopcodes.h b/lopcodes.h
index d15b19e5..8d199ea7 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.119 2005/05/04 20:42:28 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.120 2005/05/20 15:53:42 roberto Exp roberto $
3** Opcodes for Lua virtual machine 3** Opcodes for Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -248,7 +248,7 @@ enum OpArgMask {
248 OpArgK /* argument is a constant or register/constant */ 248 OpArgK /* argument is a constant or register/constant */
249}; 249};
250 250
251extern const lu_byte luaP_opmodes[NUM_OPCODES]; 251LUAI_DATA const lu_byte luaP_opmodes[NUM_OPCODES];
252 252
253#define getOpMode(m) (cast(enum OpMode, luaP_opmodes[m] & 3)) 253#define getOpMode(m) (cast(enum OpMode, luaP_opmodes[m] & 3))
254#define getBMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 4) & 3)) 254#define getBMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 4) & 3))
@@ -257,7 +257,7 @@ extern const lu_byte luaP_opmodes[NUM_OPCODES];
257#define testTMode(m) (luaP_opmodes[m] & (1 << 7)) 257#define testTMode(m) (luaP_opmodes[m] & (1 << 7))
258 258
259 259
260extern const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */ 260LUAI_DATA const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */
261 261
262 262
263/* number of list items to accumulate before a SETLIST instruction */ 263/* number of list items to accumulate before a SETLIST instruction */
diff --git a/ltable.h b/ltable.h
index 05b554f6..4b9b11b3 100644
--- a/ltable.h
+++ b/ltable.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.h,v 2.6 2005/03/16 16:58:41 roberto Exp roberto $ 2** $Id: ltable.h,v 2.7 2005/04/25 19:24:10 roberto Exp roberto $
3** Lua tables (hash) 3** Lua tables (hash)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -18,7 +18,7 @@
18#define key2tval(n) (cast(const TValue *, gkey(n))) 18#define key2tval(n) (cast(const TValue *, gkey(n)))
19 19
20 20
21extern const Node luaH_dummynode; 21LUAI_DATA const Node luaH_dummynode;
22 22
23LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); 23LUAI_FUNC const TValue *luaH_getnum (Table *t, int key);
24LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); 24LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key);
diff --git a/ltests.h b/ltests.h
index ff843092..f609ad69 100644
--- a/ltests.h
+++ b/ltests.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.h,v 2.13 2005/04/13 17:24:20 roberto Exp roberto $ 2** $Id: ltests.h,v 2.14 2005/05/03 19:01:17 roberto Exp roberto $
3** Internal Header for Debugging of the Lua Implementation 3** Internal Header for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -31,13 +31,13 @@ typedef struct Memcontrol {
31 unsigned long memlimit; 31 unsigned long memlimit;
32} Memcontrol; 32} Memcontrol;
33 33
34extern Memcontrol memcontrol; 34LUAI_DATA Memcontrol memcontrol;
35 35
36 36
37/* 37/*
38** generic variable for debug tricks 38** generic variable for debug tricks
39*/ 39*/
40extern int Trick; 40LUAI_DATA int Trick;
41 41
42 42
43void *debug_realloc (void *ud, void *block, size_t osize, size_t nsize); 43void *debug_realloc (void *ud, void *block, size_t osize, size_t nsize);
@@ -59,7 +59,7 @@ int lua_checkpc (lua_State *L, pCallInfo ci);
59#undef lua_unlock 59#undef lua_unlock
60#undef LUAI_EXTRASPACE 60#undef LUAI_EXTRASPACE
61 61
62extern int islocked; 62LUAI_DATA int islocked;
63#define LUAI_EXTRASPACE sizeof(double) 63#define LUAI_EXTRASPACE sizeof(double)
64#define getlock(l) (*(cast(int **, l) - 1)) 64#define getlock(l) (*(cast(int **, l) - 1))
65#define luai_userstateopen(l) getlock(l) = &islocked; 65#define luai_userstateopen(l) getlock(l) = &islocked;
diff --git a/ltm.h b/ltm.h
index bef0ac2e..dcb14fc6 100644
--- a/ltm.h
+++ b/ltm.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.h,v 2.4 2005/05/05 15:34:03 roberto Exp roberto $ 2** $Id: ltm.h,v 2.5 2005/05/20 15:53:42 roberto Exp roberto $
3** Tag methods 3** Tag methods
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -43,7 +43,7 @@ typedef enum {
43 43
44#define fasttm(l,et,e) gfasttm(G(l), et, e) 44#define fasttm(l,et,e) gfasttm(G(l), et, e)
45 45
46extern const char *const luaT_typenames[]; 46LUAI_DATA const char *const luaT_typenames[];
47 47
48 48
49LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); 49LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename);