diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-04 12:17:37 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-04 12:17:37 +0100 |
commit | b83ef94c28a590a4ce2d4d434d58d3b7902c9bae (patch) | |
tree | 3dc1ec0436bc9137de579048cdf1f208a3d27730 /src/lua | |
parent | af7255bac4318ec96b0b36a57ea87ea893ba7b02 (diff) | |
download | rspamd-b83ef94c28a590a4ce2d4d434d58d3b7902c9bae.tar.gz rspamd-b83ef94c28a590a4ce2d4d434d58d3b7902c9bae.zip |
[Feature] Allow all types of symbols to be added via __newindex method
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_config.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c index ee6ab3ef7..ddd5d9146 100644 --- a/src/lua/lua_config.c +++ b/src/lua/lua_config.c @@ -1497,18 +1497,7 @@ lua_config_newindex (lua_State *L) if (lua_type (L, -1) == LUA_TSTRING) { type_str = lua_tostring (L, -1); - if (strcmp (type_str, "normal") == 0) { - type = SYMBOL_TYPE_NORMAL; - } - else if (strcmp (type_str, "virtual") == 0) { - type = SYMBOL_TYPE_VIRTUAL; - } - else if (strcmp (type_str, "callback") == 0) { - type = SYMBOL_TYPE_CALLBACK; - } - else { - msg_info_config ("unknown type: %s", type_str); - } + type = lua_parse_symbol_type (type_str); } lua_pop (L, 1); |