Esempio n. 1
0
 static inline PyTypeObject* get_class_object_impl(U const volatile* p)
 {
     PyTypeObject* derived = get_derived_class_object(is_polymorphic<U>::type(), p);
     if (derived)
         return derived;
     return converter::registered<T>::converters.get_class_object();
 }
Esempio n. 2
0
    static inline PyTypeObject* get_derived_class_object(mpl::false_, U* x)
    {
# if BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
        if (typeid(*x) != typeid(U))
            return get_derived_class_object(mpl::true_(), x);
# else
        (void)x;
# endif
        return 0;
    }
    static inline PyTypeObject* get_class_object_impl(U const volatile* p)
    {
        if (p == 0)
            return 0; // means "return None".

        PyTypeObject* derived = get_derived_class_object(
            BOOST_DEDUCED_TYPENAME boost::python::detail::is_polymorphic<U>::type(), p);

        if (derived)
            return derived;
        return converter::registered<T>::converters.get_class_object();
    }