aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lbaselib.c4
-rw-r--r--lbitlib.c4
-rw-r--r--ldblib.c4
-rw-r--r--liolib.c4
-rw-r--r--lmathlib.c4
-rw-r--r--loadlib.c4
-rw-r--r--loslib.c4
-rw-r--r--lstrlib.c4
-rw-r--r--ltablib.c4
-rw-r--r--luaconf.h6
-rw-r--r--lualib.h20
11 files changed, 32 insertions, 30 deletions
diff --git a/lbaselib.c b/lbaselib.c
index b639222b..16b58cf5 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.224 2009/11/16 15:51:03 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.225 2009/11/19 16:26:29 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -716,7 +716,7 @@ static void base_open (lua_State *L) {
716} 716}
717 717
718 718
719LUALIB_API int luaopen_base (lua_State *L) { 719LUAMOD_API int luaopen_base (lua_State *L) {
720 base_open(L); 720 base_open(L);
721 luaL_register(L, LUA_COLIBNAME, co_funcs); 721 luaL_register(L, LUA_COLIBNAME, co_funcs);
722 return 2; 722 return 2;
diff --git a/lbitlib.c b/lbitlib.c
index 4f715288..3aaec229 100644
--- a/lbitlib.c
+++ b/lbitlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: $ 2** $Id: lbitlib.c,v 1.1 2009/07/01 16:17:08 roberto Exp roberto $
3** Standard library for bitwise operations 3** Standard library for bitwise operations
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -117,7 +117,7 @@ static const luaL_Reg bitlib[] = {
117 117
118 118
119 119
120LUALIB_API int luaopen_bit (lua_State *L) { 120LUAMOD_API int luaopen_bit (lua_State *L) {
121 luaL_register(L, LUA_BITLIBNAME, bitlib); 121 luaL_register(L, LUA_BITLIBNAME, bitlib);
122 return 1; 122 return 1;
123} 123}
diff --git a/ldblib.c b/ldblib.c
index 671972df..c2294613 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldblib.c,v 1.115 2009/11/09 19:10:48 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.116 2009/11/18 15:50:18 roberto Exp roberto $
3** Interface from Lua to its debug API 3** Interface from Lua to its debug API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -377,7 +377,7 @@ static const luaL_Reg dblib[] = {
377}; 377};
378 378
379 379
380LUALIB_API int luaopen_debug (lua_State *L) { 380LUAMOD_API int luaopen_debug (lua_State *L) {
381 luaL_register(L, LUA_DBLIBNAME, dblib); 381 luaL_register(L, LUA_DBLIBNAME, dblib);
382 return 1; 382 return 1;
383} 383}
diff --git a/liolib.c b/liolib.c
index 7427806c..767f7979 100644
--- a/liolib.c
+++ b/liolib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: liolib.c,v 2.81 2009/08/28 13:51:57 roberto Exp roberto $ 2** $Id: liolib.c,v 2.82 2009/09/01 19:10:48 roberto Exp roberto $
3** Standard I/O (and system) library 3** Standard I/O (and system) library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -548,7 +548,7 @@ static void newfenv (lua_State *L, lua_CFunction cls) {
548} 548}
549 549
550 550
551LUALIB_API int luaopen_io (lua_State *L) { 551LUAMOD_API int luaopen_io (lua_State *L) {
552 createmeta(L); 552 createmeta(L);
553 /* create (private) environment (with fields IO_INPUT, IO_OUTPUT, __close) */ 553 /* create (private) environment (with fields IO_INPUT, IO_OUTPUT, __close) */
554 newfenv(L, io_fclose); 554 newfenv(L, io_fclose);
diff --git a/lmathlib.c b/lmathlib.c
index eca93ecc..391a31e7 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmathlib.c,v 1.72 2009/02/18 13:17:10 roberto Exp roberto $ 2** $Id: lmathlib.c,v 1.73 2009/03/17 17:55:39 roberto Exp roberto $
3** Standard mathematical library 3** Standard mathematical library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -262,7 +262,7 @@ static const luaL_Reg mathlib[] = {
262/* 262/*
263** Open math library 263** Open math library
264*/ 264*/
265LUALIB_API int luaopen_math (lua_State *L) { 265LUAMOD_API int luaopen_math (lua_State *L) {
266 luaL_register(L, LUA_MATHLIBNAME, mathlib); 266 luaL_register(L, LUA_MATHLIBNAME, mathlib);
267 lua_pushnumber(L, PI); 267 lua_pushnumber(L, PI);
268 lua_setfield(L, -2, "pi"); 268 lua_setfield(L, -2, "pi");
diff --git a/loadlib.c b/loadlib.c
index 65182591..0c3db013 100644
--- a/loadlib.c
+++ b/loadlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: loadlib.c,v 1.66 2009/10/05 16:44:33 roberto Exp roberto $ 2** $Id: loadlib.c,v 1.67 2009/11/16 15:51:19 roberto Exp roberto $
3** Dynamic library loader for Lua 3** Dynamic library loader for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5** 5**
@@ -647,7 +647,7 @@ static const lua_CFunction loaders[] =
647 {loader_preload, loader_Lua, loader_C, loader_Croot, NULL}; 647 {loader_preload, loader_Lua, loader_C, loader_Croot, NULL};
648 648
649 649
650LUALIB_API int luaopen_package (lua_State *L) { 650LUAMOD_API int luaopen_package (lua_State *L) {
651 int i; 651 int i;
652 /* create new type _LOADLIB */ 652 /* create new type _LOADLIB */
653 luaL_newmetatable(L, "_LOADLIB"); 653 luaL_newmetatable(L, "_LOADLIB");
diff --git a/loslib.c b/loslib.c
index 7ab3c4e9..70d5b1eb 100644
--- a/loslib.c
+++ b/loslib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: loslib.c,v 1.25 2009/08/25 19:58:08 roberto Exp roberto $ 2** $Id: loslib.c,v 1.26 2009/11/23 18:20:38 roberto Exp roberto $
3** Standard Operating System library 3** Standard Operating System library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -264,7 +264,7 @@ static const luaL_Reg syslib[] = {
264 264
265 265
266 266
267LUALIB_API int luaopen_os (lua_State *L) { 267LUAMOD_API int luaopen_os (lua_State *L) {
268 luaL_register(L, LUA_OSLIBNAME, syslib); 268 luaL_register(L, LUA_OSLIBNAME, syslib);
269 return 1; 269 return 1;
270} 270}
diff --git a/lstrlib.c b/lstrlib.c
index 6c8e1ba4..6ad7ca69 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.142 2009/02/03 19:39:19 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.143 2009/06/18 16:51:03 roberto Exp roberto $
3** Standard library for string operations and pattern-matching 3** Standard library for string operations and pattern-matching
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -858,7 +858,7 @@ static void createmetatable (lua_State *L) {
858/* 858/*
859** Open string library 859** Open string library
860*/ 860*/
861LUALIB_API int luaopen_string (lua_State *L) { 861LUAMOD_API int luaopen_string (lua_State *L) {
862 luaL_register(L, LUA_STRLIBNAME, strlib); 862 luaL_register(L, LUA_STRLIBNAME, strlib);
863#if defined(LUA_COMPAT_GFIND) 863#if defined(LUA_COMPAT_GFIND)
864 lua_getfield(L, -1, "gmatch"); 864 lua_getfield(L, -1, "gmatch");
diff --git a/ltablib.c b/ltablib.c
index 2e747edb..e2fe976d 100644
--- a/ltablib.c
+++ b/ltablib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltablib.c,v 1.46 2009/03/23 14:26:12 roberto Exp roberto $ 2** $Id: ltablib.c,v 1.47 2009/06/17 17:53:50 roberto Exp roberto $
3** Library for Table Manipulation 3** Library for Table Manipulation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -281,7 +281,7 @@ static const luaL_Reg tab_funcs[] = {
281}; 281};
282 282
283 283
284LUALIB_API int luaopen_table (lua_State *L) { 284LUAMOD_API int luaopen_table (lua_State *L) {
285 luaL_register(L, LUA_TABLIBNAME, tab_funcs); 285 luaL_register(L, LUA_TABLIBNAME, tab_funcs);
286 return 1; 286 return 1;
287} 287}
diff --git a/luaconf.h b/luaconf.h
index d3454d3b..3d2edf8f 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: luaconf.h,v 1.114 2009/11/19 16:26:52 roberto Exp roberto $ 2** $Id: luaconf.h,v 1.115 2009/11/19 19:06:52 roberto Exp roberto $
3** Configuration file for Lua 3** Configuration file for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -143,7 +143,8 @@
143 143
144/* 144/*
145@@ LUA_API is a mark for all core API functions. 145@@ LUA_API is a mark for all core API functions.
146@@ LUALIB_API is a mark for all standard library functions. 146@@ LUALIB_API is a mark for all auxiliary library functions.
147@@ LUAMOD_API is a mark for all standard library opening functions.
147** CHANGE them if you need to define those functions in some special way. 148** CHANGE them if you need to define those functions in some special way.
148** For instance, if you want to create one Windows DLL with the core and 149** For instance, if you want to create one Windows DLL with the core and
149** the libraries, you may want to use the following definition (define 150** the libraries, you may want to use the following definition (define
@@ -165,6 +166,7 @@
165 166
166/* more often than not the libs go together with the core */ 167/* more often than not the libs go together with the core */
167#define LUALIB_API LUA_API 168#define LUALIB_API LUA_API
169#define LUAMOD_API LUALIB_API
168 170
169 171
170/* 172/*
diff --git a/lualib.h b/lualib.h
index bb4ea06f..178083c5 100644
--- a/lualib.h
+++ b/lualib.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lualib.h,v 1.37 2006/09/11 14:07:24 roberto Exp roberto $ 2** $Id: lualib.h,v 1.38 2009/07/01 16:16:40 roberto Exp roberto $
3** Lua standard libraries 3** Lua standard libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -16,31 +16,31 @@
16 16
17 17
18#define LUA_COLIBNAME "coroutine" 18#define LUA_COLIBNAME "coroutine"
19LUALIB_API int (luaopen_base) (lua_State *L); 19LUAMOD_API int (luaopen_base) (lua_State *L);
20 20
21#define LUA_TABLIBNAME "table" 21#define LUA_TABLIBNAME "table"
22LUALIB_API int (luaopen_table) (lua_State *L); 22LUAMOD_API int (luaopen_table) (lua_State *L);
23 23
24#define LUA_IOLIBNAME "io" 24#define LUA_IOLIBNAME "io"
25LUALIB_API int (luaopen_io) (lua_State *L); 25LUAMOD_API int (luaopen_io) (lua_State *L);
26 26
27#define LUA_OSLIBNAME "os" 27#define LUA_OSLIBNAME "os"
28LUALIB_API int (luaopen_os) (lua_State *L); 28LUAMOD_API int (luaopen_os) (lua_State *L);
29 29
30#define LUA_STRLIBNAME "string" 30#define LUA_STRLIBNAME "string"
31LUALIB_API int (luaopen_string) (lua_State *L); 31LUAMOD_API int (luaopen_string) (lua_State *L);
32 32
33#define LUA_BITLIBNAME "bit" 33#define LUA_BITLIBNAME "bit"
34LUALIB_API int (luaopen_bit) (lua_State *L); 34LUAMOD_API int (luaopen_bit) (lua_State *L);
35 35
36#define LUA_MATHLIBNAME "math" 36#define LUA_MATHLIBNAME "math"
37LUALIB_API int (luaopen_math) (lua_State *L); 37LUAMOD_API int (luaopen_math) (lua_State *L);
38 38
39#define LUA_DBLIBNAME "debug" 39#define LUA_DBLIBNAME "debug"
40LUALIB_API int (luaopen_debug) (lua_State *L); 40LUAMOD_API int (luaopen_debug) (lua_State *L);
41 41
42#define LUA_LOADLIBNAME "package" 42#define LUA_LOADLIBNAME "package"
43LUALIB_API int (luaopen_package) (lua_State *L); 43LUAMOD_API int (luaopen_package) (lua_State *L);
44 44
45 45
46/* open all previous libraries */ 46/* open all previous libraries */