]> source.dussan.org Git - rspamd.git/commitdiff
src/lua/lua_util.c: remove unused function 3341/head
authorJan Smutny <js@excello.cz>
Fri, 17 Apr 2020 15:31:50 +0000 (17:31 +0200)
committerJan Smutny <js@excello.cz>
Fri, 17 Apr 2020 15:31:50 +0000 (17:31 +0200)
src/lua/lua_util.c

index e7f18db2b423d8369465d6391d45e7ef58552118..7f9918c6159936c583d8ff128177d7bb1ca13b75 100644 (file)
@@ -1464,51 +1464,6 @@ lua_util_levenshtein_distance (lua_State *L)
        return 1;
 }
 
-static gint
-lua_util_parse_addr (lua_State *L)
-{
-       LUA_TRACE_POINT;
-       GPtrArray *addrs;
-       gsize len;
-       const gchar *str = luaL_checklstring (L, 1, &len);
-       rspamd_mempool_t *pool;
-       gboolean own_pool = FALSE;
-
-       if (str) {
-
-               if (lua_type (L, 2) == LUA_TUSERDATA) {
-                       pool = rspamd_lua_check_mempool (L, 2);
-
-                       if (pool == NULL) {
-                               return luaL_error (L, "invalid arguments");
-                       }
-               }
-               else {
-                       pool = rspamd_mempool_new (rspamd_mempool_suggest_size (),
-                                       "lua util", 0);
-                       own_pool = TRUE;
-               }
-
-               addrs = rspamd_email_address_from_mime (pool, str, len, NULL);
-
-               if (addrs == NULL) {
-                       lua_pushnil (L);
-               }
-               else {
-                       lua_push_emails_address_list (L, addrs, 0);
-               }
-
-               if (own_pool) {
-                       rspamd_mempool_delete (pool);
-               }
-       }
-       else {
-               lua_pushnil (L);
-       }
-
-       return 1;
-}
-
 static gint
 lua_util_fold_header (lua_State *L)
 {