From c494649ddef5160217f8a2aa5ba3134130e136c9 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Tue, 18 Dec 2001 21:00:07 +0000 Subject: [PATCH] fix a bug with instance::power reported by Scott Snyder. [SVN r12119] --- src/classes.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/classes.cpp b/src/classes.cpp index c721ef5c..f51d1a2f 100644 --- a/src/classes.cpp +++ b/src/classes.cpp @@ -11,8 +11,6 @@ // 03 Mar 01 added: pickle safety measures (Ralf W. Grosse-Kunstleve) // 03 Mar 01 bug fix: use bound_function::create() (instead of new bound_function) -#define BOOST_PYTHON_SOURCE - #include #include #include @@ -645,7 +643,7 @@ PyObject* instance::divmod(PyObject* other) PyObject* instance::power(PyObject* exponent, PyObject* modulus) { - if (as_object(modulus->ob_type) == Py_None) + if (as_object(modulus) == Py_None) return callback::call_method(this, "__pow__", exponent); else return callback::call_method(this, "__pow__", exponent, modulus);