Mercurial > hg > orthanc-python
diff Sources/DicomScpCallbacks.cpp @ 131:c55b0583084b
integration fix-leak->mainline
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 30 Aug 2023 11:52:45 +0200 |
parents | a3f77cf16396 a862d554753f |
children | 566df919b286 71d305c29cfa |
line wrap: on
line diff
--- a/Sources/DicomScpCallbacks.cpp Wed Aug 30 11:49:59 2023 +0200 +++ b/Sources/DicomScpCallbacks.cpp Wed Aug 30 11:52:45 2023 +0200 @@ -295,50 +295,53 @@ { PythonString tmp(lock, level); - PyDict_SetItemString(kw.GetPyObject(), "Level", tmp.Release()); + PyDict_SetItemString(kw.GetPyObject(), "Level", tmp.GetPyObject()); } { PythonString tmp(lock, patientId_); - PyDict_SetItemString(kw.GetPyObject(), "PatientID", tmp.Release()); + PyDict_SetItemString(kw.GetPyObject(), "PatientID", tmp.GetPyObject()); } { PythonString tmp(lock, accessionNumber_); - PyDict_SetItemString(kw.GetPyObject(), "AccessionNumber", tmp.Release()); + PyDict_SetItemString(kw.GetPyObject(), "AccessionNumber", tmp.GetPyObject()); } { PythonString tmp(lock, studyInstanceUid_); - PyDict_SetItemString(kw.GetPyObject(), "StudyInstanceUID", tmp.Release()); + PyDict_SetItemString(kw.GetPyObject(), "StudyInstanceUID", tmp.GetPyObject()); } { PythonString tmp(lock, seriesInstanceUid_); - PyDict_SetItemString(kw.GetPyObject(), "SeriesInstanceUID", tmp.Release()); + PyDict_SetItemString(kw.GetPyObject(), "SeriesInstanceUID", tmp.GetPyObject()); } { PythonString tmp(lock, sopInstanceUid_); - PyDict_SetItemString(kw.GetPyObject(), "SOPInstanceUID", tmp.Release()); + PyDict_SetItemString(kw.GetPyObject(), "SOPInstanceUID", tmp.GetPyObject()); } { PythonString tmp(lock, originatorAet_); - PyDict_SetItemString(kw.GetPyObject(), "OriginatorAET", tmp.Release()); + PyDict_SetItemString(kw.GetPyObject(), "OriginatorAET", tmp.GetPyObject()); } { PythonString tmp(lock, sourceAet_); - PyDict_SetItemString(kw.GetPyObject(), "SourceAET", tmp.Release()); + PyDict_SetItemString(kw.GetPyObject(), "SourceAET", tmp.GetPyObject()); } { PythonString tmp(lock, targetAet_); - PyDict_SetItemString(kw.GetPyObject(), "TargetAET", tmp.Release()); + PyDict_SetItemString(kw.GetPyObject(), "TargetAET", tmp.GetPyObject()); } - PyDict_SetItemString(kw.GetPyObject(), "OriginatorID", PyLong_FromUnsignedLong(originatorId_)); + { + PythonObject tmp(lock, PyLong_FromUnsignedLong(originatorId_)); + PyDict_SetItemString(kw.GetPyObject(), "OriginatorID", tmp.GetPyObject()); + } PythonObject args(lock, PyTuple_New(0));