From 8d2e08ffa05486bfa42b4d9e5e4fd0aab92c222e Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sun, 5 Oct 2014 17:31:17 -0300 Subject: [PATCH] Little fixes to allow pycxx to compile with python3 --- src/CXX/Python3/Objects.hxx | 4 ++-- src/CXX/Python3/cxx_extensions.cxx | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/CXX/Python3/Objects.hxx b/src/CXX/Python3/Objects.hxx index f02650343..9e6b3044d 100644 --- a/src/CXX/Python3/Objects.hxx +++ b/src/CXX/Python3/Objects.hxx @@ -2221,7 +2221,7 @@ namespace Py { public: TupleN() - : Tuple( (sequence_index_type)0 ) + : Tuple( 0 ) { } @@ -3198,7 +3198,7 @@ namespace Py inline Object Object::callMemberFunction( const std::string &function_name ) const { Callable target( getAttr( function_name ) ); - Tuple args( (sequence_index_type)0 ); + Tuple args( 0 ); return target.apply( args ); } diff --git a/src/CXX/Python3/cxx_extensions.cxx b/src/CXX/Python3/cxx_extensions.cxx index 2347d25f4..0daa4c8b5 100644 --- a/src/CXX/Python3/cxx_extensions.cxx +++ b/src/CXX/Python3/cxx_extensions.cxx @@ -1518,6 +1518,7 @@ extern "C" PyObject *method_noargs_call_handler( PyObject *_self_and_name_tuple, } } +#if 0 extern "C" PyObject *method_noargs_call_handler( PyObject *_self_and_name_tuple, PyObject * ) { try @@ -1545,7 +1546,7 @@ extern "C" PyObject *method_noargs_call_handler( PyObject *_self_and_name_tuple, { return 0; } -#if 0 +// #if 0 try { Tuple self_and_name_tuple( _self_and_name_tuple ); @@ -1568,10 +1569,11 @@ extern "C" PyObject *method_noargs_call_handler( PyObject *_self_and_name_tuple, { return 0; } -#else +// #else return 0; -#endif +// #endif } +#endif extern "C" PyObject *method_varargs_call_handler( PyObject *_self_and_name_tuple, PyObject *_args ) {