view CodeAnalysis/ClassMethods.mustache @ 152:a6b4e0abe532 cmove2

fix leaking of MoveDriver
author Alain Mazy <am@osimis.io>
date Thu, 29 Feb 2024 11:31:47 +0100
parents f79f5450ad7f
children 55473de7694f
line wrap: on
line source

// 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}}