summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-01-12 16:56:49 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-01-12 16:56:49 +0100
commit078a4eef71a97ea869d8dfc8a8e60d90b8e42265 (patch)
tree8cb03b0c2b5a2f4712a76c3359162653387f6019 /src
parentdeb1e58e06120c95373fe54ef84fdfb0e7d1a851 (diff)
eolian: strict function type input checks in APIs
Strictness of various Eolian APIs has been enhanced, for example eolian_class_function_get_by_name now won't return anything if you request an EOLIAN_PROPERTY and the found func is just an EOLIAN_PROP_GET, and various APIs won't accept arbitrary inputs like EOLIAN_UNRESOLVED or EOLIAN_PROPERTY now, instead you will need to provide EOLIAN_PROP_GET, EOLIAN_PROP_SET or EOLIAN_METHOD explicitly. The purpose of this is to reduce potential bugs and fix ambiguous behavior. Thanks to use of EINA_SAFETY, appropriate errors should be printed into terminal when an API is used incorrectly.
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/elm_diskselector.eo4
-rw-r--r--src/lib/eolian/Eolian.h38
-rw-r--r--src/lib/eolian/database_class_api.c2
-rw-r--r--src/lib/eolian/database_fill.c4
-rw-r--r--src/lib/eolian/database_function.c12
-rw-r--r--src/lib/eolian/database_function_api.c193
-rw-r--r--src/lib/eolian/database_implement_api.c39
-rw-r--r--src/lib/eolian/eolian_database.h1
-rw-r--r--src/tests/eolian/eolian_parsing.c21
9 files changed, 262 insertions, 52 deletions
diff --git a/src/lib/elementary/elm_diskselector.eo b/src/lib/elementary/elm_diskselector.eo
index 9a74c00591..ae157b1ff0 100644
--- a/src/lib/elementary/elm_diskselector.eo
+++ b/src/lib/elementary/elm_diskselector.eo
@@ -129,8 +129,8 @@ class Elm.Diskselector (Elm.Widget, Elm.Interface_Scrollable,
129 [[Get the selected item. 129 [[Get the selected item.
130 130
131 131
132 The selected item can be unselected with function 132 The selected item can be unselected with
133 @.selected_item.set, and the first item of 133 @Elm.Diskselector.Item.selected.set, and the first item of
134 diskselector will be selected. 134 diskselector will be selected.
135 135
136 The selected item always will be centered on diskselector, with 136 The selected item always will be centered on diskselector, with
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 783c5b9a07..736892178b 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -655,6 +655,8 @@ EAPI Eina_Iterator *eolian_class_inherits_get(const Eolian_Class *klass);
655 * @param[in] func_type type of the functions to insert into the list. 655 * @param[in] func_type type of the functions to insert into the list.
656 * @return the iterator 656 * @return the iterator
657 * 657 *
658 * Acceptable inputs are EOLIAN_PROPERTY or EOLIAN_METHOD.
659 *
658 * @ingroup Eolian 660 * @ingroup Eolian
659 */ 661 */
660EAPI Eina_Iterator *eolian_class_functions_get(const Eolian_Class *klass, Eolian_Function_Type func_type); 662EAPI Eina_Iterator *eolian_class_functions_get(const Eolian_Class *klass, Eolian_Function_Type func_type);
@@ -676,6 +678,8 @@ EAPI Eolian_Function_Type eolian_function_type_get(const Eolian_Function *functi
676 * @param[in] ftype The type of function to get the scope for 678 * @param[in] ftype The type of function to get the scope for
677 * @return the function scope 679 * @return the function scope
678 * 680 *
681 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
682 *
679 * @ingroup Eolian 683 * @ingroup Eolian
680 */ 684 */
681EAPI Eolian_Object_Scope eolian_function_scope_get(const Eolian_Function *function_id, Eolian_Function_Type ftype); 685EAPI Eolian_Object_Scope eolian_function_scope_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
@@ -720,6 +724,10 @@ EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *fu
720 * @param[in] f_type type of the function 724 * @param[in] f_type type of the function
721 * @return the function id if found, NULL otherwise. 725 * @return the function id if found, NULL otherwise.
722 * 726 *
727 * Providing EOLIAN_UNRESOLVED finds any func, EOLIAN_PROPERTY any property,
728 * EOLIAN_METHOD any method, EOLIAN_PROP_GET properties with either only a getter
729 * or full property, EOLIAN_PROP_SET either only a setter or full property.
730 *
723 * @ingroup Eolian 731 * @ingroup Eolian
724 */ 732 */
725EAPI const Eolian_Function *eolian_class_function_get_by_name(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type); 733EAPI const Eolian_Function *eolian_class_function_get_by_name(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type);
@@ -731,6 +739,8 @@ EAPI const Eolian_Function *eolian_class_function_get_by_name(const Eolian_Class
731 * @param[in] f_type The function type, for property get/set distinction. 739 * @param[in] f_type The function type, for property get/set distinction.
732 * @return the legacy name or NULL. 740 * @return the legacy name or NULL.
733 * 741 *
742 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
743 *
734 * @ingroup Eolian 744 * @ingroup Eolian
735 */ 745 */
736EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type); 746EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
@@ -742,6 +752,8 @@ EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *functio
742 * @param[in] f_type The function type, for property get/set distinction. 752 * @param[in] f_type The function type, for property get/set distinction.
743 * @return the documentation or NULL. 753 * @return the documentation or NULL.
744 * 754 *
755 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
756 *
745 * @ingroup Eolian 757 * @ingroup Eolian
746 */ 758 */
747EAPI const Eolian_Documentation *eolian_function_documentation_get(const Eolian_Function *function_id, Eolian_Function_Type f_type); 759EAPI const Eolian_Documentation *eolian_function_documentation_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
@@ -753,6 +765,8 @@ EAPI const Eolian_Documentation *eolian_function_documentation_get(const Eolian_
753 * @param[in] f_type The function type, for property get/set distinction. 765 * @param[in] f_type The function type, for property get/set distinction.
754 * @return EINA_TRUE if virtual pure, EINA_FALSE othrewise. 766 * @return EINA_TRUE if virtual pure, EINA_FALSE othrewise.
755 * 767 *
768 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
769 *
756 * @ingroup Eolian 770 * @ingroup Eolian
757 */ 771 */
758EAPI Eina_Bool eolian_function_is_virtual_pure(const Eolian_Function *function_id, Eolian_Function_Type f_type); 772EAPI Eina_Bool eolian_function_is_virtual_pure(const Eolian_Function *function_id, Eolian_Function_Type f_type);
@@ -764,6 +778,8 @@ EAPI Eina_Bool eolian_function_is_virtual_pure(const Eolian_Function *function_i
764 * @param[in] f_type The function type, for property get/set distinction. 778 * @param[in] f_type The function type, for property get/set distinction.
765 * @return EINA_TRUE if auto, EINA_FALSE othrewise. 779 * @return EINA_TRUE if auto, EINA_FALSE othrewise.
766 * 780 *
781 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
782 *
767 * @ingroup Eolian 783 * @ingroup Eolian
768 */ 784 */
769EAPI Eina_Bool eolian_function_is_auto(const Eolian_Function *function_id, Eolian_Function_Type f_type); 785EAPI Eina_Bool eolian_function_is_auto(const Eolian_Function *function_id, Eolian_Function_Type f_type);
@@ -775,6 +791,8 @@ EAPI Eina_Bool eolian_function_is_auto(const Eolian_Function *function_id, Eolia
775 * @param[in] f_type The function type, for property get/set distinction. 791 * @param[in] f_type The function type, for property get/set distinction.
776 * @return EINA_TRUE if empty, EINA_FALSE othrewise. 792 * @return EINA_TRUE if empty, EINA_FALSE othrewise.
777 * 793 *
794 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
795 *
778 * @ingroup Eolian 796 * @ingroup Eolian
779 */ 797 */
780EAPI Eina_Bool eolian_function_is_empty(const Eolian_Function *function_id, Eolian_Function_Type f_type); 798EAPI Eina_Bool eolian_function_is_empty(const Eolian_Function *function_id, Eolian_Function_Type f_type);
@@ -786,6 +804,8 @@ EAPI Eina_Bool eolian_function_is_empty(const Eolian_Function *function_id, Eoli
786 * @param[in] f_type The function type, for property get/set distinction. 804 * @param[in] f_type The function type, for property get/set distinction.
787 * @return EINA_TRUE if legacy only, EINA_FALSE otherwise. 805 * @return EINA_TRUE if legacy only, EINA_FALSE otherwise.
788 * 806 *
807 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
808 *
789 * @ingroup Eolian 809 * @ingroup Eolian
790 */ 810 */
791EAPI Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype); 811EAPI Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype);
@@ -848,6 +868,8 @@ EAPI Eina_Iterator *eolian_function_parameters_get(const Eolian_Function *functi
848 * @param[in] ftype The function type, for property get/set distinction. 868 * @param[in] ftype The function type, for property get/set distinction.
849 * @return the iterator 869 * @return the iterator
850 * 870 *
871 * Acceptable input types are PROP_GET and PROP_SET.
872 *
851 * @ingroup Eolian 873 * @ingroup Eolian
852 */ 874 */
853EAPI Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype); 875EAPI Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
@@ -859,6 +881,8 @@ EAPI Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id, Eoli
859 * @param[in] ftype The function type, for property get/set distinction. 881 * @param[in] ftype The function type, for property get/set distinction.
860 * @return the iterator 882 * @return the iterator
861 * 883 *
884 * Acceptable input types are PROP_GET and PROP_SET.
885 *
862 * @ingroup Eolian 886 * @ingroup Eolian
863 */ 887 */
864EAPI Eina_Iterator *eolian_property_values_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype); 888EAPI Eina_Iterator *eolian_property_values_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
@@ -953,6 +977,8 @@ EAPI Eina_Bool eolian_parameter_is_optional(const Eolian_Function_Parameter *par
953 * The type of the function is needed because a given function can represent a 977 * The type of the function is needed because a given function can represent a
954 * property, that can be set and get functions. 978 * property, that can be set and get functions.
955 * 979 *
980 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
981 *
956 * @ingroup Eolian 982 * @ingroup Eolian
957 */ 983 */
958EAPI const Eolian_Type *eolian_function_return_type_get(const Eolian_Function *function_id, Eolian_Function_Type ftype); 984EAPI const Eolian_Type *eolian_function_return_type_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
@@ -968,6 +994,8 @@ EAPI const Eolian_Type *eolian_function_return_type_get(const Eolian_Function *f
968 * value if an error occurs (eo_do failure...). 994 * value if an error occurs (eo_do failure...).
969 * The default value is not mandatory, so NULL can be returned. 995 * The default value is not mandatory, so NULL can be returned.
970 * 996 *
997 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
998 *
971 * @ingroup Eolian 999 * @ingroup Eolian
972 */ 1000 */
973EAPI const Eolian_Expression * 1001EAPI const Eolian_Expression *
@@ -983,6 +1011,8 @@ eolian_function_return_default_value_get(const Eolian_Function *foo_id, Eolian_F
983 * The type of the function is needed because a given function can represent a 1011 * The type of the function is needed because a given function can represent a
984 * property, that can be set and get functions. 1012 * property, that can be set and get functions.
985 * 1013 *
1014 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
1015 *
986 * @ingroup Eolian 1016 * @ingroup Eolian
987 */ 1017 */
988EAPI const Eolian_Documentation *eolian_function_return_documentation_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype); 1018EAPI const Eolian_Documentation *eolian_function_return_documentation_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
@@ -997,6 +1027,8 @@ EAPI const Eolian_Documentation *eolian_function_return_documentation_get(const
997 * The type of the function is needed because a given function can represent a 1027 * The type of the function is needed because a given function can represent a
998 * property, that can be set and get functions. 1028 * property, that can be set and get functions.
999 * 1029 *
1030 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
1031 *
1000 * @ingroup Eolian 1032 * @ingroup Eolian
1001 */ 1033 */
1002EAPI Eina_Bool eolian_function_return_is_warn_unused(const Eolian_Function *foo_id, Eolian_Function_Type ftype); 1034EAPI Eina_Bool eolian_function_return_is_warn_unused(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
@@ -1059,6 +1091,8 @@ EAPI const Eolian_Function *eolian_implement_function_get(const Eolian_Implement
1059 * @param[in] f_type The function type, for property get/set distinction. 1091 * @param[in] f_type The function type, for property get/set distinction.
1060 * @return EINA_TRUE when it is, EINA_FALSE when it's not. 1092 * @return EINA_TRUE when it is, EINA_FALSE when it's not.
1061 * 1093 *
1094 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
1095 *
1062 * @ingroup Eolian 1096 * @ingroup Eolian
1063 */ 1097 */
1064EAPI Eina_Bool eolian_implement_is_auto(const Eolian_Implement *impl, Eolian_Function_Type f_type); 1098EAPI Eina_Bool eolian_implement_is_auto(const Eolian_Implement *impl, Eolian_Function_Type f_type);
@@ -1070,6 +1104,8 @@ EAPI Eina_Bool eolian_implement_is_auto(const Eolian_Implement *impl, Eolian_Fun
1070 * @param[in] f_type The function type, for property get/set distinction. 1104 * @param[in] f_type The function type, for property get/set distinction.
1071 * @return EINA_TRUE when it is, EINA_FALSE when it's not. 1105 * @return EINA_TRUE when it is, EINA_FALSE when it's not.
1072 * 1106 *
1107 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
1108 *
1073 * @ingroup Eolian 1109 * @ingroup Eolian
1074 */ 1110 */
1075EAPI Eina_Bool eolian_implement_is_empty(const Eolian_Implement *impl, Eolian_Function_Type f_type); 1111EAPI Eina_Bool eolian_implement_is_empty(const Eolian_Implement *impl, Eolian_Function_Type f_type);
@@ -1081,6 +1117,8 @@ EAPI Eina_Bool eolian_implement_is_empty(const Eolian_Implement *impl, Eolian_Fu
1081 * @param[in] f_type The function type, for property get/set distinction. 1117 * @param[in] f_type The function type, for property get/set distinction.
1082 * @return EINA_TRUE when it is, EINA_FALSE when it's not. 1118 * @return EINA_TRUE when it is, EINA_FALSE when it's not.
1083 * 1119 *
1120 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
1121 *
1084 * @ingroup Eolian 1122 * @ingroup Eolian
1085 */ 1123 */
1086EAPI Eina_Bool eolian_implement_is_virtual(const Eolian_Implement *impl, Eolian_Function_Type f_type); 1124EAPI Eina_Bool eolian_implement_is_virtual(const Eolian_Implement *impl, Eolian_Function_Type f_type);
diff --git a/src/lib/eolian/database_class_api.c b/src/lib/eolian/database_class_api.c
index 3086ecfccc..ebbe5ddc5f 100644
--- a/src/lib/eolian/database_class_api.c
+++ b/src/lib/eolian/database_class_api.c
@@ -138,6 +138,8 @@ eolian_class_function_get_by_name(const Eolian_Class *cl, const char *func_name,
138 { 138 {
139 EINA_LIST_FOREACH(cl->properties, itr, fid) 139 EINA_LIST_FOREACH(cl->properties, itr, fid)
140 { 140 {
141 if (!database_function_is_type(fid, f_type))
142 continue;
141 if (!strcmp(fid->name, func_name)) 143 if (!strcmp(fid->name, func_name))
142 return fid; 144 return fid;
143 } 145 }
diff --git a/src/lib/eolian/database_fill.c b/src/lib/eolian/database_fill.c
index b904a57232..2f47145797 100644
--- a/src/lib/eolian/database_fill.c
+++ b/src/lib/eolian/database_fill.c
@@ -129,7 +129,7 @@ static Eina_Bool
129_db_fill_implement(Eolian_Class *cl, Eolian_Implement *impl) 129_db_fill_implement(Eolian_Class *cl, Eolian_Implement *impl)
130{ 130{
131 Eolian_Function *foo_id; 131 Eolian_Function *foo_id;
132 Eolian_Function_Type ftype = EOLIAN_UNRESOLVED; 132 Eolian_Function_Type ftype = EOLIAN_METHOD;
133 133
134 if (impl->is_prop_get && impl->is_prop_set) 134 if (impl->is_prop_get && impl->is_prop_set)
135 ftype = EOLIAN_PROPERTY; 135 ftype = EOLIAN_PROPERTY;
@@ -147,7 +147,7 @@ _db_fill_implement(Eolian_Class *cl, Eolian_Implement *impl)
147 foo_id->set_empty = impl->set_empty; 147 foo_id->set_empty = impl->set_empty;
148 if (foo_id->get_auto || foo_id->get_empty) 148 if (foo_id->get_auto || foo_id->get_empty)
149 { 149 {
150 if (ftype == EOLIAN_UNRESOLVED) 150 if (ftype == EOLIAN_METHOD)
151 foo_id->set_impl = impl; 151 foo_id->set_impl = impl;
152 foo_id->get_impl = impl; 152 foo_id->get_impl = impl;
153 } 153 }
diff --git a/src/lib/eolian/database_function.c b/src/lib/eolian/database_function.c
index 454c511a29..0ad9f2fdcf 100644
--- a/src/lib/eolian/database_function.c
+++ b/src/lib/eolian/database_function.c
@@ -60,3 +60,15 @@ database_function_constructor_add(Eolian_Function *func, const Eolian_Class *cls
60 (func->ctor_of, EINA_COMPARE_CB(strcmp), 60 (func->ctor_of, EINA_COMPARE_CB(strcmp),
61 eina_stringshare_ref(cls->full_name)); 61 eina_stringshare_ref(cls->full_name));
62} 62}
63
64Eina_Bool
65database_function_is_type(Eolian_Function *fid, Eolian_Function_Type ftype)
66{
67 if (ftype == EOLIAN_UNRESOLVED)
68 return EINA_TRUE;
69 else if (ftype == EOLIAN_PROP_GET)
70 return (fid->type == EOLIAN_PROP_GET) || (fid->type == EOLIAN_PROPERTY);
71 else if (ftype == EOLIAN_PROP_SET)
72 return (fid->type == EOLIAN_PROP_SET) || (fid->type == EOLIAN_PROPERTY);
73 return (fid->type == ftype);
74} \ No newline at end of file
diff --git a/src/lib/eolian/database_function_api.c b/src/lib/eolian/database_function_api.c
index fd12325890..6266ca476e 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -9,11 +9,24 @@ EAPI Eolian_Object_Scope
9eolian_function_scope_get(const Eolian_Function *fid, Eolian_Function_Type ftype) 9eolian_function_scope_get(const Eolian_Function *fid, Eolian_Function_Type ftype)
10{ 10{
11 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EOLIAN_SCOPE_PUBLIC); 11 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EOLIAN_SCOPE_PUBLIC);
12 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EOLIAN_SCOPE_PUBLIC);
13 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EOLIAN_SCOPE_PUBLIC);
12 switch (ftype) 14 switch (ftype)
13 { 15 {
14 case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_scope; break; 16 case EOLIAN_METHOD:
15 case EOLIAN_PROP_SET: return fid->set_scope; break; 17 if (fid->type != EOLIAN_METHOD)
16 default: return EOLIAN_SCOPE_PUBLIC; 18 return EOLIAN_SCOPE_PUBLIC;
19 return fid->get_scope;
20 case EOLIAN_PROP_GET:
21 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
22 return EOLIAN_SCOPE_PUBLIC;
23 return fid->get_scope;
24 case EOLIAN_PROP_SET:
25 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
26 return EOLIAN_SCOPE_PUBLIC;
27 return fid->set_scope;
28 default:
29 return EOLIAN_SCOPE_PUBLIC;
17 } 30 }
18} 31}
19 32
@@ -150,11 +163,24 @@ EAPI Eina_Stringshare *
150eolian_function_legacy_get(const Eolian_Function *fid, Eolian_Function_Type ftype) 163eolian_function_legacy_get(const Eolian_Function *fid, Eolian_Function_Type ftype)
151{ 164{
152 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL); 165 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
166 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, NULL);
167 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, NULL);
153 switch (ftype) 168 switch (ftype)
154 { 169 {
155 case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_legacy; break; 170 case EOLIAN_METHOD:
156 case EOLIAN_PROP_SET: return fid->set_legacy; break; 171 if (fid->type != EOLIAN_METHOD)
157 default: return NULL; 172 return NULL;
173 return fid->get_legacy;
174 case EOLIAN_PROP_GET:
175 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
176 return NULL;
177 return fid->get_legacy;
178 case EOLIAN_PROP_SET:
179 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
180 return NULL;
181 return fid->set_legacy;
182 default:
183 return NULL;
158 } 184 }
159} 185}
160 186
@@ -174,11 +200,24 @@ EAPI Eina_Bool
174eolian_function_is_virtual_pure(const Eolian_Function *fid, Eolian_Function_Type ftype) 200eolian_function_is_virtual_pure(const Eolian_Function *fid, Eolian_Function_Type ftype)
175{ 201{
176 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE); 202 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
203 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
204 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
177 switch (ftype) 205 switch (ftype)
178 { 206 {
179 case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_virtual_pure; break; 207 case EOLIAN_METHOD:
180 case EOLIAN_PROP_SET: return fid->set_virtual_pure; break; 208 if (fid->type != EOLIAN_METHOD)
181 default: return EINA_FALSE; 209 return EINA_FALSE;
210 return fid->get_virtual_pure;
211 case EOLIAN_PROP_GET:
212 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
213 return EINA_FALSE;
214 return fid->get_virtual_pure;
215 case EOLIAN_PROP_SET:
216 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
217 return EINA_FALSE;
218 return fid->set_virtual_pure;
219 default:
220 return EINA_FALSE;
182 } 221 }
183} 222}
184 223
@@ -186,11 +225,24 @@ EAPI Eina_Bool
186eolian_function_is_auto(const Eolian_Function *fid, Eolian_Function_Type ftype) 225eolian_function_is_auto(const Eolian_Function *fid, Eolian_Function_Type ftype)
187{ 226{
188 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE); 227 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
228 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
229 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
189 switch (ftype) 230 switch (ftype)
190 { 231 {
191 case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_auto; break; 232 case EOLIAN_METHOD:
192 case EOLIAN_PROP_SET: return fid->set_auto; break; 233 if (fid->type != EOLIAN_METHOD)
193 default: return EINA_FALSE; 234 return EINA_FALSE;
235 return fid->get_auto;
236 case EOLIAN_PROP_GET:
237 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
238 return EINA_FALSE;
239 return fid->get_auto;
240 case EOLIAN_PROP_SET:
241 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
242 return EINA_FALSE;
243 return fid->set_auto;
244 default:
245 return EINA_FALSE;
194 } 246 }
195} 247}
196 248
@@ -198,11 +250,24 @@ EAPI Eina_Bool
198eolian_function_is_empty(const Eolian_Function *fid, Eolian_Function_Type ftype) 250eolian_function_is_empty(const Eolian_Function *fid, Eolian_Function_Type ftype)
199{ 251{
200 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE); 252 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
253 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
254 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
201 switch (ftype) 255 switch (ftype)
202 { 256 {
203 case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_empty; break; 257 case EOLIAN_METHOD:
204 case EOLIAN_PROP_SET: return fid->set_empty; break; 258 if (fid->type != EOLIAN_METHOD)
205 default: return EINA_FALSE; 259 return EINA_FALSE;
260 return fid->get_empty;
261 case EOLIAN_PROP_GET:
262 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
263 return EINA_FALSE;
264 return fid->get_empty;
265 case EOLIAN_PROP_SET:
266 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
267 return EINA_FALSE;
268 return fid->set_empty;
269 default:
270 return EINA_FALSE;
206 } 271 }
207} 272}
208 273
@@ -210,11 +275,24 @@ EAPI Eina_Bool
210eolian_function_is_legacy_only(const Eolian_Function *fid, Eolian_Function_Type ftype) 275eolian_function_is_legacy_only(const Eolian_Function *fid, Eolian_Function_Type ftype)
211{ 276{
212 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE); 277 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
278 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
279 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
213 switch (ftype) 280 switch (ftype)
214 { 281 {
215 case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_only_legacy; break; 282 case EOLIAN_METHOD:
216 case EOLIAN_PROP_SET: return fid->set_only_legacy; break; 283 if (fid->type != EOLIAN_METHOD)
217 default: return EINA_FALSE; 284 return EINA_FALSE;
285 return fid->get_only_legacy;
286 case EOLIAN_PROP_GET:
287 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
288 return EINA_FALSE;
289 return fid->get_only_legacy;
290 case EOLIAN_PROP_SET:
291 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
292 return EINA_FALSE;
293 return fid->set_only_legacy;
294 default:
295 return EINA_FALSE;
218 } 296 }
219} 297}
220 298
@@ -288,33 +366,75 @@ eolian_function_parameters_get(const Eolian_Function *fid)
288EAPI const Eolian_Type * 366EAPI const Eolian_Type *
289eolian_function_return_type_get(const Eolian_Function *fid, Eolian_Function_Type ftype) 367eolian_function_return_type_get(const Eolian_Function *fid, Eolian_Function_Type ftype)
290{ 368{
369 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
370 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, NULL);
371 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, NULL);
291 switch (ftype) 372 switch (ftype)
292 { 373 {
293 case EOLIAN_PROP_SET: return fid->set_ret_type; 374 case EOLIAN_METHOD:
294 case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROP_GET: return fid->get_ret_type; 375 if (fid->type != EOLIAN_METHOD)
295 default: return NULL; 376 return NULL;
377 return fid->get_ret_type;
378 case EOLIAN_PROP_GET:
379 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
380 return NULL;
381 return fid->get_ret_type;
382 case EOLIAN_PROP_SET:
383 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
384 return NULL;
385 return fid->set_ret_type;
386 default:
387 return NULL;
296 } 388 }
297} 389}
298 390
299EAPI const Eolian_Expression * 391EAPI const Eolian_Expression *
300eolian_function_return_default_value_get(const Eolian_Function *fid, Eolian_Function_Type ftype) 392eolian_function_return_default_value_get(const Eolian_Function *fid, Eolian_Function_Type ftype)
301{ 393{
394 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
395 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, NULL);
396 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, NULL);
302 switch (ftype) 397 switch (ftype)
303 { 398 {
304 case EOLIAN_PROP_SET: return fid->set_ret_val; 399 case EOLIAN_METHOD:
305 case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_ret_val; 400 if (fid->type != EOLIAN_METHOD)
306 default: return NULL; 401 return NULL;
402 return fid->get_ret_val;
403 case EOLIAN_PROP_GET:
404 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
405 return NULL;
406 return fid->get_ret_val;
407 case EOLIAN_PROP_SET:
408 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
409 return NULL;
410 return fid->set_ret_val;
411 default:
412 return NULL;
307 } 413 }
308} 414}
309 415
310EAPI const Eolian_Documentation * 416EAPI const Eolian_Documentation *
311eolian_function_return_documentation_get(const Eolian_Function *fid, Eolian_Function_Type ftype) 417eolian_function_return_documentation_get(const Eolian_Function *fid, Eolian_Function_Type ftype)
312{ 418{
419 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
420 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, NULL);
421 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, NULL);
313 switch (ftype) 422 switch (ftype)
314 { 423 {
315 case EOLIAN_PROP_SET: return fid->set_return_doc; break; 424 case EOLIAN_METHOD:
316 case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_return_doc; break; 425 if (fid->type != EOLIAN_METHOD)
317 default: return NULL; 426 return NULL;
427 return fid->get_return_doc;
428 case EOLIAN_PROP_GET:
429 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
430 return NULL;
431 return fid->get_return_doc;
432 case EOLIAN_PROP_SET:
433 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
434 return NULL;
435 return fid->set_return_doc;
436 default:
437 return NULL;
318 } 438 }
319} 439}
320 440
@@ -323,11 +443,24 @@ eolian_function_return_is_warn_unused(const Eolian_Function *fid,
323 Eolian_Function_Type ftype) 443 Eolian_Function_Type ftype)
324{ 444{
325 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE); 445 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
446 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
447 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
326 switch (ftype) 448 switch (ftype)
327 { 449 {
328 case EOLIAN_PROP_SET: return fid->set_return_warn_unused; 450 case EOLIAN_METHOD:
329 case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_return_warn_unused; 451 if (fid->type != EOLIAN_METHOD)
330 default: return EINA_FALSE; 452 return EINA_FALSE;
453 return fid->get_return_warn_unused;
454 case EOLIAN_PROP_GET:
455 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
456 return EINA_FALSE;
457 return fid->get_return_warn_unused;
458 case EOLIAN_PROP_SET:
459 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
460 return EINA_FALSE;
461 return fid->set_return_warn_unused;
462 default:
463 return EINA_FALSE;
331 } 464 }
332} 465}
333 466
diff --git a/src/lib/eolian/database_implement_api.c b/src/lib/eolian/database_implement_api.c
index 4cd31dbd24..d97e5849d9 100644
--- a/src/lib/eolian/database_implement_api.c
+++ b/src/lib/eolian/database_implement_api.c
@@ -47,11 +47,18 @@ EAPI Eina_Bool
47eolian_implement_is_auto(const Eolian_Implement *impl, Eolian_Function_Type ftype) 47eolian_implement_is_auto(const Eolian_Implement *impl, Eolian_Function_Type ftype)
48{ 48{
49 EINA_SAFETY_ON_NULL_RETURN_VAL(impl, EINA_FALSE); 49 EINA_SAFETY_ON_NULL_RETURN_VAL(impl, EINA_FALSE);
50 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
51 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
50 switch (ftype) 52 switch (ftype)
51 { 53 {
52 case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return impl->get_auto; break; 54 case EOLIAN_METHOD:
53 case EOLIAN_PROP_SET: return impl->set_auto; break; 55 return impl->get_auto && !impl->is_prop_get && !impl->is_prop_set;
54 default: return EINA_FALSE; 56 case EOLIAN_PROP_GET:
57 return impl->get_auto && impl->is_prop_get;
58 case EOLIAN_PROP_SET:
59 return impl->set_auto && impl->is_prop_set;
60 default:
61 return EINA_FALSE;
55 } 62 }
56} 63}
57 64
@@ -59,11 +66,18 @@ EAPI Eina_Bool
59eolian_implement_is_empty(const Eolian_Implement *impl, Eolian_Function_Type ftype) 66eolian_implement_is_empty(const Eolian_Implement *impl, Eolian_Function_Type ftype)
60{ 67{
61 EINA_SAFETY_ON_NULL_RETURN_VAL(impl, EINA_FALSE); 68 EINA_SAFETY_ON_NULL_RETURN_VAL(impl, EINA_FALSE);
69 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
70 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
62 switch (ftype) 71 switch (ftype)
63 { 72 {
64 case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return impl->get_empty; break; 73 case EOLIAN_METHOD:
65 case EOLIAN_PROP_SET: return impl->set_empty; break; 74 return impl->get_empty && !impl->is_prop_get && !impl->is_prop_set;
66 default: return EINA_FALSE; 75 case EOLIAN_PROP_GET:
76 return impl->get_empty && impl->is_prop_get;
77 case EOLIAN_PROP_SET:
78 return impl->set_empty && impl->is_prop_set;
79 default:
80 return EINA_FALSE;
67 } 81 }
68} 82}
69 83
@@ -71,11 +85,18 @@ EAPI Eina_Bool
71eolian_implement_is_virtual(const Eolian_Implement *impl, Eolian_Function_Type ftype) 85eolian_implement_is_virtual(const Eolian_Implement *impl, Eolian_Function_Type ftype)
72{ 86{
73 EINA_SAFETY_ON_NULL_RETURN_VAL(impl, EINA_FALSE); 87 EINA_SAFETY_ON_NULL_RETURN_VAL(impl, EINA_FALSE);
88 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
89 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
74 switch (ftype) 90 switch (ftype)
75 { 91 {
76 case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return impl->get_virtual; break; 92 case EOLIAN_METHOD:
77 case EOLIAN_PROP_SET: return impl->set_virtual; break; 93 return impl->get_virtual && !impl->is_prop_get && !impl->is_prop_set;
78 default: return EINA_FALSE; 94 case EOLIAN_PROP_GET:
95 return impl->get_virtual && impl->is_prop_get;
96 case EOLIAN_PROP_SET:
97 return impl->set_virtual && impl->is_prop_set;
98 default:
99 return EINA_FALSE;
79 } 100 }
80} 101}
81 102
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index 0c8157a07b..2bb2122b24 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -325,6 +325,7 @@ void database_class_del(Eolian_Class *cl);
325/* functions */ 325/* functions */
326void database_function_del(Eolian_Function *fid); 326void database_function_del(Eolian_Function *fid);
327void database_function_constructor_add(Eolian_Function *func, const Eolian_Class *klass); 327void database_function_constructor_add(Eolian_Function *func, const Eolian_Class *klass);
328Eina_Bool database_function_is_type(Eolian_Function *fid, Eolian_Function_Type ftype);
328 329
329/* func parameters */ 330/* func parameters */
330void database_parameter_del(Eolian_Function_Parameter *pdesc); 331void database_parameter_del(Eolian_Function_Parameter *pdesc);
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index 3e8e4eb1ad..fc94534c67 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -186,8 +186,8 @@ START_TEST(eolian_override)
186 fail_if(!(base = eolian_class_get_by_name("Base"))); 186 fail_if(!(base = eolian_class_get_by_name("Base")));
187 187
188 /* Base ctor */ 188 /* Base ctor */
189 fail_if(!(fid = eolian_class_function_get_by_name(base, "constructor", EOLIAN_UNRESOLVED))); 189 fail_if(!(fid = eolian_class_function_get_by_name(base, "constructor", EOLIAN_METHOD)));
190 fail_if(!eolian_function_is_virtual_pure(fid, EOLIAN_UNRESOLVED)); 190 fail_if(!eolian_function_is_virtual_pure(fid, EOLIAN_METHOD));
191 191
192 /* Property */ 192 /* Property */
193 fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY))); 193 fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY)));
@@ -499,10 +499,11 @@ START_TEST(eolian_scope)
499 fail_if(!(class = eolian_class_get_by_name("Scope"))); 499 fail_if(!(class = eolian_class_get_by_name("Scope")));
500 500
501 /* Property scope */ 501 /* Property scope */
502 fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY))); 502 fail_if(eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY));
503 fail_if(eolian_function_scope_get(fid, EOLIAN_PROPERTY) != EOLIAN_SCOPE_PROTECTED); 503 fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROP_GET)));
504 fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY))); 504 fail_if(eolian_function_scope_get(fid, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PROTECTED);
505 fail_if(eolian_function_scope_get(fid, EOLIAN_PROPERTY) != EOLIAN_SCOPE_PUBLIC); 505 fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROP_GET)));
506 fail_if(eolian_function_scope_get(fid, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PUBLIC);
506 fail_if(!(fid = eolian_class_function_get_by_name(class, "c", EOLIAN_PROPERTY))); 507 fail_if(!(fid = eolian_class_function_get_by_name(class, "c", EOLIAN_PROPERTY)));
507 fail_if(eolian_function_scope_get(fid, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PUBLIC); 508 fail_if(eolian_function_scope_get(fid, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PUBLIC);
508 fail_if(eolian_function_scope_get(fid, EOLIAN_PROP_SET) != EOLIAN_SCOPE_PROTECTED); 509 fail_if(eolian_function_scope_get(fid, EOLIAN_PROP_SET) != EOLIAN_SCOPE_PROTECTED);
@@ -590,7 +591,8 @@ START_TEST(eolian_simple_parsing)
590 fail_if(v.value.i != 100); 591 fail_if(v.value.i != 100);
591 592
592 /* legacy only + c only */ 593 /* legacy only + c only */
593 fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY))); 594 fail_if(eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY));
595 fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROP_SET)));
594 fail_if(eolian_function_is_legacy_only(fid, EOLIAN_PROP_GET)); 596 fail_if(eolian_function_is_legacy_only(fid, EOLIAN_PROP_GET));
595 fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_PROP_SET)); 597 fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_PROP_SET));
596 fail_if(!eolian_function_is_c_only(fid)); 598 fail_if(!eolian_function_is_c_only(fid));
@@ -945,9 +947,10 @@ START_TEST(eolian_class_funcs)
945 fail_if(!(class = eolian_class_get_by_name("Class_Funcs"))); 947 fail_if(!(class = eolian_class_get_by_name("Class_Funcs")));
946 948
947 /* Class properties */ 949 /* Class properties */
948 fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY))); 950 fail_if(eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY));
951 fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROP_GET)));
949 fail_if(!eolian_function_is_class(fid)); 952 fail_if(!eolian_function_is_class(fid));
950 fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY))); 953 fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROP_GET)));
951 fail_if(eolian_function_is_class(fid)); 954 fail_if(eolian_function_is_class(fid));
952 955
953 /* Class methods */ 956 /* Class methods */