Mercurial > hg > orthanc-python
comparison Sources/Autogenerated/sdk_OrthancPluginJob.methods.h @ 129:5643e97d9367 fix-leak
reproducible code generation
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 30 Aug 2023 11:40:22 +0200 |
parents | |
children | 6288b8132659 |
comparison
equal
deleted
inserted
replaced
128:5b59ebc267e1 | 129:5643e97d9367 |
---|---|
1 // Actual implementation of the methods | |
2 static PyObject *sdk_OrthancPluginJob_OrthancPluginSubmitJob( | |
3 sdk_OrthancPluginJob_Object* self, PyObject *args) | |
4 { | |
5 PythonLock::LogCall("Calling method OrthancPluginSubmitJob() on object of class OrthancPluginJob"); | |
6 | |
7 if (self->object_ == NULL) | |
8 { | |
9 PyErr_SetString(PyExc_ValueError, "Invalid object"); | |
10 return NULL; | |
11 } | |
12 | |
13 int arg0 = 0; | |
14 | |
15 if (!PyArg_ParseTuple(args, "i", &arg0)) | |
16 { | |
17 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); | |
18 return NULL; | |
19 } | |
20 OrthancPlugins::OrthancString s; | |
21 s.Assign(OrthancPluginSubmitJob(OrthancPlugins::GetGlobalContext(), self->object_, arg0)); | |
22 | |
23 if (s.GetContent() == NULL) | |
24 { | |
25 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | |
26 return NULL; | |
27 } | |
28 else | |
29 { | |
30 return PyUnicode_FromString(s.GetContent()); | |
31 } | |
32 } | |
33 |