summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lctype.c4
-rw-r--r--lctype.h4
-rw-r--r--lobject.c4
-rw-r--r--lobject.h4
-rw-r--r--lopcodes.c6
-rw-r--r--lopcodes.h6
-rw-r--r--ltests.h6
-rw-r--r--ltm.c4
-rw-r--r--ltm.h4
-rw-r--r--luaconf.h16
10 files changed, 31 insertions, 27 deletions
diff --git a/lctype.c b/lctype.c
index ec3dd265..b8570a19 100644
--- a/lctype.c
+++ b/lctype.c
@@ -1,5 +1,5 @@
/*
-** $Id: lctype.c,v 1.6 2009/05/18 17:15:14 roberto Exp roberto $
+** $Id: lctype.c,v 1.7 2009/05/27 16:51:15 roberto Exp roberto $
** 'ctype' functions for Lua
** See Copyright Notice in lua.h
*/
@@ -8,7 +8,7 @@
#include "lctype.h"
-const lu_byte luai_ctype_[UCHAR_MAX + 2] = {
+LUAI_DDEF const lu_byte luai_ctype_[UCHAR_MAX + 2] = {
0x00, /* EOZ */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00,
diff --git a/lctype.h b/lctype.h
index 0b96bff4..7abf6e58 100644
--- a/lctype.h
+++ b/lctype.h
@@ -1,5 +1,5 @@
/*
-** $Id: lctype.h,v 1.6 2009/05/18 17:15:14 roberto Exp roberto $
+** $Id: lctype.h,v 1.7 2009/05/27 16:51:15 roberto Exp roberto $
** 'ctype' functions for Lua
** See Copyright Notice in lua.h
*/
@@ -44,7 +44,7 @@
/* one more entry for 0 and one more for -1 (EOZ) */
-LUAI_DATA const lu_byte luai_ctype_[UCHAR_MAX + 2];
+LUAI_DDEC const lu_byte luai_ctype_[UCHAR_MAX + 2];
#endif
diff --git a/lobject.c b/lobject.c
index 846d02a7..346db7be 100644
--- a/lobject.c
+++ b/lobject.c
@@ -1,5 +1,5 @@
/*
-** $Id: lobject.c,v 2.31 2009/06/17 17:48:34 roberto Exp roberto $
+** $Id: lobject.c,v 2.32 2009/11/06 17:07:12 roberto Exp roberto $
** Some generic functions over Lua objects
** See Copyright Notice in lua.h
*/
@@ -25,7 +25,7 @@
-const TValue luaO_nilobject_ = {NILCONSTANT};
+LUAI_DDEF const TValue luaO_nilobject_ = {NILCONSTANT};
/*
diff --git a/lobject.h b/lobject.h
index fe198355..5dcfb3d3 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
/*
-** $Id: lobject.h,v 2.31 2009/11/05 17:43:54 roberto Exp roberto $
+** $Id: lobject.h,v 2.32 2009/11/06 17:09:27 roberto Exp roberto $
** Type definitions for Lua objects
** See Copyright Notice in lua.h
*/
@@ -370,7 +370,7 @@ typedef struct Table {
#define luaO_nilobject (&luaO_nilobject_)
-LUAI_DATA const TValue luaO_nilobject_;
+LUAI_DDEC const TValue luaO_nilobject_;
LUAI_FUNC int luaO_int2fb (unsigned int x);
LUAI_FUNC int luaO_fb2int (int x);
diff --git a/lopcodes.c b/lopcodes.c
index d8bf6316..4bcd2b6e 100644
--- a/lopcodes.c
+++ b/lopcodes.c
@@ -1,5 +1,5 @@
/*
-** $Id: lopcodes.c,v 1.39 2008/04/02 16:16:06 roberto Exp roberto $
+** $Id: lopcodes.c,v 1.40 2008/10/30 15:39:30 roberto Exp roberto $
** See Copyright Notice in lua.h
*/
@@ -13,7 +13,7 @@
/* ORDER OP */
-const char *const luaP_opnames[NUM_OPCODES+1] = {
+LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = {
"MOVE",
"LOADK",
"LOADBOOL",
@@ -60,7 +60,7 @@ const char *const luaP_opnames[NUM_OPCODES+1] = {
#define opmode(t,a,b,c,m) (((t)<<7) | ((a)<<6) | ((b)<<4) | ((c)<<2) | (m))
-const lu_byte luaP_opmodes[NUM_OPCODES] = {
+LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
/* T A B C mode opcode */
opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_MOVE */
,opmode(0, 1, OpArgK, OpArgN, iABx) /* OP_LOADK */
diff --git a/lopcodes.h b/lopcodes.h
index 77da09aa..bd8cc082 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
/*
-** $Id: lopcodes.h,v 1.131 2009/09/28 16:32:50 roberto Exp roberto $
+** $Id: lopcodes.h,v 1.132 2009/10/28 12:20:07 roberto Exp roberto $
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -270,7 +270,7 @@ enum OpArgMask {
OpArgK /* argument is a constant or register/constant */
};
-LUAI_DATA const lu_byte luaP_opmodes[NUM_OPCODES];
+LUAI_DDEC const lu_byte luaP_opmodes[NUM_OPCODES];
#define getOpMode(m) (cast(enum OpMode, luaP_opmodes[m] & 3))
#define getBMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 4) & 3))
@@ -279,7 +279,7 @@ LUAI_DATA const lu_byte luaP_opmodes[NUM_OPCODES];
#define testTMode(m) (luaP_opmodes[m] & (1 << 7))
-LUAI_DATA const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */
+LUAI_DDEC const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */
/* number of list items to accumulate before a SETLIST instruction */
diff --git a/ltests.h b/ltests.h
index 4a27d099..f2abb234 100644
--- a/ltests.h
+++ b/ltests.h
@@ -1,5 +1,5 @@
/*
-** $Id: ltests.h,v 2.24 2008/08/05 19:24:46 roberto Exp roberto $
+** $Id: ltests.h,v 2.25 2009/04/17 22:00:01 roberto Exp roberto $
** Internal Header for Debugging of the Lua Implementation
** See Copyright Notice in lua.h
*/
@@ -32,13 +32,13 @@ typedef struct Memcontrol {
unsigned long memlimit;
} Memcontrol;
-LUAI_DATA Memcontrol l_memcontrol;
+Memcontrol l_memcontrol;
/*
** generic variable for debug tricks
*/
-LUAI_DATA void *l_Trick;
+void *l_Trick;
void *debug_realloc (void *ud, void *block, size_t osize, size_t nsize);
diff --git a/ltm.c b/ltm.c
index 5ab2e8b4..3495658a 100644
--- a/ltm.c
+++ b/ltm.c
@@ -1,5 +1,5 @@
/*
-** $Id: ltm.c,v 2.8 2006/01/10 12:50:00 roberto Exp roberto $
+** $Id: ltm.c,v 2.9 2007/09/10 17:59:32 roberto Exp roberto $
** Tag methods
** See Copyright Notice in lua.h
*/
@@ -20,7 +20,7 @@
-const char *const luaT_typenames[] = {
+LUAI_DDEF const char *const luaT_typenames[] = {
"nil", "boolean", "userdata", "number",
"string", "table", "function", "userdata", "thread",
"proto", "upval"
diff --git a/ltm.h b/ltm.h
index 7f1c1e5d..64e867b8 100644
--- a/ltm.h
+++ b/ltm.h
@@ -1,5 +1,5 @@
/*
-** $Id: ltm.h,v 2.6 2005/06/06 13:30:25 roberto Exp roberto $
+** $Id: ltm.h,v 2.7 2007/09/10 17:59:32 roberto Exp roberto $
** Tag methods
** See Copyright Notice in lua.h
*/
@@ -43,7 +43,7 @@ typedef enum {
#define fasttm(l,et,e) gfasttm(G(l), et, e)
-LUAI_DATA const char *const luaT_typenames[];
+LUAI_DDEC const char *const luaT_typenames[];
LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename);
diff --git a/luaconf.h b/luaconf.h
index 8939dd27..d3454d3b 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
/*
-** $Id: luaconf.h,v 1.113 2009/11/16 15:51:03 roberto Exp roberto $
+** $Id: luaconf.h,v 1.114 2009/11/19 16:26:52 roberto Exp roberto $
** Configuration file for Lua
** See Copyright Notice in lua.h
*/
@@ -170,8 +170,9 @@
/*
@@ LUAI_FUNC is a mark for all extern functions that are not to be
@* exported to outside modules.
-@@ LUAI_DATA is a mark for all extern (const) variables that are not to
-@* be exported to outside modules.
+@@ LUAI_DDEF and LUAI_DDEC are marks for all extern (const) variables
+@* that are not to be exported to outside modules (LUAI_DDEF for
+@* definitions and LUAI_DDEC for declarations).
** CHANGE them if you need to mark them in some special way. Elf/gcc
** (versions 3.2 and later) mark them as "hidden" to optimize access
** when Lua is compiled as a shared library. Not all elf targets support
@@ -182,16 +183,19 @@
*/
#if defined(luaall_c)
#define LUAI_FUNC static
-#define LUAI_DATA extern
+#define LUAI_DDEC static
+#define LUAI_DDEF static
#elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
defined(__ELF__)
#define LUAI_FUNC __attribute__((visibility("hidden"))) extern
-#define LUAI_DATA LUAI_FUNC
+#define LUAI_DDEC LUAI_FUNC
+#define LUAI_DDEF /* empty */
#else
#define LUAI_FUNC extern
-#define LUAI_DATA extern
+#define LUAI_DDEC extern
+#define LUAI_DDEF /* empty */
#endif