changeset 128:5b59ebc267e1 fix-leak

fixed leaks in the initialization of the enums
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 30 Aug 2023 11:02:20 +0200
parents a862d554753f
children 5643e97d9367
files CodeAnalysis/Enumeration.mustache CodeAnalysis/README.txt Sources/Autogenerated/sdk_OrthancPluginChangeType.impl.h Sources/Autogenerated/sdk_OrthancPluginCompressionType.impl.h Sources/Autogenerated/sdk_OrthancPluginConstraintType.impl.h Sources/Autogenerated/sdk_OrthancPluginContentType.impl.h Sources/Autogenerated/sdk_OrthancPluginCreateDicomFlags.impl.h Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFlags.impl.h Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFormat.impl.h Sources/Autogenerated/sdk_OrthancPluginDicomWebBinaryMode.impl.h Sources/Autogenerated/sdk_OrthancPluginErrorCode.impl.h Sources/Autogenerated/sdk_OrthancPluginHttpMethod.impl.h Sources/Autogenerated/sdk_OrthancPluginIdentifierConstraint.impl.h Sources/Autogenerated/sdk_OrthancPluginImageFormat.impl.h Sources/Autogenerated/sdk_OrthancPluginInstanceOrigin.impl.h Sources/Autogenerated/sdk_OrthancPluginJobStepStatus.impl.h Sources/Autogenerated/sdk_OrthancPluginJobStopReason.impl.h Sources/Autogenerated/sdk_OrthancPluginMetricsType.impl.h Sources/Autogenerated/sdk_OrthancPluginPixelFormat.impl.h Sources/Autogenerated/sdk_OrthancPluginReceivedInstanceAction.impl.h Sources/Autogenerated/sdk_OrthancPluginResourceType.impl.h Sources/Autogenerated/sdk_OrthancPluginStorageCommitmentFailureReason.impl.h Sources/Autogenerated/sdk_OrthancPluginValueRepresentation.impl.h
diffstat 23 files changed, 1432 insertions(+), 238 deletions(-) [+]
line wrap: on
line diff
--- a/CodeAnalysis/Enumeration.mustache	Wed Aug 30 10:47:30 2023 +0200
+++ b/CodeAnalysis/Enumeration.mustache	Wed Aug 30 11:02:20 2023 +0200
@@ -65,7 +65,12 @@
    **/
   
   {{#values}}
-  PyDict_SetItemString(sdk_{{name}}_Type.tp_dict, "{{key}}", PyLong_FromLong({{value}}));
+  {
+    PyObject* tmp = PyLong_FromLong({{value}});
+    PyDict_SetItemString(sdk_{{name}}_Type.tp_dict, "{{key}}", tmp);
+    Py_DECREF(tmp);
+  }
+
   {{/values}}
 
   Py_INCREF(&sdk_{{name}}_Type);
--- a/CodeAnalysis/README.txt	Wed Aug 30 10:47:30 2023 +0200
+++ b/CodeAnalysis/README.txt	Wed Aug 30 11:02:20 2023 +0200
@@ -11,12 +11,21 @@
 Usage on Ubuntu 18.04
 =====================
 
-$ sudo apt-get install python-clang-4.0
+$ sudo apt-get install python-clang-4.0 python-pystache
 $ python2 ./ParseOrthancSDK.py --libclang=libclang-4.0.so.1 \
           --source ../Resources/Orthanc/Sdk-1.10.0/orthanc/OrthancCPlugin.h \
           --target ../Sources/Autogenerated
 
 
+Usage on Ubuntu 20.04
+=====================
+
+$ sudo apt-get install python-clang-6.0 python3-pystache
+$ python3 ./ParseOrthancSDK.py --libclang=libclang-6.0.so.1 \
+          --source ../Resources/Orthanc/Sdk-1.10.0/orthanc/OrthancCPlugin.h \
+          --target ../Sources/Autogenerated
+
+
 Run through docker
 ==================
 
--- a/Sources/Autogenerated/sdk_OrthancPluginChangeType.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginChangeType.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,25 +64,120 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "COMPLETED_SERIES", PyLong_FromLong(0));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "DELETED", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "NEW_CHILD_INSTANCE", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "NEW_INSTANCE", PyLong_FromLong(3));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "NEW_PATIENT", PyLong_FromLong(4));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "NEW_SERIES", PyLong_FromLong(5));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "NEW_STUDY", PyLong_FromLong(6));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "STABLE_PATIENT", PyLong_FromLong(7));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "STABLE_SERIES", PyLong_FromLong(8));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "STABLE_STUDY", PyLong_FromLong(9));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "ORTHANC_STARTED", PyLong_FromLong(10));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "ORTHANC_STOPPED", PyLong_FromLong(11));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "UPDATED_ATTACHMENT", PyLong_FromLong(12));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "UPDATED_METADATA", PyLong_FromLong(13));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "UPDATED_PEERS", PyLong_FromLong(14));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "UPDATED_MODALITIES", PyLong_FromLong(15));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "JOB_SUBMITTED", PyLong_FromLong(16));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "JOB_SUCCESS", PyLong_FromLong(17));
-  PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "JOB_FAILURE", PyLong_FromLong(18));
+  {
+    PyObject* tmp = PyLong_FromLong(0);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "COMPLETED_SERIES", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "DELETED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "NEW_CHILD_INSTANCE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "NEW_INSTANCE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(4);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "NEW_PATIENT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(5);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "NEW_SERIES", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(6);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "NEW_STUDY", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(7);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "STABLE_PATIENT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(8);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "STABLE_SERIES", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(9);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "STABLE_STUDY", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(10);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "ORTHANC_STARTED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(11);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "ORTHANC_STOPPED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(12);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "UPDATED_ATTACHMENT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(13);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "UPDATED_METADATA", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(14);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "UPDATED_PEERS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(15);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "UPDATED_MODALITIES", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(16);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "JOB_SUBMITTED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(17);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "JOB_SUCCESS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(18);
+    PyDict_SetItemString(sdk_OrthancPluginChangeType_Type.tp_dict, "JOB_FAILURE", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginChangeType_Type);
   if (PyModule_AddObject(module, "ChangeType", (PyObject *)&sdk_OrthancPluginChangeType_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginCompressionType.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginCompressionType.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,10 +64,30 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginCompressionType_Type.tp_dict, "ZLIB", PyLong_FromLong(0));
-  PyDict_SetItemString(sdk_OrthancPluginCompressionType_Type.tp_dict, "ZLIB_WITH_SIZE", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginCompressionType_Type.tp_dict, "GZIP", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginCompressionType_Type.tp_dict, "GZIP_WITH_SIZE", PyLong_FromLong(3));
+  {
+    PyObject* tmp = PyLong_FromLong(0);
+    PyDict_SetItemString(sdk_OrthancPluginCompressionType_Type.tp_dict, "ZLIB", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginCompressionType_Type.tp_dict, "ZLIB_WITH_SIZE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginCompressionType_Type.tp_dict, "GZIP", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginCompressionType_Type.tp_dict, "GZIP_WITH_SIZE", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginCompressionType_Type);
   if (PyModule_AddObject(module, "CompressionType", (PyObject *)&sdk_OrthancPluginCompressionType_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginConstraintType.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginConstraintType.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,11 +64,36 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginConstraintType_Type.tp_dict, "EQUAL", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginConstraintType_Type.tp_dict, "SMALLER_OR_EQUAL", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginConstraintType_Type.tp_dict, "GREATER_OR_EQUAL", PyLong_FromLong(3));
-  PyDict_SetItemString(sdk_OrthancPluginConstraintType_Type.tp_dict, "WILDCARD", PyLong_FromLong(4));
-  PyDict_SetItemString(sdk_OrthancPluginConstraintType_Type.tp_dict, "LIST", PyLong_FromLong(5));
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginConstraintType_Type.tp_dict, "EQUAL", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginConstraintType_Type.tp_dict, "SMALLER_OR_EQUAL", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginConstraintType_Type.tp_dict, "GREATER_OR_EQUAL", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(4);
+    PyDict_SetItemString(sdk_OrthancPluginConstraintType_Type.tp_dict, "WILDCARD", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(5);
+    PyDict_SetItemString(sdk_OrthancPluginConstraintType_Type.tp_dict, "LIST", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginConstraintType_Type);
   if (PyModule_AddObject(module, "ConstraintType", (PyObject *)&sdk_OrthancPluginConstraintType_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginContentType.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginContentType.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,10 +64,30 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginContentType_Type.tp_dict, "UNKNOWN", PyLong_FromLong(0));
-  PyDict_SetItemString(sdk_OrthancPluginContentType_Type.tp_dict, "DICOM", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginContentType_Type.tp_dict, "DICOM_AS_JSON", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginContentType_Type.tp_dict, "DICOM_UNTIL_PIXEL_DATA", PyLong_FromLong(3));
+  {
+    PyObject* tmp = PyLong_FromLong(0);
+    PyDict_SetItemString(sdk_OrthancPluginContentType_Type.tp_dict, "UNKNOWN", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginContentType_Type.tp_dict, "DICOM", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginContentType_Type.tp_dict, "DICOM_AS_JSON", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginContentType_Type.tp_dict, "DICOM_UNTIL_PIXEL_DATA", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginContentType_Type);
   if (PyModule_AddObject(module, "ContentType", (PyObject *)&sdk_OrthancPluginContentType_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginCreateDicomFlags.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginCreateDicomFlags.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,9 +64,24 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginCreateDicomFlags_Type.tp_dict, "NONE", PyLong_FromLong(0));
-  PyDict_SetItemString(sdk_OrthancPluginCreateDicomFlags_Type.tp_dict, "DECODE_DATA_URI_SCHEME", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginCreateDicomFlags_Type.tp_dict, "GENERATE_IDENTIFIERS", PyLong_FromLong(2));
+  {
+    PyObject* tmp = PyLong_FromLong(0);
+    PyDict_SetItemString(sdk_OrthancPluginCreateDicomFlags_Type.tp_dict, "NONE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginCreateDicomFlags_Type.tp_dict, "DECODE_DATA_URI_SCHEME", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginCreateDicomFlags_Type.tp_dict, "GENERATE_IDENTIFIERS", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginCreateDicomFlags_Type);
   if (PyModule_AddObject(module, "CreateDicomFlags", (PyObject *)&sdk_OrthancPluginCreateDicomFlags_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFlags.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFlags.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,15 +64,60 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "NONE", PyLong_FromLong(0));
-  PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "INCLUDE_BINARY", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "INCLUDE_PRIVATE_TAGS", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "INCLUDE_UNKNOWN_TAGS", PyLong_FromLong(4));
-  PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "INCLUDE_PIXEL_DATA", PyLong_FromLong(8));
-  PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "CONVERT_BINARY_TO_ASCII", PyLong_FromLong(16));
-  PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "CONVERT_BINARY_TO_NULL", PyLong_FromLong(32));
-  PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "STOP_AFTER_PIXEL_DATA", PyLong_FromLong(64));
-  PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "SKIP_GROUP_LENGTHS", PyLong_FromLong(128));
+  {
+    PyObject* tmp = PyLong_FromLong(0);
+    PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "NONE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "INCLUDE_BINARY", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "INCLUDE_PRIVATE_TAGS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(4);
+    PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "INCLUDE_UNKNOWN_TAGS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(8);
+    PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "INCLUDE_PIXEL_DATA", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(16);
+    PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "CONVERT_BINARY_TO_ASCII", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(32);
+    PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "CONVERT_BINARY_TO_NULL", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(64);
+    PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "STOP_AFTER_PIXEL_DATA", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(128);
+    PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFlags_Type.tp_dict, "SKIP_GROUP_LENGTHS", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginDicomToJsonFlags_Type);
   if (PyModule_AddObject(module, "DicomToJsonFlags", (PyObject *)&sdk_OrthancPluginDicomToJsonFlags_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFormat.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFormat.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,9 +64,24 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFormat_Type.tp_dict, "FULL", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFormat_Type.tp_dict, "SHORT", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFormat_Type.tp_dict, "HUMAN", PyLong_FromLong(3));
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFormat_Type.tp_dict, "FULL", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFormat_Type.tp_dict, "SHORT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginDicomToJsonFormat_Type.tp_dict, "HUMAN", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginDicomToJsonFormat_Type);
   if (PyModule_AddObject(module, "DicomToJsonFormat", (PyObject *)&sdk_OrthancPluginDicomToJsonFormat_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginDicomWebBinaryMode.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginDicomWebBinaryMode.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,9 +64,24 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginDicomWebBinaryMode_Type.tp_dict, "IGNORE", PyLong_FromLong(0));
-  PyDict_SetItemString(sdk_OrthancPluginDicomWebBinaryMode_Type.tp_dict, "INLINE_BINARY", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginDicomWebBinaryMode_Type.tp_dict, "BULK_DATA_URI", PyLong_FromLong(2));
+  {
+    PyObject* tmp = PyLong_FromLong(0);
+    PyDict_SetItemString(sdk_OrthancPluginDicomWebBinaryMode_Type.tp_dict, "IGNORE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginDicomWebBinaryMode_Type.tp_dict, "INLINE_BINARY", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginDicomWebBinaryMode_Type.tp_dict, "BULK_DATA_URI", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginDicomWebBinaryMode_Type);
   if (PyModule_AddObject(module, "DicomWebBinaryMode", (PyObject *)&sdk_OrthancPluginDicomWebBinaryMode_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginErrorCode.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginErrorCode.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,113 +64,648 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INTERNAL_ERROR", PyLong_FromLong(-1));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SUCCESS", PyLong_FromLong(0));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "PLUGIN", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NOT_IMPLEMENTED", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "PARAMETER_OUT_OF_RANGE", PyLong_FromLong(3));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NOT_ENOUGH_MEMORY", PyLong_FromLong(4));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_PARAMETER_TYPE", PyLong_FromLong(5));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_SEQUENCE_OF_CALLS", PyLong_FromLong(6));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INEXISTENT_ITEM", PyLong_FromLong(7));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_REQUEST", PyLong_FromLong(8));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NETWORK_PROTOCOL", PyLong_FromLong(9));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SYSTEM_COMMAND", PyLong_FromLong(10));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DATABASE", PyLong_FromLong(11));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "URI_SYNTAX", PyLong_FromLong(12));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INEXISTENT_FILE", PyLong_FromLong(13));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CANNOT_WRITE_FILE", PyLong_FromLong(14));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_FILE_FORMAT", PyLong_FromLong(15));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "TIMEOUT", PyLong_FromLong(16));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "UNKNOWN_RESOURCE", PyLong_FromLong(17));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INCOMPATIBLE_DATABASE_VERSION", PyLong_FromLong(18));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "FULL_STORAGE", PyLong_FromLong(19));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CORRUPTED_FILE", PyLong_FromLong(20));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INEXISTENT_TAG", PyLong_FromLong(21));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "READ_ONLY", PyLong_FromLong(22));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INCOMPATIBLE_IMAGE_FORMAT", PyLong_FromLong(23));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INCOMPATIBLE_IMAGE_SIZE", PyLong_FromLong(24));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SHARED_LIBRARY", PyLong_FromLong(25));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "UNKNOWN_PLUGIN_SERVICE", PyLong_FromLong(26));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "UNKNOWN_DICOM_TAG", PyLong_FromLong(27));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_JSON", PyLong_FromLong(28));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "UNAUTHORIZED", PyLong_FromLong(29));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_FONT", PyLong_FromLong(30));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DATABASE_PLUGIN", PyLong_FromLong(31));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "STORAGE_AREA_PLUGIN", PyLong_FromLong(32));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "EMPTY_REQUEST", PyLong_FromLong(33));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NOT_ACCEPTABLE", PyLong_FromLong(34));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NULL_POINTER", PyLong_FromLong(35));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DATABASE_UNAVAILABLE", PyLong_FromLong(36));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CANCELED_JOB", PyLong_FromLong(37));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_GEOMETRY", PyLong_FromLong(38));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SSL_INITIALIZATION", PyLong_FromLong(39));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DISCONTINUED_ABI", PyLong_FromLong(40));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_RANGE", PyLong_FromLong(41));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DATABASE_CANNOT_SERIALIZE", PyLong_FromLong(42));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "REVISION", PyLong_FromLong(43));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_NOT_OPENED", PyLong_FromLong(1000));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_ALREADY_OPENED", PyLong_FromLong(1001));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_CANNOT_OPEN", PyLong_FromLong(1002));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_STATEMENT_ALREADY_USED", PyLong_FromLong(1003));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_EXECUTE", PyLong_FromLong(1004));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_ROLLBACK_WITHOUT_TRANSACTION", PyLong_FromLong(1005));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_COMMIT_WITHOUT_TRANSACTION", PyLong_FromLong(1006));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_REGISTER_FUNCTION", PyLong_FromLong(1007));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_FLUSH", PyLong_FromLong(1008));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_CANNOT_RUN", PyLong_FromLong(1009));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_CANNOT_STEP", PyLong_FromLong(1010));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_BIND_OUT_OF_RANGE", PyLong_FromLong(1011));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_PREPARE_STATEMENT", PyLong_FromLong(1012));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_TRANSACTION_ALREADY_STARTED", PyLong_FromLong(1013));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_TRANSACTION_COMMIT", PyLong_FromLong(1014));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_TRANSACTION_BEGIN", PyLong_FromLong(1015));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DIRECTORY_OVER_FILE", PyLong_FromLong(2000));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "FILE_STORAGE_CANNOT_WRITE", PyLong_FromLong(2001));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DIRECTORY_EXPECTED", PyLong_FromLong(2002));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "HTTP_PORT_IN_USE", PyLong_FromLong(2003));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DICOM_PORT_IN_USE", PyLong_FromLong(2004));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_HTTP_STATUS_IN_REST", PyLong_FromLong(2005));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "REGULAR_FILE_EXPECTED", PyLong_FromLong(2006));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "PATH_TO_EXECUTABLE", PyLong_FromLong(2007));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "MAKE_DIRECTORY", PyLong_FromLong(2008));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_APPLICATION_ENTITY_TITLE", PyLong_FromLong(2009));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_CFIND_HANDLER", PyLong_FromLong(2010));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_CMOVE_HANDLER", PyLong_FromLong(2011));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_CSTORE_HANDLER", PyLong_FromLong(2012));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_APPLICATION_ENTITY_FILTER", PyLong_FromLong(2013));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_SOP_CLASS_OR_INSTANCE", PyLong_FromLong(2014));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_PRESENTATION_CONTEXT", PyLong_FromLong(2015));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DICOM_FIND_UNAVAILABLE", PyLong_FromLong(2016));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DICOM_MOVE_UNAVAILABLE", PyLong_FromLong(2017));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CANNOT_STORE_INSTANCE", PyLong_FromLong(2018));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_NOT_STRING", PyLong_FromLong(2019));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_OVERRIDE_TAG", PyLong_FromLong(2020));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_USE_CONTENT", PyLong_FromLong(2021));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_NO_PAYLOAD", PyLong_FromLong(2022));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_USE_DATA_URI_SCHEME", PyLong_FromLong(2023));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_BAD_PARENT", PyLong_FromLong(2024));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_PARENT_IS_INSTANCE", PyLong_FromLong(2025));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_PARENT_ENCODING", PyLong_FromLong(2026));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "UNKNOWN_MODALITY", PyLong_FromLong(2027));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_JOB_ORDERING", PyLong_FromLong(2028));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "JSON_TO_LUA_TABLE", PyLong_FromLong(2029));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CANNOT_CREATE_LUA", PyLong_FromLong(2030));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CANNOT_EXECUTE_LUA", PyLong_FromLong(2031));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "LUA_ALREADY_EXECUTED", PyLong_FromLong(2032));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "LUA_BAD_OUTPUT", PyLong_FromLong(2033));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NOT_LUA_PREDICATE", PyLong_FromLong(2034));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "LUA_RETURNS_NO_STRING", PyLong_FromLong(2035));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "STORAGE_AREA_ALREADY_REGISTERED", PyLong_FromLong(2036));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DATABASE_BACKEND_ALREADY_REGISTERED", PyLong_FromLong(2037));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DATABASE_NOT_INITIALIZED", PyLong_FromLong(2038));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SSL_DISABLED", PyLong_FromLong(2039));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CANNOT_ORDER_SLICES", PyLong_FromLong(2040));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_WORKLIST_HANDLER", PyLong_FromLong(2041));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "ALREADY_EXISTING_TAG", PyLong_FromLong(2042));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_STORAGE_COMMITMENT_HANDLER", PyLong_FromLong(2043));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_CGET_HANDLER", PyLong_FromLong(2044));
-  PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "UNSUPPORTED_MEDIA_TYPE", PyLong_FromLong(3000));
+  {
+    PyObject* tmp = PyLong_FromLong(-1);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INTERNAL_ERROR", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(0);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SUCCESS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "PLUGIN", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NOT_IMPLEMENTED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "PARAMETER_OUT_OF_RANGE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(4);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NOT_ENOUGH_MEMORY", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(5);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_PARAMETER_TYPE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(6);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_SEQUENCE_OF_CALLS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(7);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INEXISTENT_ITEM", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(8);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_REQUEST", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(9);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NETWORK_PROTOCOL", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(10);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SYSTEM_COMMAND", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(11);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DATABASE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(12);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "URI_SYNTAX", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(13);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INEXISTENT_FILE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(14);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CANNOT_WRITE_FILE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(15);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_FILE_FORMAT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(16);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "TIMEOUT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(17);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "UNKNOWN_RESOURCE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(18);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INCOMPATIBLE_DATABASE_VERSION", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(19);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "FULL_STORAGE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(20);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CORRUPTED_FILE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(21);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INEXISTENT_TAG", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(22);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "READ_ONLY", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(23);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INCOMPATIBLE_IMAGE_FORMAT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(24);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "INCOMPATIBLE_IMAGE_SIZE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(25);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SHARED_LIBRARY", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(26);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "UNKNOWN_PLUGIN_SERVICE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(27);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "UNKNOWN_DICOM_TAG", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(28);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_JSON", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(29);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "UNAUTHORIZED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(30);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_FONT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(31);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DATABASE_PLUGIN", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(32);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "STORAGE_AREA_PLUGIN", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(33);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "EMPTY_REQUEST", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(34);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NOT_ACCEPTABLE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(35);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NULL_POINTER", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(36);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DATABASE_UNAVAILABLE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(37);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CANCELED_JOB", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(38);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_GEOMETRY", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(39);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SSL_INITIALIZATION", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(40);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DISCONTINUED_ABI", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(41);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_RANGE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(42);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DATABASE_CANNOT_SERIALIZE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(43);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "REVISION", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1000);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_NOT_OPENED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1001);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_ALREADY_OPENED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1002);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_CANNOT_OPEN", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1003);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_STATEMENT_ALREADY_USED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1004);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_EXECUTE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1005);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_ROLLBACK_WITHOUT_TRANSACTION", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1006);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_COMMIT_WITHOUT_TRANSACTION", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1007);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_REGISTER_FUNCTION", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1008);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_FLUSH", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1009);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_CANNOT_RUN", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1010);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_CANNOT_STEP", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1011);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_BIND_OUT_OF_RANGE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1012);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_PREPARE_STATEMENT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1013);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_TRANSACTION_ALREADY_STARTED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1014);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_TRANSACTION_COMMIT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1015);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SQLITE_TRANSACTION_BEGIN", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2000);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DIRECTORY_OVER_FILE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2001);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "FILE_STORAGE_CANNOT_WRITE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2002);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DIRECTORY_EXPECTED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2003);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "HTTP_PORT_IN_USE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2004);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DICOM_PORT_IN_USE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2005);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_HTTP_STATUS_IN_REST", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2006);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "REGULAR_FILE_EXPECTED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2007);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "PATH_TO_EXECUTABLE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2008);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "MAKE_DIRECTORY", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2009);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_APPLICATION_ENTITY_TITLE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2010);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_CFIND_HANDLER", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2011);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_CMOVE_HANDLER", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2012);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_CSTORE_HANDLER", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2013);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_APPLICATION_ENTITY_FILTER", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2014);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_SOP_CLASS_OR_INSTANCE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2015);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_PRESENTATION_CONTEXT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2016);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DICOM_FIND_UNAVAILABLE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2017);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DICOM_MOVE_UNAVAILABLE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2018);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CANNOT_STORE_INSTANCE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2019);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_NOT_STRING", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2020);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_OVERRIDE_TAG", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2021);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_USE_CONTENT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2022);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_NO_PAYLOAD", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2023);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_USE_DATA_URI_SCHEME", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2024);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_BAD_PARENT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2025);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_PARENT_IS_INSTANCE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2026);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CREATE_DICOM_PARENT_ENCODING", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2027);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "UNKNOWN_MODALITY", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2028);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "BAD_JOB_ORDERING", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2029);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "JSON_TO_LUA_TABLE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2030);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CANNOT_CREATE_LUA", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2031);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CANNOT_EXECUTE_LUA", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2032);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "LUA_ALREADY_EXECUTED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2033);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "LUA_BAD_OUTPUT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2034);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NOT_LUA_PREDICATE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2035);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "LUA_RETURNS_NO_STRING", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2036);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "STORAGE_AREA_ALREADY_REGISTERED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2037);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DATABASE_BACKEND_ALREADY_REGISTERED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2038);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "DATABASE_NOT_INITIALIZED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2039);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "SSL_DISABLED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2040);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "CANNOT_ORDER_SLICES", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2041);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_WORKLIST_HANDLER", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2042);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "ALREADY_EXISTING_TAG", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2043);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_STORAGE_COMMITMENT_HANDLER", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2044);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "NO_CGET_HANDLER", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3000);
+    PyDict_SetItemString(sdk_OrthancPluginErrorCode_Type.tp_dict, "UNSUPPORTED_MEDIA_TYPE", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginErrorCode_Type);
   if (PyModule_AddObject(module, "ErrorCode", (PyObject *)&sdk_OrthancPluginErrorCode_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginHttpMethod.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginHttpMethod.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,10 +64,30 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginHttpMethod_Type.tp_dict, "GET", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginHttpMethod_Type.tp_dict, "POST", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginHttpMethod_Type.tp_dict, "PUT", PyLong_FromLong(3));
-  PyDict_SetItemString(sdk_OrthancPluginHttpMethod_Type.tp_dict, "DELETE", PyLong_FromLong(4));
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginHttpMethod_Type.tp_dict, "GET", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginHttpMethod_Type.tp_dict, "POST", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginHttpMethod_Type.tp_dict, "PUT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(4);
+    PyDict_SetItemString(sdk_OrthancPluginHttpMethod_Type.tp_dict, "DELETE", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginHttpMethod_Type);
   if (PyModule_AddObject(module, "HttpMethod", (PyObject *)&sdk_OrthancPluginHttpMethod_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginIdentifierConstraint.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginIdentifierConstraint.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,10 +64,30 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginIdentifierConstraint_Type.tp_dict, "EQUAL", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginIdentifierConstraint_Type.tp_dict, "SMALLER_OR_EQUAL", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginIdentifierConstraint_Type.tp_dict, "GREATER_OR_EQUAL", PyLong_FromLong(3));
-  PyDict_SetItemString(sdk_OrthancPluginIdentifierConstraint_Type.tp_dict, "WILDCARD", PyLong_FromLong(4));
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginIdentifierConstraint_Type.tp_dict, "EQUAL", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginIdentifierConstraint_Type.tp_dict, "SMALLER_OR_EQUAL", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginIdentifierConstraint_Type.tp_dict, "GREATER_OR_EQUAL", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(4);
+    PyDict_SetItemString(sdk_OrthancPluginIdentifierConstraint_Type.tp_dict, "WILDCARD", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginIdentifierConstraint_Type);
   if (PyModule_AddObject(module, "IdentifierConstraint", (PyObject *)&sdk_OrthancPluginIdentifierConstraint_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginImageFormat.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginImageFormat.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,9 +64,24 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginImageFormat_Type.tp_dict, "PNG", PyLong_FromLong(0));
-  PyDict_SetItemString(sdk_OrthancPluginImageFormat_Type.tp_dict, "JPEG", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginImageFormat_Type.tp_dict, "DICOM", PyLong_FromLong(2));
+  {
+    PyObject* tmp = PyLong_FromLong(0);
+    PyDict_SetItemString(sdk_OrthancPluginImageFormat_Type.tp_dict, "PNG", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginImageFormat_Type.tp_dict, "JPEG", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginImageFormat_Type.tp_dict, "DICOM", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginImageFormat_Type);
   if (PyModule_AddObject(module, "ImageFormat", (PyObject *)&sdk_OrthancPluginImageFormat_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginInstanceOrigin.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginInstanceOrigin.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,12 +64,42 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginInstanceOrigin_Type.tp_dict, "UNKNOWN", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginInstanceOrigin_Type.tp_dict, "DICOM_PROTOCOL", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginInstanceOrigin_Type.tp_dict, "REST_API", PyLong_FromLong(3));
-  PyDict_SetItemString(sdk_OrthancPluginInstanceOrigin_Type.tp_dict, "PLUGIN", PyLong_FromLong(4));
-  PyDict_SetItemString(sdk_OrthancPluginInstanceOrigin_Type.tp_dict, "LUA", PyLong_FromLong(5));
-  PyDict_SetItemString(sdk_OrthancPluginInstanceOrigin_Type.tp_dict, "WEB_DAV", PyLong_FromLong(6));
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginInstanceOrigin_Type.tp_dict, "UNKNOWN", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginInstanceOrigin_Type.tp_dict, "DICOM_PROTOCOL", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginInstanceOrigin_Type.tp_dict, "REST_API", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(4);
+    PyDict_SetItemString(sdk_OrthancPluginInstanceOrigin_Type.tp_dict, "PLUGIN", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(5);
+    PyDict_SetItemString(sdk_OrthancPluginInstanceOrigin_Type.tp_dict, "LUA", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(6);
+    PyDict_SetItemString(sdk_OrthancPluginInstanceOrigin_Type.tp_dict, "WEB_DAV", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginInstanceOrigin_Type);
   if (PyModule_AddObject(module, "InstanceOrigin", (PyObject *)&sdk_OrthancPluginInstanceOrigin_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginJobStepStatus.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginJobStepStatus.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,9 +64,24 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginJobStepStatus_Type.tp_dict, "SUCCESS", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginJobStepStatus_Type.tp_dict, "FAILURE", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginJobStepStatus_Type.tp_dict, "CONTINUE", PyLong_FromLong(3));
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginJobStepStatus_Type.tp_dict, "SUCCESS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginJobStepStatus_Type.tp_dict, "FAILURE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginJobStepStatus_Type.tp_dict, "CONTINUE", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginJobStepStatus_Type);
   if (PyModule_AddObject(module, "JobStepStatus", (PyObject *)&sdk_OrthancPluginJobStepStatus_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginJobStopReason.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginJobStopReason.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,10 +64,30 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginJobStopReason_Type.tp_dict, "SUCCESS", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginJobStopReason_Type.tp_dict, "PAUSED", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginJobStopReason_Type.tp_dict, "FAILURE", PyLong_FromLong(3));
-  PyDict_SetItemString(sdk_OrthancPluginJobStopReason_Type.tp_dict, "CANCELED", PyLong_FromLong(4));
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginJobStopReason_Type.tp_dict, "SUCCESS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginJobStopReason_Type.tp_dict, "PAUSED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginJobStopReason_Type.tp_dict, "FAILURE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(4);
+    PyDict_SetItemString(sdk_OrthancPluginJobStopReason_Type.tp_dict, "CANCELED", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginJobStopReason_Type);
   if (PyModule_AddObject(module, "JobStopReason", (PyObject *)&sdk_OrthancPluginJobStopReason_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginMetricsType.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginMetricsType.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,8 +64,18 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginMetricsType_Type.tp_dict, "DEFAULT", PyLong_FromLong(0));
-  PyDict_SetItemString(sdk_OrthancPluginMetricsType_Type.tp_dict, "TIMER", PyLong_FromLong(1));
+  {
+    PyObject* tmp = PyLong_FromLong(0);
+    PyDict_SetItemString(sdk_OrthancPluginMetricsType_Type.tp_dict, "DEFAULT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginMetricsType_Type.tp_dict, "TIMER", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginMetricsType_Type);
   if (PyModule_AddObject(module, "MetricsType", (PyObject *)&sdk_OrthancPluginMetricsType_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginPixelFormat.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginPixelFormat.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,17 +64,72 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "GRAYSCALE8", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "GRAYSCALE16", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "SIGNED_GRAYSCALE16", PyLong_FromLong(3));
-  PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "RGB24", PyLong_FromLong(4));
-  PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "RGBA32", PyLong_FromLong(5));
-  PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "UNKNOWN", PyLong_FromLong(6));
-  PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "RGB48", PyLong_FromLong(7));
-  PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "GRAYSCALE32", PyLong_FromLong(8));
-  PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "FLOAT32", PyLong_FromLong(9));
-  PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "BGRA32", PyLong_FromLong(10));
-  PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "GRAYSCALE64", PyLong_FromLong(11));
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "GRAYSCALE8", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "GRAYSCALE16", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "SIGNED_GRAYSCALE16", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(4);
+    PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "RGB24", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(5);
+    PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "RGBA32", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(6);
+    PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "UNKNOWN", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(7);
+    PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "RGB48", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(8);
+    PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "GRAYSCALE32", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(9);
+    PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "FLOAT32", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(10);
+    PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "BGRA32", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(11);
+    PyDict_SetItemString(sdk_OrthancPluginPixelFormat_Type.tp_dict, "GRAYSCALE64", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginPixelFormat_Type);
   if (PyModule_AddObject(module, "PixelFormat", (PyObject *)&sdk_OrthancPluginPixelFormat_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginReceivedInstanceAction.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginReceivedInstanceAction.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,9 +64,24 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginReceivedInstanceAction_Type.tp_dict, "KEEP_AS_IS", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginReceivedInstanceAction_Type.tp_dict, "MODIFY", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginReceivedInstanceAction_Type.tp_dict, "DISCARD", PyLong_FromLong(3));
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginReceivedInstanceAction_Type.tp_dict, "KEEP_AS_IS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginReceivedInstanceAction_Type.tp_dict, "MODIFY", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginReceivedInstanceAction_Type.tp_dict, "DISCARD", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginReceivedInstanceAction_Type);
   if (PyModule_AddObject(module, "ReceivedInstanceAction", (PyObject *)&sdk_OrthancPluginReceivedInstanceAction_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginResourceType.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginResourceType.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,11 +64,36 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginResourceType_Type.tp_dict, "PATIENT", PyLong_FromLong(0));
-  PyDict_SetItemString(sdk_OrthancPluginResourceType_Type.tp_dict, "STUDY", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginResourceType_Type.tp_dict, "SERIES", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginResourceType_Type.tp_dict, "INSTANCE", PyLong_FromLong(3));
-  PyDict_SetItemString(sdk_OrthancPluginResourceType_Type.tp_dict, "NONE", PyLong_FromLong(4));
+  {
+    PyObject* tmp = PyLong_FromLong(0);
+    PyDict_SetItemString(sdk_OrthancPluginResourceType_Type.tp_dict, "PATIENT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginResourceType_Type.tp_dict, "STUDY", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginResourceType_Type.tp_dict, "SERIES", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginResourceType_Type.tp_dict, "INSTANCE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(4);
+    PyDict_SetItemString(sdk_OrthancPluginResourceType_Type.tp_dict, "NONE", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginResourceType_Type);
   if (PyModule_AddObject(module, "ResourceType", (PyObject *)&sdk_OrthancPluginResourceType_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginStorageCommitmentFailureReason.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginStorageCommitmentFailureReason.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,13 +64,48 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "SUCCESS", PyLong_FromLong(0));
-  PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "PROCESSING_FAILURE", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "NO_SUCH_OBJECT_INSTANCE", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "RESOURCE_LIMITATION", PyLong_FromLong(3));
-  PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "REFERENCED_SOPCLASS_NOT_SUPPORTED", PyLong_FromLong(4));
-  PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "CLASS_INSTANCE_CONFLICT", PyLong_FromLong(5));
-  PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "DUPLICATE_TRANSACTION_UID", PyLong_FromLong(6));
+  {
+    PyObject* tmp = PyLong_FromLong(0);
+    PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "SUCCESS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "PROCESSING_FAILURE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "NO_SUCH_OBJECT_INSTANCE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "RESOURCE_LIMITATION", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(4);
+    PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "REFERENCED_SOPCLASS_NOT_SUPPORTED", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(5);
+    PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "CLASS_INSTANCE_CONFLICT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(6);
+    PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "DUPLICATE_TRANSACTION_UID", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginStorageCommitmentFailureReason_Type);
   if (PyModule_AddObject(module, "StorageCommitmentFailureReason", (PyObject *)&sdk_OrthancPluginStorageCommitmentFailureReason_Type) < 0)
--- a/Sources/Autogenerated/sdk_OrthancPluginValueRepresentation.impl.h	Wed Aug 30 10:47:30 2023 +0200
+++ b/Sources/Autogenerated/sdk_OrthancPluginValueRepresentation.impl.h	Wed Aug 30 11:02:20 2023 +0200
@@ -64,33 +64,168 @@
    * (in your module initialization function)."
    **/
   
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "AE", PyLong_FromLong(1));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "AS", PyLong_FromLong(2));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "AT", PyLong_FromLong(3));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "CS", PyLong_FromLong(4));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "DA", PyLong_FromLong(5));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "DS", PyLong_FromLong(6));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "DT", PyLong_FromLong(7));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "FD", PyLong_FromLong(8));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "FL", PyLong_FromLong(9));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "IS", PyLong_FromLong(10));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "LO", PyLong_FromLong(11));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "LT", PyLong_FromLong(12));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "OB", PyLong_FromLong(13));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "OF", PyLong_FromLong(14));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "OW", PyLong_FromLong(15));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "PN", PyLong_FromLong(16));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "SH", PyLong_FromLong(17));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "SL", PyLong_FromLong(18));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "SQ", PyLong_FromLong(19));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "SS", PyLong_FromLong(20));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "ST", PyLong_FromLong(21));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "TM", PyLong_FromLong(22));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "UI", PyLong_FromLong(23));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "UL", PyLong_FromLong(24));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "UN", PyLong_FromLong(25));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "US", PyLong_FromLong(26));
-  PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "UT", PyLong_FromLong(27));
+  {
+    PyObject* tmp = PyLong_FromLong(1);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "AE", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(2);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "AS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(3);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "AT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(4);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "CS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(5);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "DA", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(6);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "DS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(7);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "DT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(8);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "FD", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(9);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "FL", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(10);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "IS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(11);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "LO", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(12);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "LT", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(13);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "OB", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(14);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "OF", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(15);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "OW", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(16);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "PN", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(17);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "SH", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(18);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "SL", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(19);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "SQ", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(20);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "SS", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(21);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "ST", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(22);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "TM", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(23);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "UI", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(24);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "UL", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(25);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "UN", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(26);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "US", tmp);
+    Py_DECREF(tmp);
+  }
+
+  {
+    PyObject* tmp = PyLong_FromLong(27);
+    PyDict_SetItemString(sdk_OrthancPluginValueRepresentation_Type.tp_dict, "UT", tmp);
+    Py_DECREF(tmp);
+  }
+
 
   Py_INCREF(&sdk_OrthancPluginValueRepresentation_Type);
   if (PyModule_AddObject(module, "ValueRepresentation", (PyObject *)&sdk_OrthancPluginValueRepresentation_Type) < 0)