Eolian: Fix eolian_type_name_get stringshare handling
This commit is contained in:
parent
9af2bbe472
commit
fe16722cbe
|
@ -1661,21 +1661,17 @@ cdef class Type(object):
|
|||
return _ctouni(eolian_type_c_type_get(self.tp))
|
||||
|
||||
property name:
|
||||
"""Get the name of the given type. You have to manually delete
|
||||
the stringshare. For EOLIAN_TYPE_REGULAR and EOLIAN_TYPE_REGULAR_STRUCT,
|
||||
this is for example "int". For EOLIAN_TYPE_STRUCT and EOLIAN_TYPE_ALIAS,
|
||||
this is the name of the alias or of the struct. Keep in mind that the name
|
||||
doesn't include namespaces for structs and aliases.
|
||||
"""Get the name of the given type. For EOLIAN_TYPE_REGULAR and
|
||||
EOLIAN_TYPE_REGULAR_STRUCT, this is for example "int". For
|
||||
EOLIAN_TYPE_STRUCT and EOLIAN_TYPE_ALIAS, this is the name of the alias
|
||||
or of the struct. Keep in mind that the name doesn't include namespaces
|
||||
for structs and aliases.
|
||||
|
||||
:return: the name.
|
||||
|
||||
"""
|
||||
def __get__(self):
|
||||
cdef:
|
||||
const char *ret1 = eolian_type_name_get(self.tp)
|
||||
unicode ret2 = _ctouni(ret1)
|
||||
eina_stringshare_del(ret1)
|
||||
return ret2
|
||||
return _ctouni(eolian_type_name_get(self.tp))
|
||||
|
||||
property full_name:
|
||||
"""Get the full (namespaced) name of a function. Only works on named
|
||||
|
|
Loading…
Reference in New Issue