diff options
author | Daniel Kolesa <d.kolesa@samsung.com> | 2019-09-09 18:26:49 +0200 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@samsung.com> | 2019-09-09 18:26:49 +0200 |
commit | 267c57d0f10d4b1577181c8f7157b7bc2f8053a6 (patch) | |
tree | 7e41546452c4ad6c6aa93664e3e2a858fd01bf9d /src/scripts | |
parent | 165921ec040f427875fc0b32b1f03d4a45efd25e (diff) | |
download | efl-267c57d0f10d4b1577181c8f7157b7bc2f8053a6.tar.gz |
eolian: remove second parameter for eolian_type_c_type_get
This has been replaced by newer APIs.
Diffstat (limited to 'src/scripts')
-rw-r--r-- | src/scripts/pyolian/eolian.py | 21 | ||||
-rw-r--r-- | src/scripts/pyolian/eolian_lib.py | 4 | ||||
-rwxr-xr-x | src/scripts/pyolian/test_eolian.py | 12 |
3 files changed, 4 insertions, 33 deletions
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py index 22e84e556f..e231d2b579 100644 --- a/src/scripts/pyolian/eolian.py +++ b/src/scripts/pyolian/eolian.py @@ -142,11 +142,6 @@ class Eolian_Type_Builtin_Type(IntEnum): VOID_PTR = 48 FREE_CB = 49 -class Eolian_C_Type_Type(IntEnum): - DEFAULT = 0 - PARAM = 1 - RETURN = 2 - class Eolian_Expression_Type(IntEnum): UNKNOWN = 0 INT = 1 @@ -1053,25 +1048,13 @@ class Type(Object): def builtin_type(self): return Eolian_Type_Builtin_Type(lib.eolian_type_builtin_type_get(self)) - def c_type_get(self, ctype): - s = lib.eolian_type_c_type_get(self, ctype) + def c_type_get(self): + s = lib.eolian_type_c_type_get(self) ret = _str_to_py(s) lib.eina_stringshare_del(c_void_p(s)) return ret @cached_property - def c_type_default(self): - return self.c_type_get(Eolian_C_Type_Type.DEFAULT) - - @cached_property - def c_type_param(self): - return self.c_type_get(Eolian_C_Type_Type.PARAM) - - @cached_property - def c_type_return(self): - return self.c_type_get(Eolian_C_Type_Type.RETURN) - - @cached_property def typedecl(self): c_tdecl = lib.eolian_type_typedecl_get(self) return Typedecl(c_tdecl) if c_tdecl else None diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py index b532e98197..b9ee5d39a1 100644 --- a/src/scripts/pyolian/eolian_lib.py +++ b/src/scripts/pyolian/eolian_lib.py @@ -603,8 +603,8 @@ lib.eolian_type_is_const.restype = c_bool lib.eolian_type_is_ptr.argtypes = (c_void_p,) lib.eolian_type_is_ptr.restype = c_bool -# EAPI Eina_Stringshare *eolian_type_c_type_get(const Eolian_Type *tp, Eolian_C_Type_Type ctype); -lib.eolian_type_c_type_get.argtypes = (c_void_p, c_int) +# EAPI Eina_Stringshare *eolian_type_c_type_get(const Eolian_Type *tp); +lib.eolian_type_c_type_get.argtypes = (c_void_p) lib.eolian_type_c_type_get.restype = c_void_p # Stringshare TO BE FREED ### Eolian_Expression ####################################################### diff --git a/src/scripts/pyolian/test_eolian.py b/src/scripts/pyolian/test_eolian.py index 5313e4cbba..36c19ea1ae 100755 --- a/src/scripts/pyolian/test_eolian.py +++ b/src/scripts/pyolian/test_eolian.py @@ -582,10 +582,6 @@ class TestEolianType(unittest.TestCase): self.assertIsNone(t.class_) self.assertEqual(t, t.aliased_base) # TODO find a better test - self.assertEqual(t.c_type_default, 'double') # TODO find a better test - self.assertEqual(t.c_type_param, 'double') - self.assertEqual(t.c_type_return, 'double') - def test_type_regular(self): cls = eolian_db.class_by_name_get('Efl.Gfx.Entity') func = cls.function_by_name_get('geometry') @@ -601,10 +597,6 @@ class TestEolianType(unittest.TestCase): self.assertIsNone(t.class_) self.assertEqual(t, t.aliased_base) - self.assertEqual(t.c_type_default, 'Eina_Rect') # TODO find a better test - self.assertEqual(t.c_type_param, 'Eina_Rect') - self.assertEqual(t.c_type_return, 'Eina_Rect') - td = t.typedecl self.assertIsInstance(td, eolian.Typedecl) self.assertEqual(td.name, 'Eina.Rect') @@ -623,10 +615,6 @@ class TestEolianType(unittest.TestCase): self.assertEqual(list(t.namespaces), ['Efl', 'Gfx']) self.assertEqual(t, t.aliased_base) - self.assertEqual(t.c_type_default, 'Efl_Gfx_Entity *') # TODO find a better test - self.assertEqual(t.c_type_param, 'Efl_Gfx_Entity *') - self.assertEqual(t.c_type_return, 'Efl_Gfx_Entity *') - cls = t.class_ self.assertIsInstance(cls, eolian.Class) self.assertEqual(cls.name, 'Efl.Gfx.Entity') |