summaryrefslogtreecommitdiff
path: root/src/lib/eolian/database_function_api.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-08-07 15:15:07 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-08-07 15:15:07 +0100
commitda81b9a20f3d4ec09d1cf6f48c51f43eb5226103 (patch)
tree9ac1fa8fa7518fa0d75596c4b6b0c85715d46ec4 /src/lib/eolian/database_function_api.c
parentb865616d73165ad3691fa186fc8e06fed267c363 (diff)
downloadefl-da81b9a20f3d4ec09d1cf6f48c51f43eb5226103.tar.gz
eolian: initial API for expression evaluation
This commit also does several side (related) changes. Particularly, it updates the Eolian C generator to use the new API, it adds missing expr types (null, char) and masks, updates the API dealing with default return values to use expressions instead of strings and does several fixes (mainly in lexer) around the place. It also disallows single quoted strings as those are reserved for characters.
Diffstat (limited to 'src/lib/eolian/database_function_api.c')
-rw-r--r--src/lib/eolian/database_function_api.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/eolian/database_function_api.c b/src/lib/eolian/database_function_api.c
index fd088c722e..caf76472ed 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -126,18 +126,15 @@ eolian_function_return_type_get(const Eolian_Function *fid, Eolian_Function_Type
}
}
-EAPI Eina_Stringshare *
+EAPI const Eolian_Expression *
eolian_function_return_default_value_get(const Eolian_Function *fid, Eolian_Function_Type ftype)
{
- const char *key = NULL;
switch (ftype)
{
- case EOLIAN_PROP_SET: key = PROP_SET_RETURN_DEFAULT_VAL; break;
- case EOLIAN_PROP_GET: key = PROP_GET_RETURN_DEFAULT_VAL; break;
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: key = METHOD_RETURN_DEFAULT_VAL; break;
+ case EOLIAN_PROP_SET: return fid->set_ret_val;
+ case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROP_GET: return fid->get_ret_val;
default: return NULL;
}
- return eolian_function_data_get(fid, key);
}
EAPI Eina_Stringshare *