summaryrefslogtreecommitdiff
path: root/src/lib/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-09-03 15:03:44 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-09-03 16:51:58 +0200
commit99754341e757fe948c3eefe57bc4c09f4521dd52 (patch)
treeaa7af4f9ee296dcb4817a25bc81f3903bf91207f /src/lib/eolian
parentd9551af6e1d9ade3686e5a697b20b616c82f6784 (diff)
eolian: add support for function pointers in utility APIs
Diffstat (limited to 'src/lib/eolian')
-rw-r--r--src/lib/eolian/database_function_api.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/lib/eolian/database_function_api.c b/src/lib/eolian/database_function_api.c
index 35edeb391e..15bbfde785 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -192,7 +192,8 @@ eolian_function_return_type_get(const Eolian_Function *fid, Eolian_Function_Type
192 switch (ftype) 192 switch (ftype)
193 { 193 {
194 case EOLIAN_METHOD: 194 case EOLIAN_METHOD:
195 if (fid->type != EOLIAN_METHOD) 195 case EOLIAN_FUNCTION_POINTER:
196 if (fid->type != ftype)
196 return NULL; 197 return NULL;
197 return fid->get_ret_type; 198 return fid->get_ret_type;
198 case EOLIAN_PROP_GET: 199 case EOLIAN_PROP_GET:
@@ -203,8 +204,6 @@ eolian_function_return_type_get(const Eolian_Function *fid, Eolian_Function_Type
203 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY)) 204 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
204 return NULL; 205 return NULL;
205 return fid->set_ret_type; 206 return fid->set_ret_type;
206 case EOLIAN_FUNCTION_POINTER:
207 return (fid->type != EOLIAN_FUNCTION_POINTER) ? NULL : fid->get_ret_type;
208 default: 207 default:
209 return NULL; 208 return NULL;
210 } 209 }
@@ -219,7 +218,8 @@ eolian_function_return_default_value_get(const Eolian_Function *fid, Eolian_Func
219 switch (ftype) 218 switch (ftype)
220 { 219 {
221 case EOLIAN_METHOD: 220 case EOLIAN_METHOD:
222 if (fid->type != EOLIAN_METHOD) 221 case EOLIAN_FUNCTION_POINTER:
222 if (fid->type != ftype)
223 return NULL; 223 return NULL;
224 return fid->get_ret_val; 224 return fid->get_ret_val;
225 case EOLIAN_PROP_GET: 225 case EOLIAN_PROP_GET:
@@ -244,7 +244,8 @@ eolian_function_return_documentation_get(const Eolian_Function *fid, Eolian_Func
244 switch (ftype) 244 switch (ftype)
245 { 245 {
246 case EOLIAN_METHOD: 246 case EOLIAN_METHOD:
247 if (fid->type != EOLIAN_METHOD) 247 case EOLIAN_FUNCTION_POINTER:
248 if (fid->type != ftype)
248 return NULL; 249 return NULL;
249 return fid->get_return_doc; 250 return fid->get_return_doc;
250 case EOLIAN_PROP_GET: 251 case EOLIAN_PROP_GET:
@@ -270,7 +271,8 @@ eolian_function_return_allow_unused(const Eolian_Function *fid,
270 switch (ftype) 271 switch (ftype)
271 { 272 {
272 case EOLIAN_METHOD: 273 case EOLIAN_METHOD:
273 if (fid->type != EOLIAN_METHOD) 274 case EOLIAN_FUNCTION_POINTER:
275 if (fid->type != ftype)
274 return EINA_TRUE; 276 return EINA_TRUE;
275 return !fid->get_return_no_unused; 277 return !fid->get_return_no_unused;
276 case EOLIAN_PROP_GET: 278 case EOLIAN_PROP_GET:
@@ -296,7 +298,8 @@ eolian_function_return_is_by_ref(const Eolian_Function *fid,
296 switch (ftype) 298 switch (ftype)
297 { 299 {
298 case EOLIAN_METHOD: 300 case EOLIAN_METHOD:
299 if (fid->type != EOLIAN_METHOD) 301 case EOLIAN_FUNCTION_POINTER:
302 if (fid->type != ftype)
300 return EINA_FALSE; 303 return EINA_FALSE;
301 return fid->get_return_by_ref; 304 return fid->get_return_by_ref;
302 case EOLIAN_PROP_GET: 305 case EOLIAN_PROP_GET:
@@ -322,7 +325,8 @@ eolian_function_return_is_move(const Eolian_Function *fid,
322 switch (ftype) 325 switch (ftype)
323 { 326 {
324 case EOLIAN_METHOD: 327 case EOLIAN_METHOD:
325 if (fid->type != EOLIAN_METHOD) 328 case EOLIAN_FUNCTION_POINTER:
329 if (fid->type != ftype)
326 return EINA_FALSE; 330 return EINA_FALSE;
327 return fid->get_return_move; 331 return fid->get_return_move;
328 case EOLIAN_PROP_GET: 332 case EOLIAN_PROP_GET: