From db210129f26faaf1aac7f97033eb8ba01c36d1ae Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 15 Nov 2000 05:40:07 +0000 Subject: [PATCH] Added missing const_cast, PyNumberMethods initializers, and explicit constructor [SVN r8210] --- extclass.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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)