diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-26 22:08:09 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-26 22:08:09 +0100 |
commit | 6d230abb527752ef25e352d8d09669020774e75f (patch) | |
tree | b68a6c445d6cfca183c84ef34034152a68d97440 /src/lua/lua_config.c | |
parent | 2401ecfcf47963d1d7ac24f5d958a61d28771655 (diff) | |
download | rspamd-6d230abb527752ef25e352d8d09669020774e75f.tar.gz rspamd-6d230abb527752ef25e352d8d09669020774e75f.zip |
Adopt lua API.
Diffstat (limited to 'src/lua/lua_config.c')
-rw-r--r-- | src/lua/lua_config.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c index 938c0fa62..cb12c970b 100644 --- a/src/lua/lua_config.c +++ b/src/lua/lua_config.c @@ -867,7 +867,7 @@ rspamd_register_symbol_fromlua (lua_State *L, cd->L = L; cd->symbol = rspamd_mempool_strdup (cfg->cfg_pool, name); - register_symbol_common (&cfg->cache, + register_symbol_common (cfg->cache, name, weight, priority, @@ -957,7 +957,7 @@ lua_config_register_symbols (lua_State *L) lua_pushvalue (L, -2); sym = rspamd_mempool_strdup (cfg->cfg_pool, luaL_checkstring (L, -2)); - register_virtual_symbol (&cfg->cache, sym, weight); + register_virtual_symbol (cfg->cache, sym, weight); lua_pop (L, 2); } lua_pop (L, 1); @@ -965,7 +965,7 @@ lua_config_register_symbols (lua_State *L) else if (lua_type (L, i) == LUA_TSTRING) { sym = rspamd_mempool_strdup (cfg->cfg_pool, luaL_checkstring (L, i)); - register_virtual_symbol (&cfg->cache, sym, weight); + register_virtual_symbol (cfg->cache, sym, weight); } } } @@ -984,7 +984,7 @@ lua_config_register_virtual_symbol (lua_State * L) name = rspamd_mempool_strdup (cfg->cfg_pool, luaL_checkstring (L, 2)); weight = luaL_checknumber (L, 3); if (name) { - register_virtual_symbol (&cfg->cache, name, weight); + register_virtual_symbol (cfg->cache, name, weight); } } return 0; @@ -1157,7 +1157,7 @@ lua_config_add_composite (lua_State * L) composite); if (new) { - register_virtual_symbol (&cfg->cache, name, 1); + register_virtual_symbol (cfg->cache, name, 1); } ret = TRUE; |