diff --git a/extclass.cpp b/extclass.cpp index 25398a93..971a5cdb 100644 --- a/extclass.cpp +++ b/extclass.cpp @@ -8,6 +8,7 @@ #include "extclass.h" #include +#include namespace py { @@ -342,7 +343,7 @@ PyTypeObject operator_dispatcher::type_object = { PyObject_HEAD_INIT(&PyType_Type) 0, - "operator_dispatcher", + const_cast("operator_dispatcher"), sizeof(operator_dispatcher), 0, (destructor)&operator_dispatcher::dealloc, @@ -361,7 +362,11 @@ PyTypeObject operator_dispatcher::type_object = 0, 0, 0, - 0 + 0, + 0, + 0, + 0, + 0 }; PyNumberMethods operator_dispatcher::number_methods = @@ -557,7 +562,7 @@ int operator_dispatcher::unwrap_pow_args(PyObject * left, PyObject * right, PyOb if(mwrapper->object->ob_type == &operator_dispatcher::type_object) { - mwrapper = static_cast(mwrapper->object); + mwrapper = PyPtr(static_cast(mwrapper->object)); } if(lwrapper->self != 0)