forked from enlightenment/efl
eolian-cxx: Fixed mixed inheritance between C and C++ classes
Removed genereation for Eo.Base primitive methods which segfault'ed on parent_set function.
This commit is contained in:
parent
666b0da912
commit
c57fa54fc8
|
@ -81,7 +81,7 @@ struct inherit
|
|||
(_eo_cls, NULL,
|
||||
detail::inherit_constructor
|
||||
<tuple_type, E...>
|
||||
(static_cast<void*>(this), tuple_type(std::move(args)...)));
|
||||
(static_cast<void*>(this), tuple_type(std::forward<Args>(args)...)));
|
||||
}
|
||||
|
||||
/// @brief Class destructor.
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
#define EFL_CXX_EO_PRIVATE_HH
|
||||
|
||||
#include "eo_ops.hh"
|
||||
#include "eo_concrete.hh"
|
||||
|
||||
namespace eo {
|
||||
struct base;
|
||||
}
|
||||
|
||||
namespace efl { namespace eo { namespace detail {
|
||||
|
||||
|
@ -86,9 +89,7 @@ Eo_Class const* do_eo_class_new(Eo_Class_Description& class_desc)
|
|||
}
|
||||
|
||||
template <typename T> struct operation_description_class_size;
|
||||
|
||||
template<>
|
||||
struct operation_description_class_size<efl::eo::concrete> { static const int value = 0; };
|
||||
template <> struct operation_description_class_size< ::eo::base> : std::integral_constant<std::size_t, 0u> {};
|
||||
|
||||
/// @internal
|
||||
///
|
||||
|
@ -135,8 +136,8 @@ namespace detail {
|
|||
template <typename T> struct operations;
|
||||
|
||||
template <>
|
||||
struct operations<efl::eo::concrete> { template <typename T> struct type {}; };
|
||||
|
||||
struct operations< ::eo::base> { template <typename T> struct type {}; };
|
||||
|
||||
/// @internal
|
||||
///
|
||||
/// @brief Provides the operations of an extension as well as its
|
||||
|
@ -164,7 +165,7 @@ struct Inherit_Private_Data
|
|||
|
||||
namespace efl { namespace eo { namespace detail {
|
||||
template <typename T>
|
||||
int initialize_operation_description(efl::eo::detail::tag<efl::eo::concrete>
|
||||
int initialize_operation_description(efl::eo::detail::tag< ::eo::base>
|
||||
, Eo_Op_Description* ops)
|
||||
{
|
||||
(void)ops;
|
||||
|
|
|
@ -333,7 +333,6 @@ operator<<(std::ostream& out, inheritance_call_constructors const& x)
|
|||
<< full_name(x._cls)
|
||||
<< ", ::std::tuple<::efl::eo::parent_type> > const& args)" << endl
|
||||
<< "{" << endl
|
||||
<< tab(1) << "eo_do_super(eo, cls, ::eo_constructor());" << endl
|
||||
<< tab(1) << "eo_do(eo, ::eo_parent_set(args.get<0>()._eo_raw));" << endl
|
||||
<< "}" << endl << endl;
|
||||
|
||||
|
@ -362,14 +361,15 @@ operator<<(std::ostream& out, inheritance_eo_class_getter const& x)
|
|||
inline void
|
||||
eo_inheritance_detail_generator(std::ostream& out, eo_class const& cls)
|
||||
{
|
||||
out << inheritance_wrappers(cls)
|
||||
<< "namespace efl { namespace eo { namespace detail {" << endl << endl
|
||||
<< inheritance_base_operations(cls) << endl
|
||||
<< inheritance_base_operations_size(cls)
|
||||
<< inheritance_operations_description(cls)
|
||||
<< inheritance_call_constructors(cls)
|
||||
<< inheritance_eo_class_getter(cls)
|
||||
<< "} } }" << endl;
|
||||
if(cls.eo_name != "EO_BASE_CLASS")
|
||||
out << inheritance_wrappers(cls)
|
||||
<< "namespace efl { namespace eo { namespace detail {" << endl << endl
|
||||
<< inheritance_base_operations(cls) << endl
|
||||
<< inheritance_base_operations_size(cls)
|
||||
<< inheritance_operations_description(cls)
|
||||
<< inheritance_call_constructors(cls)
|
||||
<< inheritance_eo_class_getter(cls)
|
||||
<< "} } }" << endl;
|
||||
}
|
||||
|
||||
} } } // namespace efl { namespace eolian { namespace grammar {
|
||||
|
|
Loading…
Reference in New Issue