diff options
Diffstat (limited to 'lua/include/lauxlib.h')
-rw-r--r-- | lua/include/lauxlib.h | 117 |
1 files changed, 76 insertions, 41 deletions
diff --git a/lua/include/lauxlib.h b/lua/include/lauxlib.h index 24bf673ec..1b595503f 100644 --- a/lua/include/lauxlib.h +++ b/lua/include/lauxlib.h @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.h,v 1.1 2004/03/16 21:58:30 niemeyer Exp $ +** $Id: lauxlib.h,v 1.2 2004/03/23 02:27:55 jbj Exp $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -22,45 +22,71 @@ typedef struct luaL_reg { +/*@null@*/ const char *name; +/*@dependent@*/ /*@null@*/ lua_CFunction func; } luaL_reg; LUALIB_API void luaL_openlib (lua_State *L, const char *libname, - const luaL_reg *l, int nup); -LUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *e); -LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *e); -LUALIB_API int luaL_typerror (lua_State *L, int narg, const char *tname); -LUALIB_API int luaL_argerror (lua_State *L, int numarg, const char *extramsg); -LUALIB_API const char *luaL_checklstring (lua_State *L, int numArg, size_t *l); + const luaL_reg *l, int nup) + /*@*/; +LUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *e) + /*@*/; +LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *e) + /*@*/; +LUALIB_API int luaL_typerror (lua_State *L, int narg, const char *tname) + /*@*/; +LUALIB_API int luaL_argerror (lua_State *L, int numarg, const char *extramsg) + /*@*/; +LUALIB_API const char *luaL_checklstring (lua_State *L, int numArg, size_t *l) + /*@*/; LUALIB_API const char *luaL_optlstring (lua_State *L, int numArg, - const char *def, size_t *l); -LUALIB_API lua_Number luaL_checknumber (lua_State *L, int numArg); -LUALIB_API lua_Number luaL_optnumber (lua_State *L, int nArg, lua_Number def); - -LUALIB_API void luaL_checkstack (lua_State *L, int sz, const char *msg); -LUALIB_API void luaL_checktype (lua_State *L, int narg, int t); -LUALIB_API void luaL_checkany (lua_State *L, int narg); - -LUALIB_API int luaL_newmetatable (lua_State *L, const char *tname); -LUALIB_API void luaL_getmetatable (lua_State *L, const char *tname); -LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname); - -LUALIB_API void luaL_where (lua_State *L, int lvl); -LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...); - -LUALIB_API int luaL_findstring (const char *st, const char *const lst[]); - -LUALIB_API int luaL_ref (lua_State *L, int t); -LUALIB_API void luaL_unref (lua_State *L, int t, int ref); - -LUALIB_API int luaL_getn (lua_State *L, int t); -LUALIB_API void luaL_setn (lua_State *L, int t, int n); - -LUALIB_API int luaL_loadfile (lua_State *L, const char *filename); + const char *def, size_t *l) + /*@*/; +LUALIB_API lua_Number luaL_checknumber (lua_State *L, int numArg) + /*@*/; +LUALIB_API lua_Number luaL_optnumber (lua_State *L, int nArg, lua_Number def) + /*@*/; + +LUALIB_API void luaL_checkstack (lua_State *L, int sz, const char *msg) + /*@*/; +LUALIB_API void luaL_checktype (lua_State *L, int narg, int t) + /*@*/; +LUALIB_API void luaL_checkany (lua_State *L, int narg) + /*@*/; + +LUALIB_API int luaL_newmetatable (lua_State *L, const char *tname) + /*@*/; +LUALIB_API void luaL_getmetatable (lua_State *L, const char *tname) + /*@*/; +LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) + /*@*/; + +LUALIB_API void luaL_where (lua_State *L, int lvl) + /*@*/; +LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...) + /*@*/; + +LUALIB_API int luaL_findstring (const char *st, const char *const lst[]) + /*@*/; + +LUALIB_API int luaL_ref (lua_State *L, int t) + /*@*/; +LUALIB_API void luaL_unref (lua_State *L, int t, int ref) + /*@*/; + +LUALIB_API int luaL_getn (lua_State *L, int t) + /*@*/; +LUALIB_API void luaL_setn (lua_State *L, int t, int n) + /*@*/; + +LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) + /*@*/; LUALIB_API int luaL_loadbuffer (lua_State *L, const char *buff, size_t sz, - const char *name); + const char *name) + /*@*/; @@ -105,12 +131,18 @@ typedef struct luaL_Buffer { #define luaL_addsize(B,n) ((B)->p += (n)) -LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B); -LUALIB_API char *luaL_prepbuffer (luaL_Buffer *B); -LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l); -LUALIB_API void luaL_addstring (luaL_Buffer *B, const char *s); -LUALIB_API void luaL_addvalue (luaL_Buffer *B); -LUALIB_API void luaL_pushresult (luaL_Buffer *B); +LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B) + /*@*/; +LUALIB_API char *luaL_prepbuffer (luaL_Buffer *B) + /*@*/; +LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l) + /*@*/; +LUALIB_API void luaL_addstring (luaL_Buffer *B, const char *s) + /*@*/; +LUALIB_API void luaL_addvalue (luaL_Buffer *B) + /*@*/; +LUALIB_API void luaL_pushresult (luaL_Buffer *B) + /*@*/; /* }====================================================== */ @@ -121,10 +153,13 @@ LUALIB_API void luaL_pushresult (luaL_Buffer *B); ** Compatibility macros and functions */ -LUALIB_API int lua_dofile (lua_State *L, const char *filename); -LUALIB_API int lua_dostring (lua_State *L, const char *str); +LUALIB_API int lua_dofile (lua_State *L, const char *filename) + /*@*/; +LUALIB_API int lua_dostring (lua_State *L, const char *str) + /*@*/; LUALIB_API int lua_dobuffer (lua_State *L, const char *buff, size_t sz, - const char *n); + const char *n) + /*@*/; #define luaL_check_lstr luaL_checklstring |