Skip to content

Commit fe5c02d

Browse files
committed
[PyROOT] Update patch with code changes
1 parent 58e39a8 commit fe5c02d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bindings/pyroot/cppyy/patches/CPyCppyy-Always-convert-returned-std-string.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ index 1f3e43152e..70d8f72596 100644
4949
- return BindCppObjectNoCast((void*)result, sSTLStringScope, CPPInstance::kIsOwner);
5050
+ PyObject* pyresult =
5151
+ CPyCppyy_PyText_FromStringAndSize(result->c_str(), result->size());
52-
+ ::operator delete(result); // calls Cppyy::CallO which calls ::operator new
52+
+ delete result; // Cppyy::CallO allocates and constructs a string, so it must be properly destroyed
5353
+
5454
+ return pyresult;
5555
}

0 commit comments

Comments
 (0)