comparison CodeAnalysis/Class.mustache @ 193:66cd20e970d8 java-code-model

simplification for custom methods
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Jul 2024 18:37:04 +0200
parents 55473de7694f
children 3678a028f1f6
comparison
equal deleted inserted replaced
192:b0f096d2339e 193:66cd20e970d8
30 // End of forward declarations 30 // End of forward declarations
31 31
32 32
33 // Forward declaration of the custom methods 33 // Forward declaration of the custom methods
34 {{#custom_methods}} 34 {{#custom_methods}}
35 extern PyObject *{{implementation}}( 35 extern PyObject *{{implementation}}(sdk_{{class_name}}_Object* self, PyObject *args);
36 sdk_{{class_name}}_Object* self, PyObject *args);
37 {{/custom_methods}} 36 {{/custom_methods}}
38 // End of forward declarations 37 // End of forward declarations
39 38
40 39
41 static PyMethodDef sdk_{{class_name}}_Methods[] = { 40 static PyMethodDef sdk_{{class_name}}_Methods[] = {
45 "Generated from C function {{c_function}}()" }, 44 "Generated from C function {{c_function}}()" },
46 {{/methods}} 45 {{/methods}}
47 {{#custom_methods}} 46 {{#custom_methods}}
48 { "{{short_name}}", 47 { "{{short_name}}",
49 (PyCFunction) {{implementation}}, METH_VARARGS, 48 (PyCFunction) {{implementation}}, METH_VARARGS,
50 "Generated from C function {{sdk_function}}()" }, 49 "Implemented in C++ function {{implementation}}()" },
51 {{/custom_methods}} 50 {{/custom_methods}}
52 { NULL } /* Sentinel */ 51 { NULL } /* Sentinel */
53 }; 52 };
54 53
55 54