diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c index d060eed811..88a9fc8da1 100644 --- a/src/bin/eolian/sources.c +++ b/src/bin/eolian/sources.c @@ -183,7 +183,7 @@ _free_func_get(const Eolian_Type *type) if (eolian_type_type_get(ab) == EOLIAN_TYPE_CLASS) return "efl_del"; else - return eolian_type_free_func_get(ab); + return eolian_typedecl_free_func_get(eolian_type_typedecl_get(ab)); /* no free func */ default: return NULL; diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index e92e587e0a..2be1b6a981 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -449,8 +449,6 @@ ffi.cdef [[ const char *eolian_type_c_type_get(const Eolian_Type *tp, Eolian_C_Type_Type ctype); const char *eolian_typedecl_c_type_get(const Eolian_Typedecl *tp); - - const char *eolian_type_free_func_get(const Eolian_Type *tp); const char *eolian_typedecl_free_func_get(const Eolian_Typedecl *tp); const Eolian_Function *eolian_typedecl_function_pointer_get(const Eolian_Typedecl *tp); @@ -1168,12 +1166,6 @@ M.Type = ffi.metatype("Eolian_Type", { local v = eolian.eolian_type_c_type_get(self, ctype) if v == nil then return nil end return ffi_stringshare(v) - end, - - free_func_get = function(self) - local v = eolian.eolian_type_free_func_get(self) - if v == nil then return nil end - return ffi.string(v) end } }) diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 4c9535dc03..0816812c74 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -2930,20 +2930,6 @@ eolian_type_namespaces_get(const Eolian_Type *tp) return eolian_object_namespaces_get(EOLIAN_OBJECT(tp)); } -/* - * @brief Get the name of the function used to free this type. - * - * @param[in] tp the type. - * @return the free func name. - * - * For types that translate to C pointers, this is the function used to - * free them. For other types, this is the function to free a pointer to - * those types. - * - * @ingroup Eolian - */ -EAPI Eina_Stringshare *eolian_type_free_func_get(const Eolian_Type *tp); - /* * @brief Evaluate an Eolian expression. * diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c index d4869e2866..527afc5171 100644 --- a/src/lib/eolian/database_type_api.c +++ b/src/lib/eolian/database_type_api.c @@ -260,13 +260,6 @@ eolian_typedecl_c_type_get(const Eolian_Typedecl *tp) return ret; } -EAPI Eina_Stringshare * -eolian_type_free_func_get(const Eolian_Type *tp) -{ - EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL); - return tp->freefunc; -} - EAPI Eina_Stringshare * eolian_typedecl_free_func_get(const Eolian_Typedecl *tp) { diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c index 7e73347f2d..c6a399b649 100644 --- a/src/lib/eolian/database_validate.c +++ b/src/lib/eolian/database_validate.c @@ -165,8 +165,6 @@ _validate_typedecl(Validate_State *vals, Eolian_Typedecl *tp) case EOLIAN_TYPEDECL_ALIAS: if (!_validate_type(vals, tp->base_type)) return _reset_stable(vals, was_stable, EINA_FALSE); - if (!tp->freefunc && tp->base_type->freefunc) - tp->freefunc = eina_stringshare_ref(tp->base_type->freefunc); if (tp->base_type->ownable) tp->ownable = EINA_TRUE; _reset_stable(vals, was_stable, EINA_TRUE); @@ -311,8 +309,6 @@ _validate_type(Validate_State *vals, Eolian_Type *tp) } if (!_validate_typedecl(vals, tp->tdecl)) return EINA_FALSE; - if (tp->tdecl->freefunc && !tp->freefunc) - tp->freefunc = eina_stringshare_ref(tp->tdecl->freefunc); if (tp->tdecl->ownable || tp->freefunc) tp->ownable = EINA_TRUE; tp->base.c_name = eina_stringshare_ref(tp->tdecl->base.c_name); diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py index d5c99a1990..c287b57c35 100644 --- a/src/scripts/pyolian/eolian.py +++ b/src/scripts/pyolian/eolian.py @@ -1043,10 +1043,6 @@ class Type(Object): # return "".format(self) return "".format(self) - @cached_property - def free_func(self): - return _str_to_py(lib.eolian_type_free_func_get(self)) - @cached_property def type(self): return Eolian_Type_Type(lib.eolian_type_type_get(self)) diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py index d8ee7f04d9..b9ba5f27fa 100644 --- a/src/scripts/pyolian/eolian_lib.py +++ b/src/scripts/pyolian/eolian_lib.py @@ -607,10 +607,6 @@ lib.eolian_type_is_ptr.restype = c_bool lib.eolian_type_c_type_get.argtypes = (c_void_p, c_int) lib.eolian_type_c_type_get.restype = c_void_p # Stringshare TO BE FREED -# EAPI Eina_Stringshare *eolian_type_free_func_get(const Eolian_Type *tp); -lib.eolian_type_free_func_get.argtypes = (c_void_p,) -lib.eolian_type_free_func_get.restype = c_char_p - ### Eolian_Expression ####################################################### # EAPI Eina_Stringshare *eolian_expression_serialize(const Eolian_Expression *expr); diff --git a/src/scripts/pyolian/test_eolian.py b/src/scripts/pyolian/test_eolian.py index de58a1c362..23a618be11 100755 --- a/src/scripts/pyolian/test_eolian.py +++ b/src/scripts/pyolian/test_eolian.py @@ -566,7 +566,6 @@ class TestEolianType(unittest.TestCase): self.assertFalse(t.is_const) self.assertFalse(t.is_ptr) self.assertEqual(list(t.namespaces), []) - self.assertIsNone(t.free_func) self.assertIsNone(t.class_) self.assertEqual(t, t.aliased_base) # TODO find a better test @@ -586,7 +585,6 @@ class TestEolianType(unittest.TestCase): self.assertEqual(t.builtin_type, eolian.Eolian_Type_Builtin_Type.INVALID) self.assertEqual(t.file, 'efl_gfx_entity.eo') # TODO is this correct ? self.assertEqual(list(t.namespaces), ['Eina']) - self.assertEqual(t.free_func, 'eina_rectangle_free') self.assertIsNone(t.class_) self.assertEqual(t, t.aliased_base) @@ -610,7 +608,6 @@ class TestEolianType(unittest.TestCase): self.assertEqual(t.builtin_type, eolian.Eolian_Type_Builtin_Type.INVALID) self.assertEqual(t.file, 'efl_content.eo') # TODO is this correct ? self.assertEqual(list(t.namespaces), ['Efl', 'Gfx']) - self.assertEqual(t.free_func, 'efl_del') self.assertEqual(t, t.aliased_base) self.assertEqual(t.c_type_default, 'Efl_Gfx_Entity *') # TODO find a better test