summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/eolian/Eolian.h3
-rw-r--r--src/lib/eolian/database_type_api.c4
-rw-r--r--src/lib/eolian/database_validate.c2
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp2
4 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 2f6336664e..8e9017b778 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -1985,13 +1985,12 @@ EAPI const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Unit *unit, co
1985/* 1985/*
1986 * @brief Get the class associated with an EOLIAN_TYPE_CLASS type. 1986 * @brief Get the class associated with an EOLIAN_TYPE_CLASS type.
1987 * 1987 *
1988 * @param[in] unit the unit to look in
1989 * @param[in] tp the type. 1988 * @param[in] tp the type.
1990 * @return the class or NULL. 1989 * @return the class or NULL.
1991 * 1990 *
1992 * @ingroup Eolian 1991 * @ingroup Eolian
1993 */ 1992 */
1994EAPI const Eolian_Class *eolian_type_class_get(const Eolian_Unit *unit, const Eolian_Type *tp); 1993EAPI const Eolian_Class *eolian_type_class_get(const Eolian_Type *tp);
1995 1994
1996/* 1995/*
1997 * @brief Get whether the given type is owned. 1996 * @brief Get whether the given type is owned.
diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c
index d733a93ed3..4528b7c9ed 100644
--- a/src/lib/eolian/database_type_api.c
+++ b/src/lib/eolian/database_type_api.c
@@ -312,12 +312,12 @@ eolian_typedecl_aliased_base_get(const Eolian_Unit *unit, const Eolian_Typedecl
312} 312}
313 313
314EAPI const Eolian_Class * 314EAPI const Eolian_Class *
315eolian_type_class_get(const Eolian_Unit *unit, const Eolian_Type *tp) 315eolian_type_class_get(const Eolian_Type *tp)
316{ 316{
317 EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL); 317 EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
318 if (eolian_type_type_get(tp) != EOLIAN_TYPE_CLASS) 318 if (eolian_type_type_get(tp) != EOLIAN_TYPE_CLASS)
319 return NULL; 319 return NULL;
320 return eolian_class_get_by_name(unit, tp->full_name); 320 return tp->klass;
321} 321}
322 322
323EAPI Eina_Bool 323EAPI Eina_Bool
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index b6e40b690a..fbbf26e03d 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -266,7 +266,7 @@ _validate_type(const Eolian_Unit *src, Eolian_Type *tp)
266 } 266 }
267 case EOLIAN_TYPE_CLASS: 267 case EOLIAN_TYPE_CLASS:
268 { 268 {
269 tp->klass = (Eolian_Class *)eolian_type_class_get(src, tp); 269 tp->klass = (Eolian_Class *)eolian_class_get_by_name(src, tp->full_name);
270 if (!tp->klass) 270 if (!tp->klass)
271 { 271 {
272 snprintf(buf, sizeof(buf), "undefined class %s " 272 snprintf(buf, sizeof(buf), "undefined class %s "
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index baaa61382e..e7e6018872 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -385,7 +385,7 @@ inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* uni
385 break; 385 break;
386 case EOLIAN_TYPE_CLASS: 386 case EOLIAN_TYPE_CLASS:
387 { 387 {
388 Eolian_Class const* klass = eolian_type_class_get(unit, eolian_type); 388 Eolian_Class const* klass = eolian_type_class_get(eolian_type);
389 original_type = klass_name(klass, {qualifiers(eolian_type), {}}); 389 original_type = klass_name(klass, {qualifiers(eolian_type), {}});
390 } 390 }
391 break; 391 break;