comparison CodeAnalysis/FunctionBody.mustache @ 172:8382c7dea471 java-code-model

created CodeAnalysis/GenerateOrthancSDK.py
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Jun 2024 17:47:05 +0200
parents e7ff5efb100d
children f49864df6f1f
comparison
equal deleted inserted replaced
171:c8de83fe7faa 172:8382c7dea471
7 { 7 {
8 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments ({{count_args}} arguments expected)"); 8 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments ({{count_args}} arguments expected)");
9 return NULL; 9 return NULL;
10 } 10 }
11 {{/has_args}} 11 {{/has_args}}
12 {{#args}}{{#check_object_type}}
13 if ({{name}} != Py_None && Py_TYPE({{name}}) != Get{{check_object_type}}Type())
14 {
15 PyErr_SetString(PyExc_TypeError, "Invalid orthanc.{{check_object_type}} object");
16 return NULL;
17 }
18 {{/check_object_type}}{{/args}}
12 {{#return_long}} 19 {{#return_long}}
13 long value = {{c_function}}(OrthancPlugins::GetGlobalContext(){{self}}{{call_args}}); 20 long value = {{c_function}}(OrthancPlugins::GetGlobalContext(){{self}}{{call_args}});
14 {{#args}}{{release}}{{/args}} 21 {{#args}}{{release}}{{/args}}
15 return PyLong_FromLong(value); 22 return PyLong_FromLong(value);
16 {{/return_long}} 23 {{/return_long}}