forked from enlightenment/efl
eolian: remove const_get/const_set support
This was made obsolete by per-accessor values. It was also hacky and i've wanted to remove it for a while.
This commit is contained in:
parent
378e161cd3
commit
54974b074b
|
@ -87,7 +87,6 @@ eo_fundef_generate(const Eolian_Class *class, const Eolian_Function *func, Eolia
|
|||
Eina_Bool var_as_ret = EINA_FALSE;
|
||||
const Eolian_Type *rettypet = NULL;
|
||||
const char *rettype = NULL;
|
||||
Eina_Bool ret_const = EINA_FALSE;
|
||||
Eolian_Object_Scope scope = eolian_function_scope_get(func);
|
||||
Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET);
|
||||
|
||||
|
@ -101,7 +100,6 @@ eo_fundef_generate(const Eolian_Class *class, const Eolian_Function *func, Eolia
|
|||
{
|
||||
rettypet = eolian_parameter_type_get((Eolian_Function_Parameter*)data);
|
||||
var_as_ret = EINA_TRUE;
|
||||
ret_const = eolian_parameter_const_attribute_get(data, EINA_TRUE);
|
||||
}
|
||||
eina_iterator_free(itr);
|
||||
}
|
||||
|
@ -176,7 +174,6 @@ eo_fundef_generate(const Eolian_Class *class, const Eolian_Function *func, Eolia
|
|||
Eina_Bool add_star = EINA_FALSE;
|
||||
Eolian_Parameter_Dir pdir = eolian_parameter_direction_get(param);
|
||||
|
||||
Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET);
|
||||
if (ftype == EOLIAN_PROP_GET) {
|
||||
add_star = EINA_TRUE;
|
||||
pdir = EOLIAN_OUT_PARAM;
|
||||
|
@ -190,8 +187,7 @@ eo_fundef_generate(const Eolian_Class *class, const Eolian_Function *func, Eolia
|
|||
eina_strbuf_append_printf(str_pardesc, tmpl_eo_pardesc, dir_str, pname, pdesc?pdesc:"No description supplied.");
|
||||
|
||||
if (eina_strbuf_length_get(str_par)) eina_strbuf_append(str_par, ", ");
|
||||
eina_strbuf_append_printf(str_par, "%s%s%s%s%s",
|
||||
is_const?"const ":"",
|
||||
eina_strbuf_append_printf(str_par, "%s%s%s%s",
|
||||
ptype, had_star?"":" ", add_star?"*":"", pname);
|
||||
|
||||
eina_stringshare_del(ptype);
|
||||
|
@ -202,8 +198,7 @@ eo_fundef_generate(const Eolian_Class *class, const Eolian_Function *func, Eolia
|
|||
if (rettypet) rettype = eolian_type_c_type_get(rettypet);
|
||||
|
||||
tmpstr[0] = '\0';
|
||||
sprintf(tmpstr, "%s%s%s",
|
||||
ret_const ? "const " : "",
|
||||
sprintf(tmpstr, "%s%s",
|
||||
rettype ? rettype : "void",
|
||||
rettype && strchr(rettype, '*')?"":" ");
|
||||
eina_strbuf_replace_all(str_func, "@#rettype", tmpstr);
|
||||
|
@ -359,7 +354,6 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
Eina_Bool var_as_ret = EINA_FALSE;
|
||||
const Eolian_Type *rettypet = NULL;
|
||||
const char *rettype = NULL;
|
||||
Eina_Bool ret_const = EINA_FALSE;
|
||||
Eina_Bool add_star = EINA_FALSE;
|
||||
Eina_Iterator *itr;
|
||||
void *data, *data2;
|
||||
|
@ -397,7 +391,6 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
Eolian_Function_Parameter *param = data;
|
||||
rettypet = eolian_parameter_type_get(param);
|
||||
var_as_ret = EINA_TRUE;
|
||||
ret_const = eolian_parameter_const_attribute_get(data, EINA_TRUE);
|
||||
default_ret_val = eolian_parameter_default_value_get(param);
|
||||
}
|
||||
eina_iterator_free(itr);
|
||||
|
@ -415,11 +408,9 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
const Eolian_Type *ptypet = eolian_parameter_type_get(param);
|
||||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET);
|
||||
if (eina_strbuf_length_get(params)) eina_strbuf_append(params, ", ");
|
||||
eina_strbuf_append_printf(params, "%s", pname);
|
||||
eina_strbuf_append_printf(full_params, ", %s%s %s%s",
|
||||
is_const?"const ":"",
|
||||
eina_strbuf_append_printf(full_params, ", %s %s%s",
|
||||
ptype, pname, is_empty || is_auto?" EINA_UNUSED":"");
|
||||
eina_stringshare_del(ptype);
|
||||
}
|
||||
|
@ -435,13 +426,11 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
Eolian_Parameter_Dir pdir = eolian_parameter_direction_get(param);
|
||||
Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET);
|
||||
Eina_Bool had_star = !!strchr(ptype, '*');
|
||||
if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM || pdir == EOLIAN_INOUT_PARAM);
|
||||
if (eina_strbuf_length_get(params)) eina_strbuf_append(params, ", ");
|
||||
eina_strbuf_append_printf(params, "%s", pname);
|
||||
eina_strbuf_append_printf(full_params, ", %s%s%s%s%s%s",
|
||||
is_const?"const ":"",
|
||||
eina_strbuf_append_printf(full_params, ", %s%s%s%s%s",
|
||||
ptype, had_star?"":" ", add_star?"*":"", pname, is_empty && !dflt_value ?" EINA_UNUSED":"");
|
||||
if (is_auto)
|
||||
{
|
||||
|
@ -495,8 +484,8 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
/* Generation of the user function prototype declaration - not needed when @auto and @empty are indicated */
|
||||
if (!is_empty && !is_auto)
|
||||
{
|
||||
eina_strbuf_append_printf(fbody, "%s%s _%s%s%s_%s%s(Eo *obj, @#Datatype_Data *pd%s);\n\n",
|
||||
ret_const?"const ":"", rettype?rettype:"void",
|
||||
eina_strbuf_append_printf(fbody, "%s _%s%s%s_%s%s(Eo *obj, @#Datatype_Data *pd%s);\n\n",
|
||||
rettype?rettype:"void",
|
||||
class_env.lower_classname,
|
||||
impl_env?"_":"",
|
||||
impl_env?impl_env->lower_classname:"",
|
||||
|
@ -510,8 +499,8 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
eina_hash_add(_funcs_params_init,
|
||||
eina_stringshare_add(eolian_function_name_get(funcid)), (void *)ftype);
|
||||
/* Generation of the intermediate function __eolian_... */
|
||||
eina_strbuf_append_printf(fbody, "static %s%s __eolian_%s%s%s_%s%s(Eo *obj%s, @#Datatype_Data *pd%s%s)\n{\n",
|
||||
ret_const?"const ":"", rettype?rettype:"void",
|
||||
eina_strbuf_append_printf(fbody, "static %s __eolian_%s%s%s_%s%s(Eo *obj%s, @#Datatype_Data *pd%s%s)\n{\n",
|
||||
rettype?rettype:"void",
|
||||
class_env.lower_classname,
|
||||
impl_env?"_":"",
|
||||
impl_env?impl_env->lower_classname:"",
|
||||
|
@ -585,9 +574,8 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
if (val.type)
|
||||
val_str = eolian_expression_value_to_literal(&val);
|
||||
}
|
||||
eina_strbuf_append_printf(eo_func_decl, ", %s%s, %s",
|
||||
ret_const ? "const " : "", rettype,
|
||||
val_str?val_str:"0");
|
||||
eina_strbuf_append_printf(eo_func_decl, ", %s, %s",
|
||||
rettype, val_str?val_str:"0");
|
||||
if (val_str && eolian_expression_type_get(default_ret_val) == EOLIAN_EXPR_NAME)
|
||||
{
|
||||
Eina_Stringshare *string = eolian_expression_serialize(default_ret_val);
|
||||
|
|
|
@ -26,16 +26,13 @@ _params_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina_Bo
|
|||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
Eina_Bool had_star = !!strchr(ptype, '*');
|
||||
Eina_Bool is_const = eolian_parameter_const_attribute_get(param, ftype == EOLIAN_PROP_GET);
|
||||
if (eina_strbuf_length_get(params))
|
||||
{
|
||||
eina_strbuf_append(params, ", ");
|
||||
eina_strbuf_append(short_params, ", ");
|
||||
}
|
||||
eina_strbuf_append_printf(params, "%s%s%s%s",
|
||||
is_const?"const ":"", ptype,
|
||||
had_star?"":" ",
|
||||
pname);
|
||||
eina_strbuf_append_printf(params, "%s%s%s",
|
||||
ptype, had_star?"":" ", pname);
|
||||
eina_strbuf_append_printf(short_params, "%s", pname);
|
||||
eina_stringshare_del(ptype);
|
||||
}
|
||||
|
@ -50,7 +47,6 @@ _params_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina_Bo
|
|||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
Eolian_Parameter_Dir pdir = eolian_parameter_direction_get(param);
|
||||
Eina_Bool is_const = eolian_parameter_const_attribute_get(param, ftype == EOLIAN_PROP_GET);
|
||||
Eina_Bool had_star = !!strchr(ptype, '*');
|
||||
if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM || pdir == EOLIAN_INOUT_PARAM);
|
||||
if (eina_strbuf_length_get(params))
|
||||
|
@ -58,8 +54,7 @@ _params_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina_Bo
|
|||
eina_strbuf_append(params, ", ");
|
||||
eina_strbuf_append(short_params, ", ");
|
||||
}
|
||||
eina_strbuf_append_printf(params, "%s%s%s%s%s",
|
||||
is_const?"const ":"",
|
||||
eina_strbuf_append_printf(params, "%s%s%s%s",
|
||||
ptype, had_star?"":" ", add_star?"*":"", pname);
|
||||
eina_strbuf_append_printf(short_params, "%s", pname);
|
||||
eina_stringshare_del(ptype);
|
||||
|
@ -119,7 +114,7 @@ _type_exists(const char* type_name, Eina_Strbuf *buffer)
|
|||
static Eina_Bool
|
||||
_prototype_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina_Strbuf *data_type_buf, Eolian_Implement *impl_desc, Eina_Strbuf *buffer)
|
||||
{
|
||||
Eina_Bool var_as_ret = EINA_FALSE, ret_const = EINA_FALSE;
|
||||
Eina_Bool var_as_ret = EINA_FALSE;
|
||||
Eina_Strbuf *params = NULL, *short_params = NULL, *super_invok = NULL;
|
||||
char func_name[PATH_MAX];
|
||||
char impl_name[PATH_MAX];
|
||||
|
@ -156,7 +151,6 @@ _prototype_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina
|
|||
Eolian_Function_Parameter *param = data;
|
||||
rettypet = eolian_parameter_type_get(param);
|
||||
var_as_ret = EINA_TRUE;
|
||||
ret_const = eolian_parameter_const_attribute_get(param, EINA_TRUE);
|
||||
}
|
||||
eina_iterator_free(itr);
|
||||
}
|
||||
|
@ -190,8 +184,8 @@ _prototype_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina
|
|||
if (rettypet) rettype = eolian_type_c_type_get(rettypet);
|
||||
|
||||
eina_strbuf_append_printf(buffer,
|
||||
"EOLIAN static %s%s\n%s(%sEo *obj, %s *pd%s%s)\n{\n%s\n}\n\n",
|
||||
ret_const?"const ":"", !rettype?"void":rettype,
|
||||
"EOLIAN static %s\n%s(%sEo *obj, %s *pd%s%s)\n{\n%s\n}\n\n",
|
||||
!rettype?"void":rettype,
|
||||
func_name,
|
||||
eolian_function_object_is_const(foo)?"const ":"",
|
||||
!eina_strbuf_length_get(data_type_buf) ? "void" : eina_strbuf_string_get(data_type_buf),
|
||||
|
|
|
@ -54,7 +54,6 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
|
|||
const char *rettype = NULL;
|
||||
Eina_Bool var_as_ret = EINA_FALSE;
|
||||
Eina_Bool add_star = EINA_FALSE;
|
||||
Eina_Bool ret_const = EINA_FALSE;
|
||||
Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET);
|
||||
Eina_Iterator *itr;
|
||||
void *data, *data2;
|
||||
|
@ -78,7 +77,6 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
|
|||
{
|
||||
rettypet = eolian_parameter_type_get((Eolian_Function_Parameter*)data);
|
||||
var_as_ret = EINA_TRUE;
|
||||
ret_const = eolian_parameter_const_attribute_get(data, EINA_TRUE);
|
||||
}
|
||||
eina_iterator_free(itr);
|
||||
}
|
||||
|
@ -124,9 +122,7 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
|
|||
const char *pdesc = eolian_parameter_description_get(param);
|
||||
leg_param_idx++;
|
||||
if (eina_strbuf_length_get(fparam)) eina_strbuf_append(fparam, ", ");
|
||||
eina_strbuf_append_printf(fparam, "%s%s %s",
|
||||
eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET)?"const":"",
|
||||
ptype, pname);
|
||||
eina_strbuf_append_printf(fparam, "%s %s", ptype, pname);
|
||||
eina_stringshare_del(ptype);
|
||||
eina_strbuf_append_printf(descparam, " * @param[in] %s %s\n", pname, pdesc?pdesc:"No description supplied.");
|
||||
if (eolian_parameter_is_nonull((Eolian_Function_Parameter*)data))
|
||||
|
@ -159,8 +155,7 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
|
|||
if (ftype == EOLIAN_PROP_SET) pdir = EOLIAN_IN_PARAM;
|
||||
leg_param_idx++;
|
||||
if (eina_strbuf_length_get(fparam)) eina_strbuf_append(fparam, ", ");
|
||||
eina_strbuf_append_printf(fparam, "%s%s%s%s%s",
|
||||
eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET)?"const ":"",
|
||||
eina_strbuf_append_printf(fparam, "%s%s%s%s",
|
||||
ptype, had_star?"":" ", add_star?"*":"", pname);
|
||||
eina_stringshare_del(ptype);
|
||||
const char *dir_str = str_dir[(int)pdir];
|
||||
|
@ -186,8 +181,7 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
|
|||
eina_strbuf_replace_all(fbody, "@#params", eina_strbuf_string_get(fparam));
|
||||
eina_strbuf_replace_all(fbody, "@#list_desc_param", eina_strbuf_string_get(descparam));
|
||||
eina_strbuf_reset(fparam);
|
||||
eina_strbuf_append_printf(fparam, "%s%s%s",
|
||||
ret_const ? "const " : "",
|
||||
eina_strbuf_append_printf(fparam, "%s%s",
|
||||
rettype ? rettype : "void",
|
||||
rettype && strchr(rettype, '*')?"":" ");
|
||||
eina_strbuf_replace_all(fbody, "@#type_return", eina_strbuf_string_get(fparam));
|
||||
|
@ -220,7 +214,6 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
|
|||
const Eolian_Type *rettypet = NULL;
|
||||
const char *rettype = NULL;
|
||||
const char *retname = NULL;
|
||||
Eina_Bool ret_const = EINA_FALSE;
|
||||
Eina_Bool add_star = EINA_FALSE;
|
||||
Eina_Bool ret_is_void = EINA_FALSE;
|
||||
Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET);
|
||||
|
@ -250,7 +243,6 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
|
|||
rettypet = eolian_parameter_type_get(param);
|
||||
retname = eolian_parameter_name_get(param);
|
||||
var_as_ret = EINA_TRUE;
|
||||
ret_const = eolian_parameter_const_attribute_get(data, EINA_TRUE);
|
||||
}
|
||||
eina_iterator_free(itr);
|
||||
}
|
||||
|
@ -294,9 +286,7 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
|
|||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
if (eina_strbuf_length_get(fparam)) eina_strbuf_append(fparam, ", ");
|
||||
eina_strbuf_append_printf(fparam, "%s%s %s",
|
||||
eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET)?"const ":"",
|
||||
ptype, pname);
|
||||
eina_strbuf_append_printf(fparam, "%s %s", ptype, pname);
|
||||
eina_stringshare_del(ptype);
|
||||
if (eina_strbuf_length_get(eoparam)) eina_strbuf_append(eoparam, ", ");
|
||||
eina_strbuf_append_printf(eoparam, "%s", pname);
|
||||
|
@ -315,8 +305,7 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
|
|||
Eina_Bool had_star = !!strchr(ptype, '*');
|
||||
if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM || pdir == EOLIAN_INOUT_PARAM);
|
||||
if (eina_strbuf_length_get(fparam)) eina_strbuf_append(fparam, ", ");
|
||||
eina_strbuf_append_printf(fparam, "%s%s%s%s%s",
|
||||
eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET)?"const ":"",
|
||||
eina_strbuf_append_printf(fparam, "%s%s%s%s",
|
||||
ptype, had_star?"":" ", add_star?"*":"", pname);
|
||||
eina_stringshare_del(ptype);
|
||||
if (eina_strbuf_length_get(eoparam)) eina_strbuf_append(eoparam, ", ");
|
||||
|
@ -329,7 +318,7 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
|
|||
if (rettype && (!ret_is_void))
|
||||
{
|
||||
char tmp_ret_str[0xFF];
|
||||
sprintf (tmp_ret_str, "%s%s", ret_const?"const ":"", rettype);
|
||||
sprintf (tmp_ret_str, "%s", rettype);
|
||||
const Eolian_Expression *default_ret_val =
|
||||
eolian_function_return_default_value_get(funcid, ftype);
|
||||
const char *val_str = NULL;
|
||||
|
@ -341,8 +330,8 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
|
|||
val_str = eolian_expression_value_to_literal(&val);
|
||||
}
|
||||
Eina_Bool had_star = !!strchr(rettype, '*');
|
||||
sprintf (tmpstr, " %s%s%s%s = %s;\n",
|
||||
ret_const?"const ":"", rettype, had_star?"":" ", retname,
|
||||
sprintf (tmpstr, " %s%s%s = %s;\n",
|
||||
rettype, had_star?"":" ", retname,
|
||||
val_str?val_str:"0");
|
||||
|
||||
eina_strbuf_replace_all(fbody, "@#ret_type", tmp_ret_str);
|
||||
|
|
|
@ -221,7 +221,6 @@ ffi.cdef [[
|
|||
const Eolian_Expression *eolian_parameter_default_value_get(const Eolian_Function_Parameter *param);
|
||||
const char *eolian_parameter_name_get(const Eolian_Function_Parameter *param);
|
||||
const char *eolian_parameter_description_get(const Eolian_Function_Parameter *param);
|
||||
Eina_Bool eolian_parameter_const_attribute_get(const Eolian_Function_Parameter *param_desc, Eina_Bool is_get);
|
||||
Eina_Bool eolian_parameter_is_nonull(const Eolian_Function_Parameter *param_desc);
|
||||
Eina_Bool eolian_parameter_is_nullable(const Eolian_Function_Parameter *param_desc);
|
||||
Eina_Bool eolian_parameter_is_optional(const Eolian_Function_Parameter *param_desc);
|
||||
|
@ -750,10 +749,6 @@ ffi.metatype("Eolian_Function_Parameter", {
|
|||
return ffi.string(v)
|
||||
end,
|
||||
|
||||
const_attribute_get = function(self, get)
|
||||
return eolian.eolian_parameter_const_attribute_get(self, get) ~= 0
|
||||
end,
|
||||
|
||||
is_nonull = function(self)
|
||||
return eolian.eolian_parameter_is_nonull(self) ~= 0
|
||||
end,
|
||||
|
|
|
@ -994,20 +994,6 @@ EAPI Eina_Stringshare *eolian_parameter_name_get(const Eolian_Function_Parameter
|
|||
*/
|
||||
EAPI Eina_Stringshare *eolian_parameter_description_get(const Eolian_Function_Parameter *param);
|
||||
|
||||
/*
|
||||
* @brief Indicates if a parameter has a const attribute.
|
||||
*
|
||||
* This function is relevant for properties, to know if a parameter is a const
|
||||
* parameter in the get operation.
|
||||
*
|
||||
* @param[in] param_desc parameter handle
|
||||
* @param[in] is_get indicates if the information needed is for get or set.
|
||||
* @return EINA_TRUE if const in get, EINA_FALSE otherwise
|
||||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Bool eolian_parameter_const_attribute_get(const Eolian_Function_Parameter *param_desc, Eina_Bool is_get);
|
||||
|
||||
/*
|
||||
* @brief Indicates if a parameter cannot be NULL.
|
||||
*
|
||||
|
|
|
@ -40,16 +40,6 @@ eolian_parameter_description_get(const Eolian_Function_Parameter *param)
|
|||
return param->description;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
eolian_parameter_const_attribute_get(const Eolian_Function_Parameter *param, Eina_Bool is_get)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(param, EINA_FALSE);
|
||||
if (is_get)
|
||||
return param->is_const_on_get;
|
||||
else
|
||||
return param->is_const_on_set;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
eolian_parameter_is_nonull(const Eolian_Function_Parameter *param)
|
||||
{
|
||||
|
|
|
@ -29,11 +29,10 @@ enum Tokens
|
|||
KW(get), KW(implements), KW(import), KW(interface), KW(keys), KW(legacy), \
|
||||
KW(legacy_prefix), KW(methods), KW(mixin), KW(own), KW(params), \
|
||||
KW(set), KW(type), KW(values), KW(var), KWAT(auto), KWAT(beta), \
|
||||
KWAT(c_only), KWAT(class), KWAT(const), KWAT(const_get), \
|
||||
KWAT(const_set), KWAT(empty), KWAT(extern), KWAT(free), KWAT(in), \
|
||||
KWAT(inout), KWAT(nonull), KWAT(nullable), KWAT(optional), KWAT(out), \
|
||||
KWAT(private), KWAT(property), KWAT(protected), KWAT(virtual), \
|
||||
KWAT(warn_unused), \
|
||||
KWAT(c_only), KWAT(class), KWAT(const), KWAT(empty), KWAT(extern), \
|
||||
KWAT(free), KWAT(in), KWAT(inout), KWAT(nonull), KWAT(nullable), \
|
||||
KWAT(optional), KWAT(out), KWAT(private), KWAT(property), \
|
||||
KWAT(protected), KWAT(virtual), KWAT(warn_unused), \
|
||||
\
|
||||
KW(byte), KW(ubyte), KW(char), KW(short), KW(ushort), KW(int), KW(uint), \
|
||||
KW(long), KW(ulong), KW(llong), KW(ullong), \
|
||||
|
|
|
@ -1024,20 +1024,6 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
|
|||
pop_expr(ls);
|
||||
check_match(ls, ')', '(', line, col);
|
||||
}
|
||||
/* XXX: remove this fugly bit - temporary */
|
||||
if (is_vals)
|
||||
{
|
||||
if (ls->t.kw == KW_at_const_get)
|
||||
{
|
||||
par->is_const_on_get = EINA_TRUE;
|
||||
eo_lexer_get(ls);
|
||||
}
|
||||
else if (ls->t.kw == KW_at_const_set)
|
||||
{
|
||||
par->is_const_on_set = EINA_TRUE;
|
||||
eo_lexer_get(ls);
|
||||
}
|
||||
}
|
||||
for (;;) switch (ls->t.kw)
|
||||
{
|
||||
case KW_at_nonull:
|
||||
|
|
|
@ -163,8 +163,6 @@ struct _Eolian_Function_Parameter
|
|||
Eolian_Expression *value;
|
||||
Eina_Stringshare *description;
|
||||
Eolian_Parameter_Dir param_dir;
|
||||
Eina_Bool is_const_on_get :1; /* True if const in this the get property */
|
||||
Eina_Bool is_const_on_set :1; /* True if const in this the set property */
|
||||
Eina_Bool nonull :1; /* True if this argument cannot be NULL - deprecated */
|
||||
Eina_Bool nullable :1; /* True if this argument is nullable */
|
||||
Eina_Bool optional :1; /* True if this argument is optional */
|
||||
|
|
Loading…
Reference in New Issue