diff options
Diffstat (limited to 'lauxlib.h')
-rw-r--r-- | lauxlib.h | 41 |
1 files changed, 23 insertions, 18 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.h,v 1.27 2000/10/05 12:14:08 roberto Exp roberto $ | 2 | ** $Id: lauxlib.h,v 1.28 2000/10/20 16:39:03 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -15,26 +15,31 @@ | |||
15 | #include "lua.h" | 15 | #include "lua.h" |
16 | 16 | ||
17 | 17 | ||
18 | #ifndef LUALIB_API | ||
19 | #define LUALIB_API extern | ||
20 | #endif | ||
21 | |||
22 | |||
18 | struct luaL_reg { | 23 | struct luaL_reg { |
19 | const char *name; | 24 | const char *name; |
20 | lua_CFunction func; | 25 | lua_CFunction func; |
21 | }; | 26 | }; |
22 | 27 | ||
23 | 28 | ||
24 | LUA_API void luaL_openlib (lua_State *L, const struct luaL_reg *l, int n); | 29 | LUALIB_API void luaL_openlib (lua_State *L, const struct luaL_reg *l, int n); |
25 | LUA_API void luaL_argerror (lua_State *L, int numarg, const char *extramsg); | 30 | LUALIB_API void luaL_argerror (lua_State *L, int numarg, const char *extramsg); |
26 | LUA_API const char *luaL_check_lstr (lua_State *L, int numArg, size_t *len); | 31 | LUALIB_API const char *luaL_check_lstr (lua_State *L, int numArg, size_t *len); |
27 | LUA_API const char *luaL_opt_lstr (lua_State *L, int numArg, const char *def, | 32 | LUALIB_API const char *luaL_opt_lstr (lua_State *L, int numArg, const char *def, |
28 | size_t *len); | 33 | size_t *len); |
29 | LUA_API double luaL_check_number (lua_State *L, int numArg); | 34 | LUALIB_API double luaL_check_number (lua_State *L, int numArg); |
30 | LUA_API double luaL_opt_number (lua_State *L, int numArg, double def); | 35 | LUALIB_API double luaL_opt_number (lua_State *L, int numArg, double def); |
31 | 36 | ||
32 | LUA_API void luaL_checkstack (lua_State *L, int space, const char *msg); | 37 | LUALIB_API void luaL_checkstack (lua_State *L, int space, const char *msg); |
33 | LUA_API void luaL_checktype (lua_State *L, int narg, int t); | 38 | LUALIB_API void luaL_checktype (lua_State *L, int narg, int t); |
34 | LUA_API void luaL_checkany (lua_State *L, int narg); | 39 | LUALIB_API void luaL_checkany (lua_State *L, int narg); |
35 | 40 | ||
36 | LUA_API void luaL_verror (lua_State *L, const char *fmt, ...); | 41 | LUALIB_API void luaL_verror (lua_State *L, const char *fmt, ...); |
37 | LUA_API int luaL_findstring (const char *name, const char *const list[]); | 42 | LUALIB_API int luaL_findstring (const char *name, const char *const list[]); |
38 | 43 | ||
39 | 44 | ||
40 | 45 | ||
@@ -80,12 +85,12 @@ typedef struct luaL_Buffer { | |||
80 | 85 | ||
81 | #define luaL_addsize(B,n) ((B)->p += (n)) | 86 | #define luaL_addsize(B,n) ((B)->p += (n)) |
82 | 87 | ||
83 | LUA_API void luaL_buffinit (lua_State *L, luaL_Buffer *B); | 88 | LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B); |
84 | LUA_API char *luaL_prepbuffer (luaL_Buffer *B); | 89 | LUALIB_API char *luaL_prepbuffer (luaL_Buffer *B); |
85 | LUA_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l); | 90 | LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l); |
86 | LUA_API void luaL_addstring (luaL_Buffer *B, const char *s); | 91 | LUALIB_API void luaL_addstring (luaL_Buffer *B, const char *s); |
87 | LUA_API void luaL_addvalue (luaL_Buffer *B); | 92 | LUALIB_API void luaL_addvalue (luaL_Buffer *B); |
88 | LUA_API void luaL_pushresult (luaL_Buffer *B); | 93 | LUALIB_API void luaL_pushresult (luaL_Buffer *B); |
89 | 94 | ||
90 | 95 | ||
91 | /* }====================================================== */ | 96 | /* }====================================================== */ |