Mercurial > hg > orthanc-python
comparison Sources/Autogenerated/sdk_OrthancPluginFindAnswers.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 | e9be3c9294d4 |
comparison
equal
deleted
inserted
replaced
128:5b59ebc267e1 | 129:5643e97d9367 |
---|---|
1 // Actual implementation of the methods | |
2 static PyObject *sdk_OrthancPluginFindAnswers_OrthancPluginFindAddAnswer( | |
3 sdk_OrthancPluginFindAnswers_Object* self, PyObject *args) | |
4 { | |
5 PythonLock::LogCall("Calling method OrthancPluginFindAddAnswer() on object of class OrthancPluginFindAnswers"); | |
6 | |
7 if (self->object_ == NULL) | |
8 { | |
9 PyErr_SetString(PyExc_ValueError, "Invalid object"); | |
10 return NULL; | |
11 } | |
12 | |
13 Py_buffer arg0; | |
14 | |
15 if (!PyArg_ParseTuple(args, "s*", &arg0)) | |
16 { | |
17 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); | |
18 return NULL; | |
19 } | |
20 OrthancPluginErrorCode code = OrthancPluginFindAddAnswer(OrthancPlugins::GetGlobalContext(), self->object_, arg0.buf, arg0.len); | |
21 PyBuffer_Release(&arg0); | |
22 | |
23 if (code == OrthancPluginErrorCode_Success) | |
24 { | |
25 Py_INCREF(Py_None); | |
26 return Py_None; | |
27 } | |
28 else | |
29 { | |
30 PythonLock::RaiseException(code); | |
31 return NULL; | |
32 } | |
33 } | |
34 | |
35 static PyObject *sdk_OrthancPluginFindAnswers_OrthancPluginFindMarkIncomplete( | |
36 sdk_OrthancPluginFindAnswers_Object* self, PyObject *args) | |
37 { | |
38 PythonLock::LogCall("Calling method OrthancPluginFindMarkIncomplete() on object of class OrthancPluginFindAnswers"); | |
39 | |
40 if (self->object_ == NULL) | |
41 { | |
42 PyErr_SetString(PyExc_ValueError, "Invalid object"); | |
43 return NULL; | |
44 } | |
45 | |
46 | |
47 OrthancPluginErrorCode code = OrthancPluginFindMarkIncomplete(OrthancPlugins::GetGlobalContext(), self->object_); | |
48 | |
49 | |
50 if (code == OrthancPluginErrorCode_Success) | |
51 { | |
52 Py_INCREF(Py_None); | |
53 return Py_None; | |
54 } | |
55 else | |
56 { | |
57 PythonLock::RaiseException(code); | |
58 return NULL; | |
59 } | |
60 } | |
61 |