else WRN("evaluation of default value failed");
}
/* default value or fallback */
- const Eolian_Type *btp = eolian_type_aliased_base_get(src, tp);
+ const Eolian_Type *btp = eolian_type_aliased_base_get(tp);
if (eolian_type_is_ptr(btp))
{
eina_strbuf_append(buf, "NULL");
const Eolian_Type *eolian_typedecl_base_type_get(const Eolian_Typedecl *tp);
const Eolian_Typedecl *eolian_type_typedecl_get(const Eolian_Type *tp);
- const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Unit *unit, const Eolian_Type *tp);
- const Eolian_Type *eolian_typedecl_aliased_base_get(const Eolian_Unit *unit, const Eolian_Typedecl *tp);
+ const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Type *tp);
+ const Eolian_Type *eolian_typedecl_aliased_base_get(const Eolian_Typedecl *tp);
const Eolian_Class *eolian_type_class_get(const Eolian_Type *tp);
Eina_Bool eolian_type_is_owned(const Eolian_Type *tp);
return v
end,
- aliased_base_get = function(self, unit)
- local v = eolian.eolian_typedecl_aliased_byse_get(unit, self)
+ aliased_base_get = function(self)
+ local v = eolian.eolian_typedecl_aliased_byse_get(self)
if v == nil then return nil end
return v
end,
return v
end,
- aliased_base_get = function(self, unit)
- local v = eolian.eolian_type_aliased_byse_get(unit, self)
+ aliased_base_get = function(self)
+ local v = eolian.eolian_type_aliased_byse_get(self)
if v == nil then return nil end
return v
end,
* If the given typedecl is an alias, it returns the result of
* eolian_type_aliased_base_get on its base type. Otherwise this returns NULL.
*
- * @param[in] unit the unit to look in
* @param[in] tp the type declaration.
* @return the lowest alias base or the given type.
*
* @ingroup Eolian
*/
-EAPI const Eolian_Type *eolian_typedecl_aliased_base_get(const Eolian_Unit *unit, const Eolian_Typedecl *tp);
+EAPI const Eolian_Type *eolian_typedecl_aliased_base_get(const Eolian_Typedecl *tp);
/*
* @brief Check if a struct or alias type declaration is extern.
* type actually is while still having convenience. Keep in mind that this stops
* if the found type is actually a pointer (has a ptr() on it).
*
- * @param[in] unit the unit to look in
* @param[in] tp the type.
* @return the lowest alias base or the given type.
*
* @ingroup Eolian
*/
-EAPI const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Unit *unit, const Eolian_Type *tp);
+EAPI const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Type *tp);
/*
* @brief Get the class associated with an EOLIAN_TYPE_CLASS type.
}
EAPI const Eolian_Type *
-eolian_type_aliased_base_get(const Eolian_Unit *unit, const Eolian_Type *tp)
+eolian_type_aliased_base_get(const Eolian_Type *tp)
{
if (!tp || tp->type != EOLIAN_TYPE_REGULAR || tp->is_ptr)
return tp;
- const Eolian_Typedecl *btp = database_type_decl_find(unit, tp);
+ const Eolian_Typedecl *btp = eolian_type_typedecl_get(tp);
if (btp && (btp->type == EOLIAN_TYPEDECL_ALIAS))
- return eolian_typedecl_aliased_base_get(unit, btp);
+ return eolian_typedecl_aliased_base_get(btp);
return tp;
}
EAPI const Eolian_Type *
-eolian_typedecl_aliased_base_get(const Eolian_Unit *unit, const Eolian_Typedecl *tp)
+eolian_typedecl_aliased_base_get(const Eolian_Typedecl *tp)
{
if (!tp || tp->type != EOLIAN_TYPEDECL_ALIAS)
return NULL;
- return eolian_type_aliased_base_get(unit, tp->base_type);
+ return eolian_type_aliased_base_get(tp->base_type);
}
EAPI const Eolian_Class *
end,
typedecl_get = function(self)
- -- FIXME: unit
- local v = self.type:typedecl_get(eos:unit_get())
+ local v = self.type:typedecl_get()
if not v then
return nil
end
end,
aliased_base_get = function(self)
- -- FIXME: unit
- local v = self.type:aliased_base_get(eos:unit_get())
+ local v = self.type:aliased_base_get()
if not v then
return nil
end
end,
aliased_base_get = function(self)
- -- FIXME: unit
- local v = self.typedecl:aliased_base_get(eos:unit_get())
+ local v = self.typedecl:aliased_base_get()
if not v then
return nil
end
c_type = lib.eolian_type_next_type_get(self._obj)
return Type(c_type) if c_type else None
- # TODO FIXME STRANGE API (need Eolian_Unit*)
- # @cached_property
- # def aliased_base(self):
- # c_type = lib.eolian_type_aliased_base_get(self._obj)
- # return Type(c_type) if c_type else None
+ @cached_property
+ def aliased_base(self):
+ c_type = lib.eolian_type_aliased_base_get(self._obj)
+ return Type(c_type) if c_type else None
@cached_property
def class_(self):
c_type = lib.eolian_typedecl_base_type_get(self._obj)
return Type(c_type) if c_type else None
- # TODO FIX THIS, need Eolian_Unit* param ???
- # @cached_property
- # def aliased_base(self):
- # c_type = lib.eolian_typedecl_aliased_base_get(self._obj)
- # return Type(c_type) if c_type else None
+ @cached_property
+ def aliased_base(self):
+ c_type = lib.eolian_typedecl_aliased_base_get(self._obj)
+ return Type(c_type) if c_type else None
@cached_property
def documentation(self):
lib.eolian_typedecl_base_type_get.argtypes = [c_void_p,]
lib.eolian_typedecl_base_type_get.restype = c_void_p
-# TODO FIXME STRANGE API (need Eolian_Unit*)
-# EAPI const Eolian_Type *eolian_typedecl_aliased_base_get(const Eolian_Unit *unit, const Eolian_Typedecl *tp);
-# lib.eolian_typedecl_aliased_base_get.argtypes = [c_void_p, c_void_p,]
-# lib.eolian_typedecl_aliased_base_get.restype = c_void_p
+# EAPI const Eolian_Type *eolian_typedecl_aliased_base_get(const Eolian_Typedecl *tp);
+lib.eolian_typedecl_aliased_base_get.argtypes = [c_void_p,]
+lib.eolian_typedecl_aliased_base_get.restype = c_void_p
# EAPI Eina_Bool eolian_typedecl_is_extern(const Eolian_Typedecl *tp);
lib.eolian_typedecl_is_extern.argtypes = [c_void_p,]
lib.eolian_type_typedecl_get.argtypes = [c_void_p,]
lib.eolian_type_typedecl_get.restype = c_void_p
-# TODO FIXME STRANGE API (need Eolian_Unit*)
-# EAPI const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Unit *unit, const Eolian_Type *tp);
-# lib.eolian_type_aliased_base_get.argtypes = [c_void_p,]
-# lib.eolian_type_aliased_base_get.restype = c_void_p
+# EAPI const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Type *tp);
+lib.eolian_type_aliased_base_get.argtypes = [c_void_p,]
+lib.eolian_type_aliased_base_get.restype = c_void_p
# EAPI const Eolian_Class *eolian_type_class_get(const Eolian_Type *tp);
lib.eolian_type_class_get.argtypes = [c_void_p,]
/* Lowest alias base */
fail_if(!(tdl = eolian_typedecl_alias_get_by_name(unit, "Evas.Coord3")));
- fail_if(!(type = eolian_typedecl_aliased_base_get(unit, tdl)));
+ fail_if(!(type = eolian_typedecl_aliased_base_get(tdl)));
fail_if(strcmp(eolian_type_name_get(type), "int"));
/* Complex type */