comparison Sources/Autogenerated/sdk_OrthancPluginStorageCommitmentFailureReason.impl.h @ 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 eb6ac5a801d1
children c55b0583084b
comparison
equal deleted inserted replaced
127:a862d554753f 128:5b59ebc267e1
62 * "Class attributes can be added by setting the tp_dict to a 62 * "Class attributes can be added by setting the tp_dict to a
63 * dictionary with these attributes before calling PyType_Ready() 63 * dictionary with these attributes before calling PyType_Ready()
64 * (in your module initialization function)." 64 * (in your module initialization function)."
65 **/ 65 **/
66 66
67 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "SUCCESS", PyLong_FromLong(0)); 67 {
68 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "PROCESSING_FAILURE", PyLong_FromLong(1)); 68 PyObject* tmp = PyLong_FromLong(0);
69 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "NO_SUCH_OBJECT_INSTANCE", PyLong_FromLong(2)); 69 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "SUCCESS", tmp);
70 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "RESOURCE_LIMITATION", PyLong_FromLong(3)); 70 Py_DECREF(tmp);
71 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "REFERENCED_SOPCLASS_NOT_SUPPORTED", PyLong_FromLong(4)); 71 }
72 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "CLASS_INSTANCE_CONFLICT", PyLong_FromLong(5)); 72
73 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "DUPLICATE_TRANSACTION_UID", PyLong_FromLong(6)); 73 {
74 PyObject* tmp = PyLong_FromLong(1);
75 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "PROCESSING_FAILURE", tmp);
76 Py_DECREF(tmp);
77 }
78
79 {
80 PyObject* tmp = PyLong_FromLong(2);
81 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "NO_SUCH_OBJECT_INSTANCE", tmp);
82 Py_DECREF(tmp);
83 }
84
85 {
86 PyObject* tmp = PyLong_FromLong(3);
87 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "RESOURCE_LIMITATION", tmp);
88 Py_DECREF(tmp);
89 }
90
91 {
92 PyObject* tmp = PyLong_FromLong(4);
93 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "REFERENCED_SOPCLASS_NOT_SUPPORTED", tmp);
94 Py_DECREF(tmp);
95 }
96
97 {
98 PyObject* tmp = PyLong_FromLong(5);
99 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "CLASS_INSTANCE_CONFLICT", tmp);
100 Py_DECREF(tmp);
101 }
102
103 {
104 PyObject* tmp = PyLong_FromLong(6);
105 PyDict_SetItemString(sdk_OrthancPluginStorageCommitmentFailureReason_Type.tp_dict, "DUPLICATE_TRANSACTION_UID", tmp);
106 Py_DECREF(tmp);
107 }
108
74 109
75 Py_INCREF(&sdk_OrthancPluginStorageCommitmentFailureReason_Type); 110 Py_INCREF(&sdk_OrthancPluginStorageCommitmentFailureReason_Type);
76 if (PyModule_AddObject(module, "StorageCommitmentFailureReason", (PyObject *)&sdk_OrthancPluginStorageCommitmentFailureReason_Type) < 0) 111 if (PyModule_AddObject(module, "StorageCommitmentFailureReason", (PyObject *)&sdk_OrthancPluginStorageCommitmentFailureReason_Type) < 0)
77 { 112 {
78 OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginStorageCommitmentFailureReason"); 113 OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginStorageCommitmentFailureReason");