diff options
author | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-09-11 23:20:16 +0200 |
---|---|---|
committer | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-09-11 23:20:16 +0200 |
commit | a1eb1f41d91572fc0ad4f8805d946c8bdbdb8d2a (patch) | |
tree | 835026e58e9586283893445133570cd526f78857 /lua/include | |
parent | 32419bbba54b1e3847d5890d990edf7012a7dada (diff) | |
download | librpm-tizen-a1eb1f41d91572fc0ad4f8805d946c8bdbdb8d2a.tar.gz librpm-tizen-a1eb1f41d91572fc0ad4f8805d946c8bdbdb8d2a.tar.bz2 librpm-tizen-a1eb1f41d91572fc0ad4f8805d946c8bdbdb8d2a.zip |
Remove splint tags.
Diffstat (limited to 'lua/include')
-rw-r--r-- | lua/include/lauxlib.h | 123 | ||||
-rw-r--r-- | lua/include/lua.h | 246 | ||||
-rw-r--r-- | lua/include/lualib.h | 21 |
3 files changed, 126 insertions, 264 deletions
diff --git a/lua/include/lauxlib.h b/lua/include/lauxlib.h index a06d816c5..da70640e6 100644 --- a/lua/include/lauxlib.h +++ b/lua/include/lauxlib.h @@ -22,74 +22,45 @@ 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) - /*@modifies L @*/; -LUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *e) - /*@modifies L @*/; -LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *e) - /*@modifies L @*/; -LUALIB_API int luaL_typerror (lua_State *L, int narg, const char *tname) - /*@modifies L @*/; -LUALIB_API int luaL_argerror (lua_State *L, int numarg, const char *extramsg) - /*@modifies L @*/; -/*@observer@*/ -LUALIB_API const char *luaL_checklstring (lua_State *L, int numArg, size_t *l) - /*@modifies L, *l @*/; -/*@observer@*/ + 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) - /*@modifies L, *l @*/; -LUALIB_API lua_Number luaL_checknumber (lua_State *L, int numArg) - /*@modifies L @*/; -LUALIB_API lua_Number luaL_optnumber (lua_State *L, int nArg, lua_Number def) - /*@modifies L @*/; - -LUALIB_API void luaL_checkstack (lua_State *L, int sz, const char *msg) - /*@modifies L @*/; -LUALIB_API void luaL_checktype (lua_State *L, int narg, int t) - /*@modifies L @*/; -LUALIB_API void luaL_checkany (lua_State *L, int narg) - /*@modifies L @*/; - -LUALIB_API int luaL_newmetatable (lua_State *L, const char *tname) - /*@modifies L @*/; -LUALIB_API void luaL_getmetatable (lua_State *L, const char *tname) - /*@modifies L @*/; -LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) - /*@modifies L @*/; - -LUALIB_API void luaL_where (lua_State *L, int lvl) - /*@modifies L @*/; -LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...) - /*@modifies L @*/; - -LUALIB_API int luaL_findstring (const char *st, const char *const lst[]) - /*@*/; - -LUALIB_API int luaL_ref (lua_State *L, int t) - /*@modifies L @*/; -LUALIB_API void luaL_unref (lua_State *L, int t, int ref) - /*@modifies L @*/; - -LUALIB_API int luaL_getn (lua_State *L, int t) - /*@modifies L @*/; -LUALIB_API void luaL_setn (lua_State *L, int t, int n) - /*@modifies L @*/; - -LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) - /*@globals fileSystem @*/ - /*@modifies L, fileSystem @*/; + 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) - /*@modifies L @*/; + const char *name); @@ -122,7 +93,6 @@ LUALIB_API int luaL_loadbuffer (lua_State *L, const char *buff, size_t sz, typedef struct luaL_Buffer { -/*@dependent@*/ char *p; /* current position in buffer */ int lvl; /* number of strings in the stack (level) */ lua_State *L; @@ -135,19 +105,12 @@ typedef struct luaL_Buffer { #define luaL_addsize(B,n) ((B)->p += (n)) -LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B) - /*@modifies L, B @*/; -/*@dependent@*/ -LUALIB_API char *luaL_prepbuffer (luaL_Buffer *B) - /*@modifies B @*/; -LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l) - /*@modifies B @*/; -LUALIB_API void luaL_addstring (luaL_Buffer *B, const char *s) - /*@modifies B @*/; -LUALIB_API void luaL_addvalue (luaL_Buffer *B) - /*@modifies B @*/; -LUALIB_API void luaL_pushresult (luaL_Buffer *B) - /*@modifies 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); /* }====================================================== */ @@ -158,16 +121,10 @@ LUALIB_API void luaL_pushresult (luaL_Buffer *B) ** Compatibility macros and functions */ -LUALIB_API int lua_dofile (lua_State *L, const char *filename) - /*@globals fileSystem @*/ - /*@modifies L, fileSystem @*/; -LUALIB_API int lua_dostring (lua_State *L, const char *str) - /*@globals fileSystem @*/ - /*@modifies L, fileSystem @*/; +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) - /*@globals fileSystem @*/ - /*@modifies L, fileSystem @*/; + const char *n); #define luaL_check_lstr luaL_checklstring diff --git a/lua/include/lua.h b/lua/include/lua.h index ff4e97fb7..f3bb3166c 100644 --- a/lua/include/lua.h +++ b/lua/include/lua.h @@ -99,194 +99,125 @@ typedef LUA_NUMBER lua_Number; /* ** state manipulation */ -LUA_API lua_State *lua_open (void) - /*@*/; -LUA_API void lua_close (lua_State *L) - /*@modifies L @*/; -LUA_API lua_State *lua_newthread (lua_State *L) - /*@modifies L @*/; +LUA_API lua_State *lua_open (void); +LUA_API void lua_close (lua_State *L); +LUA_API lua_State *lua_newthread (lua_State *L); -LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) - /*@modifies L @*/; +LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf); /* ** basic stack manipulation */ -LUA_API int lua_gettop (lua_State *L) - /*@*/; -LUA_API void lua_settop (lua_State *L, int idx) - /*@modifies L @*/; -LUA_API void lua_pushvalue (lua_State *L, int idx) - /*@modifies L @*/; -LUA_API void lua_remove (lua_State *L, int idx) - /*@modifies L @*/; -LUA_API void lua_insert (lua_State *L, int idx) - /*@modifies L @*/; -LUA_API void lua_replace (lua_State *L, int idx) - /*@modifies L @*/; -LUA_API int lua_checkstack (lua_State *L, int sz) - /*@modifies L @*/; - -LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) - /*@modifies from, to @*/; +LUA_API int lua_gettop (lua_State *L); +LUA_API void lua_settop (lua_State *L, int idx); +LUA_API void lua_pushvalue (lua_State *L, int idx); +LUA_API void lua_remove (lua_State *L, int idx); +LUA_API void lua_insert (lua_State *L, int idx); +LUA_API void lua_replace (lua_State *L, int idx); +LUA_API int lua_checkstack (lua_State *L, int sz); + +LUA_API void lua_xmove (lua_State *from, lua_State *to, int n); /* ** access functions (stack -> C) */ -LUA_API int lua_isnumber (lua_State *L, int idx) - /*@*/; -LUA_API int lua_isstring (lua_State *L, int idx) - /*@*/; -LUA_API int lua_iscfunction (lua_State *L, int idx) - /*@*/; -LUA_API int lua_isuserdata (lua_State *L, int idx) - /*@*/; -LUA_API int lua_type (lua_State *L, int idx) - /*@*/; -/*@observer@*/ -LUA_API const char *lua_typename (lua_State *L, int tp) - /*@*/; - -LUA_API int lua_equal (lua_State *L, int idx1, int idx2) - /*@modifies L @*/; -LUA_API int lua_rawequal (lua_State *L, int idx1, int idx2) - /*@*/; -LUA_API int lua_lessthan (lua_State *L, int idx1, int idx2) - /*@modifies L @*/; - -LUA_API lua_Number lua_tonumber (lua_State *L, int idx) - /*@*/; -LUA_API int lua_toboolean (lua_State *L, int idx) - /*@*/; -/*@observer@*/ -LUA_API const char *lua_tostring (lua_State *L, int idx) - /*@modifies L @*/; -LUA_API size_t lua_strlen (lua_State *L, int idx) - /*@modifies L @*/; -LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) - /*@*/; -LUA_API void *lua_touserdata (lua_State *L, int idx) - /*@*/; -LUA_API lua_State *lua_tothread (lua_State *L, int idx) - /*@*/; -LUA_API const void *lua_topointer (lua_State *L, int idx) - /*@*/; +LUA_API int lua_isnumber (lua_State *L, int idx); +LUA_API int lua_isstring (lua_State *L, int idx); +LUA_API int lua_iscfunction (lua_State *L, int idx); +LUA_API int lua_isuserdata (lua_State *L, int idx); +LUA_API int lua_type (lua_State *L, int idx); +LUA_API const char *lua_typename (lua_State *L, int tp); + +LUA_API int lua_equal (lua_State *L, int idx1, int idx2); +LUA_API int lua_rawequal (lua_State *L, int idx1, int idx2); +LUA_API int lua_lessthan (lua_State *L, int idx1, int idx2); + +LUA_API lua_Number lua_tonumber (lua_State *L, int idx); +LUA_API int lua_toboolean (lua_State *L, int idx); +LUA_API const char *lua_tostring (lua_State *L, int idx); +LUA_API size_t lua_strlen (lua_State *L, int idx); +LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx); +LUA_API void *lua_touserdata (lua_State *L, int idx); +LUA_API lua_State *lua_tothread (lua_State *L, int idx); +LUA_API const void *lua_topointer (lua_State *L, int idx); /* ** push functions (C -> stack) */ -LUA_API void lua_pushnil (lua_State *L) - /*@modifies L @*/; -LUA_API void lua_pushnumber (lua_State *L, lua_Number n) - /*@modifies L @*/; -LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t l) - /*@modifies L @*/; -LUA_API void lua_pushstring (lua_State *L, const char *s) - /*@modifies L @*/; -/*@observer@*/ +LUA_API void lua_pushnil (lua_State *L); +LUA_API void lua_pushnumber (lua_State *L, lua_Number n); +LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t l); +LUA_API void lua_pushstring (lua_State *L, const char *s); LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt, - va_list argp) - /*@modifies L @*/; -/*@observer@*/ -LUA_API const char *lua_pushfstring (lua_State *L, const char *fmt, ...) - /*@modifies L @*/; -LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) - /*@modifies L @*/; -LUA_API void lua_pushboolean (lua_State *L, int b) - /*@modifies L @*/; -LUA_API void lua_pushlightuserdata (lua_State *L, void *p) - /*@modifies L @*/; + va_list argp); +LUA_API const char *lua_pushfstring (lua_State *L, const char *fmt, ...); +LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n); +LUA_API void lua_pushboolean (lua_State *L, int b); +LUA_API void lua_pushlightuserdata (lua_State *L, void *p); /* ** get functions (Lua -> stack) */ -LUA_API void lua_gettable (lua_State *L, int idx) - /*@modifies L @*/; -LUA_API void lua_rawget (lua_State *L, int idx) - /*@modifies L @*/; -LUA_API void lua_rawgeti (lua_State *L, int idx, int n) - /*@modifies L @*/; -LUA_API void lua_newtable (lua_State *L) - /*@modifies L @*/; -LUA_API void *lua_newuserdata (lua_State *L, size_t sz) - /*@modifies L @*/; -LUA_API int lua_getmetatable (lua_State *L, int objindex) - /*@modifies L @*/; -LUA_API void lua_getfenv (lua_State *L, int idx) - /*@modifies L @*/; +LUA_API void lua_gettable (lua_State *L, int idx); +LUA_API void lua_rawget (lua_State *L, int idx); +LUA_API void lua_rawgeti (lua_State *L, int idx, int n); +LUA_API void lua_newtable (lua_State *L); +LUA_API void *lua_newuserdata (lua_State *L, size_t sz); +LUA_API int lua_getmetatable (lua_State *L, int objindex); +LUA_API void lua_getfenv (lua_State *L, int idx); /* ** set functions (stack -> Lua) */ -LUA_API void lua_settable (lua_State *L, int idx) - /*@modifies L @*/; -LUA_API void lua_rawset (lua_State *L, int idx) - /*@modifies L @*/; -LUA_API void lua_rawseti (lua_State *L, int idx, int n) - /*@modifies L @*/; -LUA_API int lua_setmetatable (lua_State *L, int objindex) - /*@modifies L @*/; -LUA_API int lua_setfenv (lua_State *L, int idx) - /*@modifies L @*/; +LUA_API void lua_settable (lua_State *L, int idx); +LUA_API void lua_rawset (lua_State *L, int idx); +LUA_API void lua_rawseti (lua_State *L, int idx, int n); +LUA_API int lua_setmetatable (lua_State *L, int objindex); +LUA_API int lua_setfenv (lua_State *L, int idx); /* ** `load' and `call' functions (load and run Lua code) */ -LUA_API void lua_call (lua_State *L, int nargs, int nresults) - /*@modifies L @*/; -LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errfunc) - /*@modifies L @*/; -LUA_API int lua_cpcall (lua_State *L, lua_CFunction func, void *ud) - /*@modifies L @*/; +LUA_API void lua_call (lua_State *L, int nargs, int nresults); +LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errfunc); +LUA_API int lua_cpcall (lua_State *L, lua_CFunction func, void *ud); LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *dt, - const char *chunkname) - /*@modifies L @*/; + const char *chunkname); -LUA_API int lua_dump (lua_State *L, lua_Chunkwriter writer, void *data) - /*@*/; +LUA_API int lua_dump (lua_State *L, lua_Chunkwriter writer, void *data); /* ** coroutine functions */ -LUA_API int lua_yield (lua_State *L, int nresults) - /*@modifies L @*/; -LUA_API int lua_resume (lua_State *L, int narg) - /*@modifies L @*/; +LUA_API int lua_yield (lua_State *L, int nresults); +LUA_API int lua_resume (lua_State *L, int narg); /* ** garbage-collection functions */ -LUA_API int lua_getgcthreshold (lua_State *L) - /*@*/; -LUA_API int lua_getgccount (lua_State *L) - /*@*/; -LUA_API void lua_setgcthreshold (lua_State *L, int newthreshold) - /*@modifies L @*/; +LUA_API int lua_getgcthreshold (lua_State *L); +LUA_API int lua_getgccount (lua_State *L); +LUA_API void lua_setgcthreshold (lua_State *L, int newthreshold); /* ** miscellaneous functions */ -/*@observer@*/ -LUA_API const char *lua_version (void) - /*@*/; +LUA_API const char *lua_version (void); -LUA_API int lua_error (lua_State *L) - /*@modifies L @*/; +LUA_API int lua_error (lua_State *L); -LUA_API int lua_next (lua_State *L, int idx) - /*@modifies L @*/; +LUA_API int lua_next (lua_State *L, int idx); -LUA_API void lua_concat (lua_State *L, int n) - /*@modifies L @*/; +LUA_API void lua_concat (lua_State *L, int n); @@ -328,8 +259,7 @@ LUA_API void lua_concat (lua_State *L, int n) */ -LUA_API int lua_pushupvalues (lua_State *L) - /*@modifies L @*/; +LUA_API int lua_pushupvalues (lua_State *L); #define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) #define lua_setglobal(L,s) \ @@ -402,44 +332,26 @@ typedef struct lua_Debug lua_Debug; /* activation record */ typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); -LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) - /*@modifies L, ar @*/; -LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) - /*@modifies L, ar @*/; -/*@observer@*/ -LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n) - /*@modifies L @*/; -/*@observer@*/ -LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) - /*@modifies L @*/; -/*@observer@*/ -LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) - /*@modifies L @*/; -/*@observer@*/ -LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) - /*@modifies L @*/; - -LUA_API int lua_sethook (lua_State *L, /*@null@*/ lua_Hook func, int mask, int count) - /*@modifies L @*/; -LUA_API lua_Hook lua_gethook (lua_State *L) - /*@modifies L @*/; -LUA_API int lua_gethookmask (lua_State *L) - /*@modifies L @*/; -LUA_API int lua_gethookcount (lua_State *L) - /*@modifies L @*/; +LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar); +LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar); +LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); +LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); +LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n); +LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n); + +LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count); +LUA_API lua_Hook lua_gethook (lua_State *L); +LUA_API int lua_gethookmask (lua_State *L); +LUA_API int lua_gethookcount (lua_State *L); #define LUA_IDSIZE 60 struct lua_Debug { int event; -/*@observer@*/ const char *name; /* (n) */ -/*@observer@*/ const char *namewhat; /* (n) `global', `local', `field', `method' */ -/*@observer@*/ const char *what; /* (S) `Lua', `C', `main', `tail' */ -/*@observer@*/ const char *source; /* (S) */ int currentline; /* (l) */ int nups; /* (u) number of upvalues */ diff --git a/lua/include/lualib.h b/lua/include/lualib.h index bdbb51447..31d018074 100644 --- a/lua/include/lualib.h +++ b/lua/include/lualib.h @@ -17,33 +17,26 @@ #define LUA_COLIBNAME "coroutine" -LUALIB_API int luaopen_base (lua_State *L) - /*@modifies L @*/; +LUALIB_API int luaopen_base (lua_State *L); #define LUA_TABLIBNAME "table" -LUALIB_API int luaopen_table (lua_State *L) - /*@modifies L @*/; +LUALIB_API int luaopen_table (lua_State *L); #define LUA_IOLIBNAME "io" #define LUA_OSLIBNAME "os" -LUALIB_API int luaopen_io (lua_State *L) - /*@modifies L @*/; +LUALIB_API int luaopen_io (lua_State *L); #define LUA_STRLIBNAME "string" -LUALIB_API int luaopen_string (lua_State *L) - /*@modifies L @*/; +LUALIB_API int luaopen_string (lua_State *L); #define LUA_MATHLIBNAME "math" -LUALIB_API int luaopen_math (lua_State *L) - /*@modifies L @*/; +LUALIB_API int luaopen_math (lua_State *L); #define LUA_DBLIBNAME "debug" -LUALIB_API int luaopen_debug (lua_State *L) - /*@modifies L @*/; +LUALIB_API int luaopen_debug (lua_State *L); -LUALIB_API int luaopen_loadlib (lua_State *L) - /*@modifies L @*/; +LUALIB_API int luaopen_loadlib (lua_State *L); /* to help testing the libraries */ |