aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/pyolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2018-01-16 16:36:45 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2018-01-16 16:39:05 +0100
commitd47610a7323dd357e57f26ca83014c7b39dd48e9 (patch)
treec218e79bd8519a7a567c68dd3386a2cffa94e340 /src/scripts/pyolian
parenteolian: do not require unit for expr eval APIs (diff)
downloadefl-d47610a7323dd357e57f26ca83014c7b39dd48e9.tar.gz
eolian: do not require unit when stringifying types
As it is no longer necessary to pass unit when evaluating exprs, it is not necessary to pass it here either. Convert all the APIs to the new style and update all instances in our tree.
Diffstat (limited to 'src/scripts/pyolian')
-rw-r--r--src/scripts/pyolian/eolian.py15
-rw-r--r--src/scripts/pyolian/eolian_lib.py14
2 files changed, 12 insertions, 17 deletions
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py
index 934437b773..9ac479807f 100644
--- a/src/scripts/pyolian/eolian.py
+++ b/src/scripts/pyolian/eolian.py
@@ -1026,7 +1026,7 @@ class Implement(EolianBaseObject):
return not self.is_property
-class Type(EolianBaseObject): # OK (1 TODO Unit*)
+class Type(EolianBaseObject):
def __repr__(self):
# return "<eolian.Type '{0.full_name}', type: {0.type!s}, c_type: '{0.c_type}'>".format(self)
return "<eolian.Type '{0.full_name}', type={0.type!s}>".format(self)
@@ -1059,11 +1059,9 @@ class Type(EolianBaseObject): # OK (1 TODO Unit*)
def builtin_type(self):
return Eolian_Type_Builtin_Type(lib.eolian_type_builtin_type_get(self._obj))
- # TODO FIXME STRANGE API (need Eolian_Unit*)
@cached_property
def c_type(self):
- # return _str_to_py(lib.eolian_type_c_type_get(self._obj))
- return 'FIXME'
+ return _str_to_py(lib.eolian_type_c_type_get(self._obj))
@cached_property
def typedecl(self):
@@ -1107,7 +1105,7 @@ class Type(EolianBaseObject): # OK (1 TODO Unit*)
return bool(lib.eolian_type_is_ptr(self._obj))
-class Typedecl(EolianBaseObject): # OK (1 TODO Unit*)
+class Typedecl(EolianBaseObject):
def __repr__(self):
return "<eolian.Typedecl '{0.full_name}', type={0.type!s}>".format(self)
@@ -1127,10 +1125,9 @@ class Typedecl(EolianBaseObject): # OK (1 TODO Unit*)
def type(self):
return Eolian_Typedecl_Type(lib.eolian_typedecl_type_get(self._obj))
- # TODO FIX THIS, need Eolian_Unit* param ???
- # @cached_property
- # def c_type(self):
- # return _str_to_py(lib.eolian_typedecl_c_type_get(self._obj))
+ @cached_property
+ def c_type(self):
+ return _str_to_py(lib.eolian_typedecl_c_type_get(self._obj))
@property
def namespaces(self):
diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py
index bd17374d40..42bea97c56 100644
--- a/src/scripts/pyolian/eolian_lib.py
+++ b/src/scripts/pyolian/eolian_lib.py
@@ -504,10 +504,9 @@ lib.eolian_typedecl_aliased_base_get.restype = c_void_p
lib.eolian_typedecl_is_extern.argtypes = [c_void_p,]
lib.eolian_typedecl_is_extern.restype = c_bool
-# TODO FIXME STRANGE API (need Eolian_Unit*)
-# EAPI Eina_Stringshare *eolian_typedecl_c_type_get(const Eolian_Unit *unit, const Eolian_Typedecl *tp);
-# lib.eolian_typedecl_c_type_get.argtypes = [c_void_p,]
-# lib.eolian_typedecl_c_type_get.restype = None
+# EAPI Eina_Stringshare *eolian_typedecl_c_type_get(const Eolian_Typedecl *tp);
+lib.eolian_typedecl_c_type_get.argtypes = [c_void_p,]
+lib.eolian_typedecl_c_type_get.restype = None
# EAPI Eina_Stringshare *eolian_typedecl_name_get(const Eolian_Typedecl *tp);
lib.eolian_typedecl_name_get.argtypes = [c_void_p,]
@@ -573,10 +572,9 @@ 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
-# TODO FIXME STRANGE API (need Eolian_Unit*)
-# EAPI Eina_Stringshare *eolian_type_c_type_get(const Eolian_Unit *unit, const Eolian_Type *tp, Eolian_C_Type_Type ctype);
-# lib.eolian_type_c_type_get.argtypes = [c_void_p,]
-# lib.eolian_type_c_type_get.restype = c_void_p # Stringshare TO BE FREED
+# 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,]
+lib.eolian_type_c_type_get.restype = c_void_p # Stringshare TO BE FREED
# EAPI Eina_Stringshare *eolian_type_name_get(const Eolian_Type *tp);
lib.eolian_type_name_get.argtypes = [c_void_p,]