]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Libucl: Fix rspamd{text} parsing
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 16 Sep 2019 15:02:48 +0000 (16:02 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 16 Sep 2019 15:02:48 +0000 (16:02 +0100)
contrib/libucl/lua_ucl.c

index 049b1d08c7342de13d7a8096eb25a5700a0336ed..d240d12e06154ab86392c0dfef057bc32c66139c 100644 (file)
@@ -807,8 +807,8 @@ struct _rspamd_lua_text {
 
 /***
  * @method parser:parse_text(input)
- * Parse UCL object from file.
- * @param {string} input string to parse
+ * Parse UCL object from text object (Rspamd specific).
+ * @param {rspamd_text} input text to parse
  * @return {bool[, string]} if res is `true` then file has been parsed successfully, otherwise an error string is also returned
  */
 static int
@@ -820,7 +820,7 @@ lua_ucl_parser_parse_text (lua_State *L)
        int ret = 2;
 
        parser = lua_ucl_parser_get (L, 1);
-       t = luaL_checkudata (L, 2, "rspamd{text}");
+       t = lua_touserdata (L, 2);
 
        if (lua_type (L, 3) == LUA_TSTRING) {
                type = lua_ucl_str_to_parse_type (lua_tostring (L, 3));