Commit 77f80779 authored by FPoupon's avatar FPoupon
Browse files

exclude long type for python2

parent 831ebfcc
......@@ -150,6 +150,7 @@ static PyObject* executeCommand_wrapper( PyObject* self,
std::string parameterName = std::string(
PyBytes_AsString( parameterKey ) );
#if PY_MAJOR_VERSION >= 3
if ( PyLong_Check( parameterValue ) )
{
......@@ -164,8 +165,8 @@ static PyObject* executeCommand_wrapper( PyObject* self,
}
}
#if PY_MAJOR_VERSION < 3
else if ( PyInt_Check( parameterValue ) )
#else
if ( PyInt_Check( parameterValue ) )
{
int32_t theParameterValue = _PyInt_AsInt( parameterValue );
......@@ -242,6 +243,8 @@ static PyObject* executeCommand_wrapper( PyObject* self,
{
PyObject* item = PyTuple_GetItem( parameterValue, index );
#if PY_MAJOR_VERSION >= 3
if ( PyLong_Check( item ) )
{
......@@ -256,8 +259,8 @@ static PyObject* executeCommand_wrapper( PyObject* self,
}
}
#if PY_MAJOR_VERSION < 3
else if ( PyInt_Check( item ) )
#else
if ( PyInt_Check( item ) )
{
int32_t theItemValue = _PyInt_AsInt( item );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment