Eolian: Correct stringshare handling to match updated docs
This commit is contained in:
parent
fe16722cbe
commit
2543fa6a17
|
@ -946,7 +946,11 @@ cdef class Function(object):
|
|||
|
||||
"""
|
||||
if isinstance(prefix, unicode): prefix = PyUnicode_AsUTF8String(prefix)
|
||||
return _ctouni(eolian_function_full_c_name_get(self.function_id, prefix))
|
||||
cdef Eina_Stringshare *ret1
|
||||
ret1 = eolian_function_full_c_name_get(self.function_id, prefix)
|
||||
ret2 = _ctouni(ret1)
|
||||
eina_stringshare_del(ret1)
|
||||
return ret2
|
||||
|
||||
def legacy_get(self, Eolian_Function_Type f_type):
|
||||
"""Returns a legacy name for a function.
|
||||
|
@ -1645,7 +1649,11 @@ cdef class Type(object):
|
|||
|
||||
"""
|
||||
if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
|
||||
return _ctouni(eolian_type_c_type_named_get(self.tp, name))
|
||||
cdef Eina_Stringshare *ret1
|
||||
ret1 = eolian_type_c_type_named_get(self.tp, name)
|
||||
ret2 = _ctouni(ret1)
|
||||
eina_stringshare_del(ret1)
|
||||
return ret2
|
||||
|
||||
property c_type:
|
||||
"""Get the full C type name of the given type without a name.
|
||||
|
@ -1658,7 +1666,11 @@ cdef class Type(object):
|
|||
|
||||
"""
|
||||
def __get__(self):
|
||||
return _ctouni(eolian_type_c_type_get(self.tp))
|
||||
cdef Eina_Stringshare *ret1
|
||||
ret1 = eolian_type_c_type_get(self.tp)
|
||||
ret2 = _ctouni(ret1)
|
||||
eina_stringshare_del(ret1)
|
||||
return ret2
|
||||
|
||||
property name:
|
||||
"""Get the name of the given type. For EOLIAN_TYPE_REGULAR and
|
||||
|
@ -1831,7 +1843,11 @@ cdef class Expression(object):
|
|||
resolve namespaces and enum field names.
|
||||
|
||||
"""
|
||||
return _ctouni(eolian_expression_serialize(self.expr))
|
||||
cdef Eina_Stringshare *ret1
|
||||
ret1 = eolian_expression_serialize(self.expr)
|
||||
ret2 = _ctouni(ret1)
|
||||
eina_stringshare_del(ret1)
|
||||
return ret2
|
||||
|
||||
property type:
|
||||
"""Get the type of an expression.
|
||||
|
@ -1940,7 +1956,11 @@ cdef class Value(object):
|
|||
yourself.
|
||||
|
||||
"""
|
||||
return _ctouni(eolian_expression_value_to_literal(<const Eolian_Value *>&self.v))
|
||||
cdef Eina_Stringshare *ret1
|
||||
ret1 = eolian_expression_value_to_literal(<const Eolian_Value *>&self.v)
|
||||
ret2 = _ctouni(ret1)
|
||||
eina_stringshare_del(ret1)
|
||||
return ret2
|
||||
|
||||
|
||||
cdef class Variable(object):
|
||||
|
|
Loading…
Reference in New Issue