diff options
-rw-r--r-- | lbaselib.c | 4 | ||||
-rw-r--r-- | lbitlib.c | 4 | ||||
-rw-r--r-- | ldblib.c | 4 | ||||
-rw-r--r-- | liolib.c | 4 | ||||
-rw-r--r-- | lmathlib.c | 4 | ||||
-rw-r--r-- | loadlib.c | 4 | ||||
-rw-r--r-- | loslib.c | 4 | ||||
-rw-r--r-- | lstrlib.c | 4 | ||||
-rw-r--r-- | ltablib.c | 4 | ||||
-rw-r--r-- | luaconf.h | 6 | ||||
-rw-r--r-- | lualib.h | 20 |
11 files changed, 32 insertions, 30 deletions
@@ -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 | ||
719 | LUALIB_API int luaopen_base (lua_State *L) { | 719 | LUAMOD_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; |
@@ -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 | ||
120 | LUALIB_API int luaopen_bit (lua_State *L) { | 120 | LUAMOD_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 | } |
@@ -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 | ||
380 | LUALIB_API int luaopen_debug (lua_State *L) { | 380 | LUAMOD_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 | } |
@@ -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 | ||
551 | LUALIB_API int luaopen_io (lua_State *L) { | 551 | LUAMOD_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); |
@@ -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 | */ |
265 | LUALIB_API int luaopen_math (lua_State *L) { | 265 | LUAMOD_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"); |
@@ -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 | ||
650 | LUALIB_API int luaopen_package (lua_State *L) { | 650 | LUAMOD_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"); |
@@ -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 | ||
267 | LUALIB_API int luaopen_os (lua_State *L) { | 267 | LUAMOD_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 | } |
@@ -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 | */ |
861 | LUALIB_API int luaopen_string (lua_State *L) { | 861 | LUAMOD_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"); |
@@ -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 | ||
284 | LUALIB_API int luaopen_table (lua_State *L) { | 284 | LUAMOD_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 | } |
@@ -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 | /* |
@@ -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" |
19 | LUALIB_API int (luaopen_base) (lua_State *L); | 19 | LUAMOD_API int (luaopen_base) (lua_State *L); |
20 | 20 | ||
21 | #define LUA_TABLIBNAME "table" | 21 | #define LUA_TABLIBNAME "table" |
22 | LUALIB_API int (luaopen_table) (lua_State *L); | 22 | LUAMOD_API int (luaopen_table) (lua_State *L); |
23 | 23 | ||
24 | #define LUA_IOLIBNAME "io" | 24 | #define LUA_IOLIBNAME "io" |
25 | LUALIB_API int (luaopen_io) (lua_State *L); | 25 | LUAMOD_API int (luaopen_io) (lua_State *L); |
26 | 26 | ||
27 | #define LUA_OSLIBNAME "os" | 27 | #define LUA_OSLIBNAME "os" |
28 | LUALIB_API int (luaopen_os) (lua_State *L); | 28 | LUAMOD_API int (luaopen_os) (lua_State *L); |
29 | 29 | ||
30 | #define LUA_STRLIBNAME "string" | 30 | #define LUA_STRLIBNAME "string" |
31 | LUALIB_API int (luaopen_string) (lua_State *L); | 31 | LUAMOD_API int (luaopen_string) (lua_State *L); |
32 | 32 | ||
33 | #define LUA_BITLIBNAME "bit" | 33 | #define LUA_BITLIBNAME "bit" |
34 | LUALIB_API int (luaopen_bit) (lua_State *L); | 34 | LUAMOD_API int (luaopen_bit) (lua_State *L); |
35 | 35 | ||
36 | #define LUA_MATHLIBNAME "math" | 36 | #define LUA_MATHLIBNAME "math" |
37 | LUALIB_API int (luaopen_math) (lua_State *L); | 37 | LUAMOD_API int (luaopen_math) (lua_State *L); |
38 | 38 | ||
39 | #define LUA_DBLIBNAME "debug" | 39 | #define LUA_DBLIBNAME "debug" |
40 | LUALIB_API int (luaopen_debug) (lua_State *L); | 40 | LUAMOD_API int (luaopen_debug) (lua_State *L); |
41 | 41 | ||
42 | #define LUA_LOADLIBNAME "package" | 42 | #define LUA_LOADLIBNAME "package" |
43 | LUALIB_API int (luaopen_package) (lua_State *L); | 43 | LUAMOD_API int (luaopen_package) (lua_State *L); |
44 | 44 | ||
45 | 45 | ||
46 | /* open all previous libraries */ | 46 | /* open all previous libraries */ |