diff options
author | jbj <devnull@localhost> | 2004-03-26 15:42:45 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2004-03-26 15:42:45 +0000 |
commit | f3fb31edbb7a1202c225da48cd14e2c69cbd3e56 (patch) | |
tree | a1ed86e7522718d1f0560df204bb95a45b319313 /rpmio | |
parent | 227d09b4ba879b63a4af3f0220011f3a182e4741 (diff) | |
download | librpm-tizen-f3fb31edbb7a1202c225da48cd14e2c69cbd3e56.tar.gz librpm-tizen-f3fb31edbb7a1202c225da48cd14e2c69cbd3e56.tar.bz2 librpm-tizen-f3fb31edbb7a1202c225da48cd14e2c69cbd3e56.zip |
splint fiddles.
CVS patchset: 7193
CVS date: 2004/03/26 15:42:45
Diffstat (limited to 'rpmio')
-rw-r--r-- | rpmio/.splintrc | 1 | ||||
-rw-r--r-- | rpmio/rpmlua.c | 19 | ||||
-rw-r--r-- | rpmio/rpmlua.h | 51 |
3 files changed, 50 insertions, 21 deletions
diff --git a/rpmio/.splintrc b/rpmio/.splintrc index 1f26e45d7..8ec94f18a 100644 --- a/rpmio/.splintrc +++ b/rpmio/.splintrc @@ -20,6 +20,7 @@ -declundef -exportheadervar -exportlocal +-globs -enummemuse -fcnuse diff --git a/rpmio/rpmlua.c b/rpmio/rpmlua.c index f1305d06c..0fce710f0 100644 --- a/rpmio/rpmlua.c +++ b/rpmio/rpmlua.c @@ -5,11 +5,11 @@ #include <rpmerr.h> #include <rpmurl.h> -#include <lua.h> -#include <lualib.h> -#include <lauxlib.h> -#include <lposix.h> -#include <lrexlib.h> +#include "../lua/include/lua.h" +#include "../lua/include/lualib.h" +#include "../lua/include/lauxlib.h" +#include "../lua/local/lposix.h" +#include "../lua/local/lrexlib.h" #include <unistd.h> #include <assert.h> @@ -28,9 +28,12 @@ static inline int vsnprintf(char * buf, /*@unused@*/ int nb, #endif #define INITSTATE(_lua, lua) \ - rpmlua lua = _lua ? _lua : \ + rpmlua lua = _lua ? _lua : \ (globalLuaState ? globalLuaState : \ - (globalLuaState = rpmluaNew())) + /*@-mods@*/ \ + (globalLuaState = rpmluaNew()) \ + /*@=mods@*/ \ + ) /*@only@*/ /*@unchecked@*/ /*@null@*/ static rpmlua globalLuaState = NULL; @@ -579,11 +582,13 @@ static void _rpmluaInteractive(lua_State *L) (void) fputs("\n", stdout); } +/*@-mods@*/ void rpmluaInteractive(rpmlua _lua) { INITSTATE(_lua, lua); _rpmluaInteractive(lua->L); } +/*@=mods@*/ /* ------------------------------------------------------------------ */ /* Lua API */ diff --git a/rpmio/rpmlua.h b/rpmio/rpmlua.h index 80d53d01f..bdff3e1e1 100644 --- a/rpmio/rpmlua.h +++ b/rpmio/rpmlua.h @@ -51,41 +51,56 @@ void *rpmluaFree(/*@only@*/ rpmlua lua) int rpmluaCheckScript(/*@null@*/ rpmlua lua, const char *script, /*@null@*/ const char *name) - /*@modifies lua @*/; + /*@globals fileSystem @*/ + /*@modifies lua, fileSystem @*/; int rpmluaRunScript(/*@null@*/ rpmlua lua, const char *script, /*@null@*/ const char *name) /*@globals fileSystem @*/ /*@modifies lua, fileSystem @*/; +/*@-exportlocal@*/ int rpmluaRunScriptFile(/*@null@*/ rpmlua lua, const char *filename) /*@globals fileSystem @*/ /*@modifies lua, fileSystem @*/; +/*@=exportlocal@*/ void rpmluaInteractive(/*@null@*/ rpmlua lua) /*@globals fileSystem @*/ /*@modifies lua, fileSystem @*/; -void rpmluaSetData(/*@null@*/ rpmlua lua, const char *key, const void *data) - /*@modifies lua @*/; void *rpmluaGetData(/*@null@*/ rpmlua lua, const char *key) - /*@modifies lua @*/; + /*@globals fileSystem @*/ + /*@modifies lua, fileSystem @*/; +/*@-exportlocal@*/ +void rpmluaSetData(/*@null@*/ rpmlua lua, const char *key, const void *data) + /*@globals fileSystem @*/ + /*@modifies lua, fileSystem @*/; +/*@=exportlocal@*/ -void rpmluaSetPrintBuffer(/*@null@*/ rpmlua lua, int flag) - /*@modifies lua @*/; /*@exposed@*/ const char *rpmluaGetPrintBuffer(/*@null@*/ rpmlua lua) - /*@modifies lua @*/; + /*@globals fileSystem @*/ + /*@modifies lua, fileSystem @*/; +void rpmluaSetPrintBuffer(/*@null@*/ rpmlua lua, int flag) + /*@globals fileSystem @*/ + /*@modifies lua, fileSystem @*/; -void rpmluaSetVar(/*@null@*/ rpmlua lua, rpmluav var) - /*@modifies lua, var @*/; void rpmluaGetVar(/*@null@*/ rpmlua lua, rpmluav var) - /*@modifies lua, var @*/; + /*@globals fileSystem @*/ + /*@modifies lua, var, fileSystem @*/; +void rpmluaSetVar(/*@null@*/ rpmlua lua, rpmluav var) + /*@globals fileSystem @*/ + /*@modifies lua, var, fileSystem @*/; void rpmluaDelVar(/*@null@*/ rpmlua lua, const char *key, ...) - /*@modifies lua @*/; + /*@globals fileSystem @*/ + /*@modifies lua, fileSystem @*/; int rpmluaVarExists(/*@null@*/ rpmlua lua, const char *key, ...) - /*@modifies lua @*/; + /*@globals fileSystem @*/ + /*@modifies lua, fileSystem @*/; void rpmluaPushTable(/*@null@*/ rpmlua lua, const char *key, ...) - /*@modifies lua @*/; + /*@globals fileSystem @*/ + /*@modifies lua, fileSystem @*/; void rpmluaPop(/*@null@*/ rpmlua lua) - /*@modifies lua @*/; + /*@globals fileSystem @*/ + /*@modifies lua, fileSystem @*/; /*@only@*/ rpmluav rpmluavNew(void) @@ -94,14 +109,22 @@ void *rpmluavFree(/*@only@*/ rpmluav var) /*@modifes var @*/; void rpmluavSetListMode(rpmluav var, int flag) /*@modifies var @*/; +/*@-exportlocal@*/ void rpmluavSetKey(rpmluav var, rpmluavType type, const void *value) /*@modifies var @*/; +/*@=exportlocal@*/ +/*@-exportlocal@*/ void rpmluavSetValue(rpmluav var, rpmluavType type, const void *value) /*@modifies var @*/; +/*@=exportlocal@*/ +/*@-exportlocal@*/ void rpmluavGetKey(rpmluav var, /*@out@*/ rpmluavType *type, /*@out@*/ void **value) /*@modifies *type, *value @*/; +/*@=exportlocal@*/ +/*@-exportlocal@*/ void rpmluavGetValue(rpmluav var, /*@out@*/ rpmluavType *type, /*@out@*/ void **value) /*@modifies *type, *value @*/; +/*@=exportlocal@*/ /* Optional helpers for numbers. */ void rpmluavSetKeyNum(rpmluav var, double value) |