Skip to content

Commit

Permalink
Little fixes to allow pycxx to compile with python3
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Oct 5, 2014
1 parent 3c091ac commit 8d2e08f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/CXX/Python3/Objects.hxx
Expand Up @@ -2221,7 +2221,7 @@ namespace Py
{
public:
TupleN()
: Tuple( (sequence_index_type)0 )
: Tuple( 0 )
{
}

Expand Down Expand Up @@ -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 );
}

Expand Down
8 changes: 5 additions & 3 deletions src/CXX/Python3/cxx_extensions.cxx
Expand Up @@ -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
Expand Down Expand Up @@ -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 );
Expand All @@ -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 )
{
Expand Down

0 comments on commit 8d2e08f

Please sign in to comment.