annotate CodeAnalysis/ClassMethods.mustache @ 185:7e8085f80df5 java-code-model

simplification
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Jul 2024 15:51:35 +0200
parents f79f5450ad7f
children 55473de7694f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
139
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 // Actual implementation of the methods
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 {{#methods}}
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 static PyObject *sdk_{{class_name}}_{{c_function}}(
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 sdk_{{class_name}}_Object* self, PyObject *args)
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 {
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 PythonLock::LogCall("Calling method {{c_function}}() on object of class {{class_name}}");
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 if (self->object_ == NULL)
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 {
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 PyErr_SetString(PyExc_ValueError, "Invalid object");
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 return NULL;
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 }
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 {{> function_body}}
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 }
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
f79f5450ad7f added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 {{/methods}}