Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
python3 compatibility fix
  • Loading branch information
m-kuhn committed Mar 15, 2016
1 parent 3904722 commit 5789dd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/core/conversions.sip
Expand Up @@ -1433,7 +1433,11 @@ template<int, TYPE2*>

const int t1 = i.key();
TYPE2 * t2 = i.value();
#if (PY_VERSION_HEX < 0x03000000)
PyObject *t1obj = PyInt_FromSize_t(t1);
#else
PyObject *t1obj = PyLong_FromSize_t(t1);
#endif
PyObject *t2obj = sipConvertFromType(t2, sipType_TYPE2, sipTransferObj);
if (PyDict_GetItem(d, t1obj) == NULL)
{
Expand Down

0 comments on commit 5789dd8

Please sign in to comment.