X-Git-Url: https://git.wh0rd.org/?p=ICEs.git;a=blobdiff_plain;f=321197%2Fpyside.ii.3;fp=321197%2Fpyside.ii.3;h=19cd9b1b68f6c1ac3dfd81a5627112933c5fc93e;hp=0000000000000000000000000000000000000000;hb=bd3239d2bbe0de3a200b266503e3330b1e391489;hpb=dbff64cb4b7530861c2309c794efdd4e0cf47a23 diff --git a/321197/pyside.ii.3 b/321197/pyside.ii.3 new file mode 100644 index 0000000..19cd9b1 --- /dev/null +++ b/321197/pyside.ii.3 @@ -0,0 +1,379 @@ +class QString { + public: + inline QString(const char *ch) : d(fromAscii_helper(ch)) {} + private: struct Data {}; + Data *d; + static Data *fromAscii_helper(const char *str, int size = -1); +}; +class QGenericArgument {}; +class QObject {}; +class QWebPage : public QObject { + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const {} + class ExtensionOption {}; +}; + typedef struct {} PyObject; + typedef struct {} PyTypeObject; + +namespace mpl_ { + namespace aux {} + template< bool C_ > struct bool_; + typedef bool_ false_; + template< bool C_ > struct bool_ { static const bool value = C_; }; + template< typename T, T N > struct integral_c { static const T value = N; }; +} +namespace boost { + typedef long long long_long_type; + namespace mpl { using namespace mpl_; } +} +namespace boost { + template struct integral_constant : public mpl::integral_c { +}; +namespace detail { + template struct cv_traits_imp { + typedef T unqualified_type; + }; +} + + template< typename T > struct is_reference : ::boost::integral_constant {}; + template< typename T > struct remove_cv { + typedef typename boost::detail::cv_traits_imp::unqualified_type type; + }; + +namespace python { + namespace detail { + typedef char* yes_convertible; + typedef int* no_convertible; + template struct convertible {}; + template inline Target* upcast(Source* p, yes_convertible, no_convertible, Target*) {} + } + } + } + + namespace boost { + template< typename T > struct is_integral : ::boost::integral_constant {}; + template< typename T > struct is_float : ::boost::integral_constant {}; + namespace type_traits { + template struct ice_or; + template <> struct ice_or { + static const bool value = false; + }; + } + namespace detail { + template< typename T > struct is_arithmetic_impl { + static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_float::value >::value) ; + }; + } + template< typename T > struct is_arithmetic : ::boost::integral_constant::value> { + }; + namespace type_traits { + template struct is_mem_fun_pointer_impl { + static const bool value = false; + }; + } + template< typename T > struct is_member_function_pointer : ::boost::integral_constant::type>::value> { + }; + template< typename T > struct is_member_pointer : ::boost::integral_constant::value> { + }; + namespace type_traits { + template struct ice_and; + template struct ice_and { + static const bool value = false; + }; + template struct ice_not { + static const bool value = true; + }; + } + namespace detail { + template< typename T > struct is_pointer_helper { + static const bool value = false; + }; + template< typename T > struct is_pointer_impl { + static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value >::value) ; + }; + } + template< typename T > struct is_pointer : ::boost::integral_constant::value> { + }; + template class unwrap_reference { + }; + struct na {}; + } + namespace boost { + namespace mpl { + template< bool C , typename T1 , typename T2 > struct if_c { typedef T2 type; }; + template< typename T1 = na , typename T2 = na , typename T3 = na > struct if_ { + private: typedef if_c< static_cast(T1::value) , T2 , T3 > almost_type_; + public: typedef typename almost_type_::type type; + }; + } + namespace detail { + template struct is_class_impl { + }; + } + namespace python { + namespace detail { + template class borrowed { + }; + template struct is_borrowed_ptr { + static const bool value = false; + }; + } + template class handle; + template inline T* incref(T* p) { + } + template struct null_ok; + namespace detail { + template inline T* manage_ptr(detail::borrowed >* p, int) { + } + } + template class handle { + }; + template class is_handle { + public: static const bool value = false; + }; + } + } + namespace boost { + namespace mpl { + template< typename T , typename Base , int at_front = 0 > struct v_item : Base { + }; + } + namespace mpl { + template< typename Dummy = na > struct vector0; + template< typename T0 > struct vector1 : v_item< T0 , vector0< > > { + }; + template< typename T0, typename T1 > struct vector2 : v_item< T1 , vector1 > { + }; + template< typename T0, typename T1, typename T2 > struct vector3 : v_item< T2 , vector2< T0,T1 > > { + }; + template< typename T0, typename T1, typename T2, typename T3 > struct vector4 : v_item< T3 , vector3< T0,T1,T2 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector5 : v_item< T4 , vector4< T0,T1,T2,T3 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector6 : v_item< T5 , vector5< T0,T1,T2,T3,T4 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector7 : v_item< T6 , vector6< T0,T1,T2,T3,T4,T5 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector8 : v_item< T7 , vector7< T0,T1,T2,T3,T4,T5,T6 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector9 : v_item< T8 , vector8< T0,T1,T2,T3,T4,T5,T6,T7 > > { + }; + } + namespace noncopyable_ { + class noncopyable { + }; + } + typedef noncopyable_::noncopyable noncopyable; + namespace detail { + template class empty_base { + }; + } + template > struct less_than_comparable2 : B { + }; + template > struct equality_comparable2 : B { + }; + template > struct totally_ordered2 : less_than_comparable2 > { + }; + namespace python { + struct instance_holder : private noncopyable { + }; + namespace detail { + template struct is_auto_ptr : mpl::false_ { + }; + } + namespace detail { + template struct copy_ctor_mutates_rhs : is_auto_ptr { + }; + } + } + namespace python { + namespace detail { + template struct pointee_impl { + }; + }; + }; + namespace python { + namespace detail { + } + } + namespace mpl { + namespace aux { + template< long C_ > struct not_impl : bool_ { + }; + } + } + namespace python { + namespace objects { + template struct pointer_holder_back_reference : instance_holder { + pointer_holder_back_reference(Pointer); + private: Pointer m_p; + }; + template inline pointer_holder_back_reference::pointer_holder_back_reference(Pointer p) : m_p(p) { + } + } + } + namespace detail { + class alignment_dummy; + typedef void (*function_ptr)(); + typedef int (alignment_dummy::*member_ptr); + typedef int (alignment_dummy::*member_function_ptr)(); + template struct lower_alignment_helper { + }; + template struct has_one_T { + }; + template union lower_alignment { + }; + } + namespace python { + namespace detail { + template union aligned_storage { + }; + } + namespace converter { + template struct rvalue_from_python_storage { + }; + template struct rvalue_from_python_data : rvalue_from_python_storage { + ~rvalue_from_python_data(); + }; + } + } + namespace python { + template struct to_python_indirect { + }; + namespace converter { + template struct pyobject_type { + static bool check(PyObject* x) { + } + }; + template struct pyobject_traits; + template struct handle_object_manager_traits : pyobject_traits { + static null_ok* adopt(PyObject* p) { + } + }; + template struct default_object_manager_traits { + static const bool is_specialized = python::detail::is_borrowed_ptr::value ; + }; + template struct object_manager_traits : mpl::if_c< is_handle::value , handle_object_manager_traits , default_object_manager_traits >::type { + }; + template struct is_object_manager : mpl::bool_::is_specialized> { + }; + } + namespace detail { + template struct value_is_shared_ptr { + }; + } + } + namespace python { + namespace detail { + struct signature_element { + }; + template struct signature_arity; + template <> struct signature_arity<11> { + template struct impl { + }; + }; + } + namespace api { + class object; + } + using api::object; + namespace detail { + template struct dependent { + }; + } + } + namespace detail{ + template struct ct_imp { + typedef const T& param_type; + }; + } + template struct call_traits { + typedef typename boost::detail::ct_imp< T, ::boost::is_pointer::value, ::boost::is_arithmetic::value >::param_type param_type; + }; + namespace python { + namespace detail { + } + namespace converter { + namespace detail { + template struct return_object_manager_from_python { + typedef T result_type; + result_type operator()(PyObject*) const; + }; + template inline T return_object_manager_from_python::operator()(PyObject* obj) const { + } + } + } + template class def_visitor { + }; + namespace api { + template class object_operators : public def_visitor { + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> typename detail::dependent::type operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12) const { + } + }; + struct object_base : object_operators { + }; + } + namespace converter { + template struct extract_pointer { + }; + template struct extract_reference { + }; + template struct extract_rvalue : private noncopyable { + typedef typename mpl::if_< python::detail::copy_ctor_mutates_rhs , T& , typename call_traits::param_type >::type result_type; + mutable rvalue_from_python_data m_data; + }; + template struct extract_object_manager { + }; + template struct select_extract { + static const bool obj_mgr = is_object_manager::value ; + static const bool ptr = is_pointer::value ; + static const bool ref = is_reference::value ; + typedef typename mpl::if_c< obj_mgr , extract_object_manager , typename mpl::if_c< ptr , extract_pointer , typename mpl::if_c< ref , extract_reference , extract_rvalue >::type >::type >::type type; + }; + } + template struct extract : converter::select_extract::type { + private: typedef typename converter::select_extract::type base; + public: typedef typename base::result_type result_type; + operator result_type() const {} + extract(api::object const&); + }; + } + } + +struct QHashData { static QHashData shared_null; }; + template class QHash { + QHashData *d; + public: inline QHash() : d(&QHashData::shared_null) {} + T &operator[](const Key &key); + }; + + namespace PySide { + class wrapper {}; + template inline boost::python::handle<> ptr(T* data, bool take_ownership = false) {} + class type_details { + typedef QGenericArgument(*func_python_to_cpp_type)(const boost::python::object&, const char*); + public: template static type_details* create_object_type_details(const char* type_name) {} + template static type_details* create_value_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_func_python_to_cpp = &python_to_value_type; + } + func_python_to_cpp_type m_func_python_to_cpp; + template static QGenericArgument python_to_value_type(const boost::python::object& obj, const char *type_name) { + T* val = new T(boost::python::extract(obj)); + } + }; + + class type_manager { + public: static type_manager& instance(); + template void register_value_type(const char* type_name) { + m_type_map[type_name] = type_details::create_value_type_details(type_name); + } + QHash m_type_map; + }; + } + using namespace PySide; + class qwebpage_extensionoption_wrapper : public QWebPage::ExtensionOption, public PySide::wrapper { + static void define_python_class() throw(); + }; + void qwebpage_extensionoption_wrapper::define_python_class() throw() { + type_manager::instance().register_value_type("QWebPage::ExtensionOption"); + }