changeset 139:f79f5450ad7f

added missing file: CodeAnalysis/ClassMethods.mustache
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 15 Sep 2023 08:42:12 +0200
parents 3e89d1c4f721
children b6835b7a7c0a
files CodeAnalysis/ClassMethods.mustache
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CodeAnalysis/ClassMethods.mustache	Fri Sep 15 08:42:12 2023 +0200
@@ -0,0 +1,17 @@
+// Actual implementation of the methods
+{{#methods}}
+static PyObject *sdk_{{class_name}}_{{c_function}}(
+  sdk_{{class_name}}_Object* self, PyObject *args)
+{
+  PythonLock::LogCall("Calling method {{c_function}}() on object of class {{class_name}}");
+
+  if (self->object_ == NULL)
+  {
+    PyErr_SetString(PyExc_ValueError, "Invalid object");
+    return NULL;
+  }
+
+{{> function_body}}
+}
+
+{{/methods}}