diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-30 17:00:59 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-30 17:00:59 -0300 |
commit | 2c670baf24115d9c59b5869b89873b93af8b779d (patch) | |
tree | 30ec1b85988ea36bd74403bd32a29a362def36d4 /lauxlib.h | |
parent | fdafd4f4a88d1584dea900517445a17d87f8b82f (diff) | |
download | lua-2c670baf24115d9c59b5869b89873b93af8b779d.tar.gz lua-2c670baf24115d9c59b5869b89873b93af8b779d.tar.bz2 lua-2c670baf24115d9c59b5869b89873b93af8b779d.zip |
avoid the use of "obvious" names in header files to avoid conflicts
Diffstat (limited to 'lauxlib.h')
-rw-r--r-- | lauxlib.h | 24 |
1 files changed, 11 insertions, 13 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.h,v 1.51 2002/07/01 19:23:58 roberto Exp roberto $ | 2 | ** $Id: lauxlib.h,v 1.52 2002/08/08 20:08:41 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 | */ |
@@ -30,31 +30,29 @@ typedef struct luaL_reg { | |||
30 | LUALIB_API void luaL_openlib (lua_State *L, const luaL_reg *l, int nup); | 30 | LUALIB_API void luaL_openlib (lua_State *L, const luaL_reg *l, int nup); |
31 | LUALIB_API void luaL_opennamedlib (lua_State *L, const char *libname, | 31 | LUALIB_API void luaL_opennamedlib (lua_State *L, const char *libname, |
32 | const luaL_reg *l, int nup); | 32 | const luaL_reg *l, int nup); |
33 | LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *event); | 33 | LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *e); |
34 | LUALIB_API int luaL_typerror (lua_State *L, int narg, const char *tname); | 34 | LUALIB_API int luaL_typerror (lua_State *L, int narg, const char *tname); |
35 | LUALIB_API int luaL_argerror (lua_State *L, int numarg, const char *extramsg); | 35 | LUALIB_API int luaL_argerror (lua_State *L, int numarg, const char *extramsg); |
36 | LUALIB_API const char *luaL_check_lstr (lua_State *L, int numArg, | 36 | LUALIB_API const char *luaL_check_lstr (lua_State *L, int numArg, size_t *l); |
37 | size_t *len); | ||
38 | LUALIB_API const char *luaL_opt_lstr (lua_State *L, int numArg, | 37 | LUALIB_API const char *luaL_opt_lstr (lua_State *L, int numArg, |
39 | const char *def, size_t *len); | 38 | const char *def, size_t *l); |
40 | LUALIB_API lua_Number luaL_check_number (lua_State *L, int numArg); | 39 | LUALIB_API lua_Number luaL_check_number (lua_State *L, int numArg); |
41 | LUALIB_API lua_Number luaL_opt_number (lua_State *L, int nArg, lua_Number def); | 40 | LUALIB_API lua_Number luaL_opt_number (lua_State *L, int nArg, lua_Number def); |
42 | 41 | ||
43 | LUALIB_API void luaL_check_stack (lua_State *L, int space, const char *msg); | 42 | LUALIB_API void luaL_check_stack (lua_State *L, int sz, const char *msg); |
44 | LUALIB_API void luaL_check_type (lua_State *L, int narg, int t); | 43 | LUALIB_API void luaL_check_type (lua_State *L, int narg, int t); |
45 | LUALIB_API void luaL_check_any (lua_State *L, int narg); | 44 | LUALIB_API void luaL_check_any (lua_State *L, int narg); |
46 | 45 | ||
47 | LUALIB_API void luaL_where (lua_State *L, int level); | 46 | LUALIB_API void luaL_where (lua_State *L, int lvl); |
48 | LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...); | 47 | LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...); |
49 | 48 | ||
50 | LUALIB_API int luaL_findstring (const char *name, | 49 | LUALIB_API int luaL_findstring (const char *st, const char *const lst[]); |
51 | const char *const list[]); | ||
52 | 50 | ||
53 | LUALIB_API int luaL_ref (lua_State *L, int t); | 51 | LUALIB_API int luaL_ref (lua_State *L, int t); |
54 | LUALIB_API void luaL_unref (lua_State *L, int t, int ref); | 52 | LUALIB_API void luaL_unref (lua_State *L, int t, int ref); |
55 | 53 | ||
56 | LUALIB_API int luaL_loadfile (lua_State *L, const char *filename); | 54 | LUALIB_API int luaL_loadfile (lua_State *L, const char *filename); |
57 | LUALIB_API int luaL_loadbuffer (lua_State *L, const char *buff, size_t size, | 55 | LUALIB_API int luaL_loadbuffer (lua_State *L, const char *buff, size_t sz, |
58 | const char *name); | 56 | const char *name); |
59 | 57 | ||
60 | 58 | ||
@@ -89,7 +87,7 @@ LUALIB_API int luaL_loadbuffer (lua_State *L, const char *buff, size_t size, | |||
89 | 87 | ||
90 | typedef struct luaL_Buffer { | 88 | typedef struct luaL_Buffer { |
91 | char *p; /* current position in buffer */ | 89 | char *p; /* current position in buffer */ |
92 | int level; | 90 | int lvl; /* number of strings in the stack (level) */ |
93 | lua_State *L; | 91 | lua_State *L; |
94 | char buffer[LUAL_BUFFERSIZE]; | 92 | char buffer[LUAL_BUFFERSIZE]; |
95 | } luaL_Buffer; | 93 | } luaL_Buffer; |
@@ -121,8 +119,8 @@ LUALIB_API void luaL_pushresult (luaL_Buffer *B); | |||
121 | 119 | ||
122 | LUALIB_API int lua_dofile (lua_State *L, const char *filename); | 120 | LUALIB_API int lua_dofile (lua_State *L, const char *filename); |
123 | LUALIB_API int lua_dostring (lua_State *L, const char *str); | 121 | LUALIB_API int lua_dostring (lua_State *L, const char *str); |
124 | LUALIB_API int lua_dobuffer (lua_State *L, const char *buff, size_t size, | 122 | LUALIB_API int lua_dobuffer (lua_State *L, const char *buff, size_t sz, |
125 | const char *name); | 123 | const char *n); |
126 | 124 | ||
127 | 125 | ||
128 | #endif | 126 | #endif |