summaryrefslogtreecommitdiff
path: root/src/lib/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-09-26 16:56:13 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-09-26 16:56:13 +0200
commitb0ee540ec9a52824c79f42bff4fc6e06e0492f96 (patch)
tree8b60cbbc5d93f771b09695d74de849eeb6722c7f /src/lib/eolian
parentcdff7852e03840fddb28e6ac451be80cfd877b94 (diff)
eolian: rename param direction enum and fields for consistency
Diffstat (limited to 'src/lib/eolian')
-rw-r--r--src/lib/eolian/Eolian.h12
-rw-r--r--src/lib/eolian/database_function_parameter_api.c4
-rw-r--r--src/lib/eolian/eo_parser.c14
-rw-r--r--src/lib/eolian/eolian_database.h2
4 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index e76ac6fa84..db0421634a 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -242,11 +242,11 @@ typedef enum
242 242
243typedef enum 243typedef enum
244{ 244{
245 EOLIAN_UNKNOWN_PARAM = 0, 245 EOLIAN_PARAMETER_UNKNOWN = 0,
246 EOLIAN_IN_PARAM, 246 EOLIAN_PARAMETER_IN,
247 EOLIAN_OUT_PARAM, 247 EOLIAN_PARAMETER_OUT,
248 EOLIAN_INOUT_PARAM 248 EOLIAN_PARAMETER_INOUT
249} Eolian_Parameter_Dir; 249} Eolian_Parameter_Direction;
250 250
251typedef enum 251typedef enum
252{ 252{
@@ -1747,7 +1747,7 @@ EAPI Eina_Iterator *eolian_property_values_get(const Eolian_Function *foo_id, Eo
1747 * 1747 *
1748 * @ingroup Eolian 1748 * @ingroup Eolian
1749 */ 1749 */
1750EAPI Eolian_Parameter_Dir eolian_parameter_direction_get(const Eolian_Function_Parameter *param); 1750EAPI Eolian_Parameter_Direction eolian_parameter_direction_get(const Eolian_Function_Parameter *param);
1751 1751
1752/* 1752/*
1753 * @brief Get type of a parameter 1753 * @brief Get type of a parameter
diff --git a/src/lib/eolian/database_function_parameter_api.c b/src/lib/eolian/database_function_parameter_api.c
index 341b287978..f3b03388d8 100644
--- a/src/lib/eolian/database_function_parameter_api.c
+++ b/src/lib/eolian/database_function_parameter_api.c
@@ -5,10 +5,10 @@
5#include <Eina.h> 5#include <Eina.h>
6#include "eolian_database.h" 6#include "eolian_database.h"
7 7
8EAPI Eolian_Parameter_Dir 8EAPI Eolian_Parameter_Direction
9eolian_parameter_direction_get(const Eolian_Function_Parameter *param) 9eolian_parameter_direction_get(const Eolian_Function_Parameter *param)
10{ 10{
11 EINA_SAFETY_ON_NULL_RETURN_VAL(param, EOLIAN_UNKNOWN_PARAM); 11 EINA_SAFETY_ON_NULL_RETURN_VAL(param, EOLIAN_PARAMETER_UNKNOWN);
12 return param->param_dir; 12 return param->param_dir;
13} 13}
14 14
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 519841a7ab..706d6c1c37 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1079,33 +1079,33 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
1079 has_move = EINA_FALSE, 1079 has_move = EINA_FALSE,
1080 has_by_ref = EINA_FALSE; 1080 has_by_ref = EINA_FALSE;
1081 Eolian_Function_Parameter *par = calloc(1, sizeof(Eolian_Function_Parameter)); 1081 Eolian_Function_Parameter *par = calloc(1, sizeof(Eolian_Function_Parameter));
1082 par->param_dir = EOLIAN_IN_PARAM; 1082 par->param_dir = EOLIAN_PARAMETER_IN;
1083 FILL_BASE(par->base, ls, ls->line_number, ls->column, FUNCTION_PARAMETER); 1083 FILL_BASE(par->base, ls, ls->line_number, ls->column, FUNCTION_PARAMETER);
1084 *params = eina_list_append(*params, par); 1084 *params = eina_list_append(*params, par);
1085 eolian_object_ref(&par->base); 1085 eolian_object_ref(&par->base);
1086 if (allow_inout && (ls->t.kw == KW_at_in)) 1086 if (allow_inout && (ls->t.kw == KW_at_in))
1087 { 1087 {
1088 par->param_dir = EOLIAN_IN_PARAM; 1088 par->param_dir = EOLIAN_PARAMETER_IN;
1089 eo_lexer_get(ls); 1089 eo_lexer_get(ls);
1090 } 1090 }
1091 else if (allow_inout && ls->t.kw == KW_at_out) 1091 else if (allow_inout && ls->t.kw == KW_at_out)
1092 { 1092 {
1093 par->param_dir = EOLIAN_OUT_PARAM; 1093 par->param_dir = EOLIAN_PARAMETER_OUT;
1094 eo_lexer_get(ls); 1094 eo_lexer_get(ls);
1095 } 1095 }
1096 else if (allow_inout && ls->t.kw == KW_at_inout) 1096 else if (allow_inout && ls->t.kw == KW_at_inout)
1097 { 1097 {
1098 par->param_dir = EOLIAN_INOUT_PARAM; 1098 par->param_dir = EOLIAN_PARAMETER_INOUT;
1099 eo_lexer_get(ls); 1099 eo_lexer_get(ls);
1100 } 1100 }
1101 else par->param_dir = EOLIAN_IN_PARAM; 1101 else par->param_dir = EOLIAN_PARAMETER_IN;
1102 check(ls, TOK_VALUE); 1102 check(ls, TOK_VALUE);
1103 par->base.name = eina_stringshare_ref(ls->t.value.s); 1103 par->base.name = eina_stringshare_ref(ls->t.value.s);
1104 eo_lexer_get(ls); 1104 eo_lexer_get(ls);
1105 check_next(ls, ':'); 1105 check_next(ls, ':');
1106 if ((ls->klass && ls->klass->base.is_beta) || func->base.is_beta) 1106 if ((ls->klass && ls->klass->base.is_beta) || func->base.is_beta)
1107 { 1107 {
1108 if (par->param_dir == EOLIAN_OUT_PARAM || par->param_dir == EOLIAN_INOUT_PARAM) 1108 if (par->param_dir == EOLIAN_PARAMETER_OUT || par->param_dir == EOLIAN_PARAMETER_INOUT)
1109 { 1109 {
1110 /* void is allowed for out/inout for beta-api for now to make a voidptr */ 1110 /* void is allowed for out/inout for beta-api for now to make a voidptr */
1111 par->type = eo_lexer_type_release(ls, parse_type_void(ls, EINA_TRUE, EINA_TRUE)); 1111 par->type = eo_lexer_type_release(ls, parse_type_void(ls, EINA_TRUE, EINA_TRUE));
@@ -1114,7 +1114,7 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
1114 } 1114 }
1115 par->type = eo_lexer_type_release(ls, parse_type(ls, EINA_TRUE, EINA_TRUE)); 1115 par->type = eo_lexer_type_release(ls, parse_type(ls, EINA_TRUE, EINA_TRUE));
1116type_done: 1116type_done:
1117 if ((is_vals || (par->param_dir == EOLIAN_OUT_PARAM)) && (ls->t.token == '(')) 1117 if ((is_vals || (par->param_dir == EOLIAN_PARAMETER_OUT)) && (ls->t.token == '('))
1118 { 1118 {
1119 int line = ls->line_number, col = ls->column; 1119 int line = ls->line_number, col = ls->column;
1120 ls->expr_mode = EINA_TRUE; 1120 ls->expr_mode = EINA_TRUE;
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index 895a7ff14a..2aedd51432 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -255,7 +255,7 @@ struct _Eolian_Function_Parameter
255 Eolian_Type *type; 255 Eolian_Type *type;
256 Eolian_Expression *value; 256 Eolian_Expression *value;
257 Eolian_Documentation *doc; 257 Eolian_Documentation *doc;
258 Eolian_Parameter_Dir param_dir; 258 Eolian_Parameter_Direction param_dir;
259 Eina_Bool optional :1; /* True if this argument is optional */ 259 Eina_Bool optional :1; /* True if this argument is optional */
260 Eina_Bool by_ref :1; 260 Eina_Bool by_ref :1;
261 Eina_Bool move :1; 261 Eina_Bool move :1;