forked from enlightenment/efl
Fix Eolian Cxx generator
Compilation was failing due to the changes in the Eolian library. The generator has not been updated. This patch fixes the compilation but not the tests that I let to my lovely q66.
This commit is contained in:
parent
b7c89d2325
commit
1941dae695
|
@ -99,7 +99,7 @@ _convert_eolian_parameters(Eina_Iterator *parameters,
|
|||
(static_cast<const Eolian_Function_Parameter*>(curr));
|
||||
list.push_back
|
||||
({
|
||||
parameter_type(*id, func_type),
|
||||
parameter_type(*id),
|
||||
parameter_name(*id)
|
||||
});
|
||||
}
|
||||
|
@ -146,12 +146,12 @@ _convert_property_set_to_function(Eolian_Class const& klass,
|
|||
function_name(prop_) + "_set",
|
||||
function_impl(prop_) + "_set",
|
||||
function_return_type(prop_, eolian_cxx::setter),
|
||||
_convert_eolian_parameters(::eolian_function_parameters_get(&prop_),
|
||||
_convert_eolian_parameters(::eolian_property_values_get(&prop_, EOLIAN_PROP_SET),
|
||||
eolian_cxx::setter),
|
||||
convert_comments_function(klass, prop_, eolian_cxx::setter)
|
||||
};
|
||||
efl::eolian::parameters_container_type keys =
|
||||
_convert_eolian_parameters(::eolian_property_keys_get(&prop_),
|
||||
_convert_eolian_parameters(::eolian_property_keys_get(&prop_, EOLIAN_PROP_SET),
|
||||
eolian_cxx::setter);
|
||||
if (!keys.empty())
|
||||
{
|
||||
|
@ -175,7 +175,8 @@ _convert_property_get_to_function(Eolian_Class const& klass,
|
|||
function_name(prop_) + "_get",
|
||||
function_impl(prop_) + "_get",
|
||||
function_return_type(prop_, eolian_cxx::getter),
|
||||
_convert_eolian_parameters(prop_, eolian_cxx::getter),
|
||||
_convert_eolian_parameters(::eolian_property_values_get(&prop_, EOLIAN_PROP_GET),
|
||||
eolian_cxx::getter),
|
||||
convert_comments_function(klass, prop_, eolian_cxx::getter)
|
||||
};
|
||||
|
||||
|
@ -202,7 +203,7 @@ _convert_property_get_to_function(Eolian_Class const& klass,
|
|||
});
|
||||
}
|
||||
efl::eolian::parameters_container_type keys =
|
||||
_convert_eolian_parameters(::eolian_property_keys_get(&prop_),
|
||||
_convert_eolian_parameters(::eolian_property_keys_get(&prop_, EOLIAN_PROP_GET),
|
||||
eolian_cxx::getter);
|
||||
if (!keys.empty())
|
||||
{
|
||||
|
|
|
@ -328,42 +328,8 @@ parameter_is_out(Eolian_Function_Parameter const& parameter)
|
|||
return direction == EOLIAN_OUT_PARAM || direction == EOLIAN_INOUT_PARAM;
|
||||
}
|
||||
|
||||
inline bool
|
||||
parameter_is_const(Eolian_Function_Parameter const& parameter,
|
||||
Eolian_Function_Type func_type)
|
||||
{
|
||||
return ::eolian_parameter_const_attribute_get
|
||||
(¶meter, property_is_getter(func_type));
|
||||
}
|
||||
|
||||
inline bool
|
||||
parameter_is_const(Eolian_Function_Parameter const& parameter,
|
||||
getter_t func_type)
|
||||
{
|
||||
return ::eolian_parameter_const_attribute_get
|
||||
(¶meter, property_is_getter(func_type.value));
|
||||
}
|
||||
|
||||
inline bool
|
||||
parameter_is_const(Eolian_Function_Parameter const& parameter,
|
||||
setter_t func_type)
|
||||
{
|
||||
return ::eolian_parameter_const_attribute_get
|
||||
(¶meter, property_is_getter(func_type.value));
|
||||
}
|
||||
|
||||
inline bool
|
||||
parameter_is_const(Eolian_Function_Parameter const& parameter,
|
||||
Eolian_Function const& func)
|
||||
{
|
||||
assert(function_op_type(func) != EOLIAN_PROPERTY);
|
||||
return ::eolian_parameter_const_attribute_get
|
||||
(¶meter, property_is_getter(func));
|
||||
}
|
||||
|
||||
inline efl::eolian::eolian_type_instance
|
||||
parameter_type(Eolian_Function_Parameter const& parameter,
|
||||
Eolian_Function_Type func_type = method_t::value)
|
||||
parameter_type(Eolian_Function_Parameter const& parameter)
|
||||
{
|
||||
efl::eolian::eolian_type_instance type
|
||||
(type_lookup(::eolian_parameter_type_get(¶meter)));
|
||||
|
@ -375,29 +341,11 @@ parameter_type(Eolian_Function_Parameter const& parameter,
|
|||
type.is_out = true;
|
||||
type.front().native += "*";
|
||||
}
|
||||
if (parameter_is_const(parameter, func_type))
|
||||
{
|
||||
type.front().native.insert(0, "const ");
|
||||
if (!type.front().binding.empty())
|
||||
type.front().binding.insert(0, "const ");
|
||||
}
|
||||
type.is_optional = ::eolian_parameter_is_optional(¶meter) ||
|
||||
::eolian_parameter_is_nullable(¶meter);
|
||||
return type;
|
||||
}
|
||||
|
||||
inline efl::eolian::eolian_type_instance
|
||||
parameter_type(Eolian_Function_Parameter const& parameter, getter_t func_type)
|
||||
{
|
||||
return parameter_type(parameter, func_type.value);
|
||||
}
|
||||
|
||||
inline efl::eolian::eolian_type_instance
|
||||
parameter_type(Eolian_Function_Parameter const& parameter, setter_t func_type)
|
||||
{
|
||||
return parameter_type(parameter, func_type.value);
|
||||
}
|
||||
|
||||
inline efl::eolian::eo_event
|
||||
event_create(Eolian_Class const& klass, const Eolian_Event *event_)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue