Salome HOME
projects
/
modules
/
yacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1bb487
)
Avoid copy of buffer at unpickling time by using PyMemoryView_FromMemory instead...
author
Anthony Geay
<anthony.geay@edf.fr>
Mon, 6 Apr 2020 05:39:16 +0000
(07:39 +0200)
committer
Anthony Geay
<anthony.geay@edf.fr>
Mon, 6 Apr 2020 05:39:16 +0000
(07:39 +0200)
src/runtime/PythonNode.cxx
patch
|
blob
|
history
diff --git
a/src/runtime/PythonNode.cxx
b/src/runtime/PythonNode.cxx
index ea67e71435b6df0b8df7cd72061fe42a566ec0c5..7f004fc9ef80476f9c556954cd46e3d596a62667 100644
(file)
--- a/
src/runtime/PythonNode.cxx
+++ b/
src/runtime/PythonNode.cxx
@@
-496,11
+496,11
@@
void PythonNode::executeRemote()
{
AutoGIL agil;
PyObject *args(0),*ob(0);
- PyObject* resultPython=PyBytes_FromStringAndSize(resultCorbaC,length);
- delete [] resultCorbaC;
+ PyObject* resultPython=PyMemoryView_FromMemory(resultCorbaC,length,PyBUF_READ);
args = PyTuple_New(1);
PyTuple_SetItem(args,0,resultPython);
PyObject *finalResult=PyObject_CallObject(_pyfuncUnser,args);
+ delete [] resultCorbaC;
Py_DECREF(args);
if (finalResult == NULL)