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);
+ const Eolian_Class *eolian_type_class_get(const Eolian_Unit *unit, const Eolian_Type *tp);
size_t eolian_type_array_size_get(const Eolian_Type *tp);
Eina_Bool eolian_type_is_own(const Eolian_Type *tp);
Eina_Bool eolian_type_is_const(const Eolian_Type *tp);
return v
end,
- class_get = function(self)
- local v = eolian.eolian_type_class_get(self)
+ class_get = function(self, unit)
+ local v = eolian.eolian_type_class_get(unit, self)
if v == nil then return nil end
return v
end,
/*
* @brief Get the class associated with an EOLIAN_TYPE_CLASS type.
*
+ * @param[in] unit the unit to look in
* @param[in] tp the type.
* @return the class or NULL.
*
* @ingroup Eolian
*/
-EAPI const Eolian_Class *eolian_type_class_get(const Eolian_Type *tp);
+EAPI const Eolian_Class *eolian_type_class_get(const Eolian_Unit *unit, const Eolian_Type *tp);
/*
* @brief Get the size of an EOLIAN_TYPE_STATIC_ARRAY.
}
EAPI const Eolian_Class *
-eolian_type_class_get(const Eolian_Type *tp)
+eolian_type_class_get(const Eolian_Unit *unit, const Eolian_Type *tp)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
if (eolian_type_type_get(tp) != EOLIAN_TYPE_CLASS)
return NULL;
- /* FIXME: pass unit properly */
- return eolian_class_get_by_name(NULL, tp->full_name);
+ return eolian_class_get_by_name(unit, tp->full_name);
}
EAPI size_t
return _validate_type(tp->base_type);
case EOLIAN_TYPE_CLASS:
{
- if (!eolian_type_class_get(tp))
+ /* FIXME: pass unit properly */
+ if (!eolian_type_class_get(NULL, tp))
{
char buf[256];
snprintf(buf, sizeof(buf), "undefined class %s "