Skip to content

Commit

Permalink
Avoid copy of int/double
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed May 26, 2024
1 parent 7e87b50 commit 70cf815
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions exaudfclient/base/python/python3/python_ext_dataframe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -914,8 +914,8 @@ inline void handleEmitPyInt(
case SWIGVMContainers::INT64:
case SWIGVMContainers::INT32:
{
long value = PyLong_AsLong(pyInt);
pyValue.reset(PyLong_FromLong(value));
Py_INCREF(pyInt);
pyValue.reset(pyInt);
break;
}
case SWIGVMContainers::NUMERIC:
Expand Down Expand Up @@ -976,8 +976,8 @@ inline void handleEmitPyFloat(
break;
case SWIGVMContainers::DOUBLE:
{
double value = PyFloat_AsDouble(pyFloat);
pyValue.reset(PyFloat_FromDouble(value));
Py_INCREF(pyFloat);
pyValue.reset(pyFloat);
break;
}
default:
Expand Down

0 comments on commit 70cf815

Please sign in to comment.