[Vala] malloc/free CCode attributes



It would be extremely helpful in developing bindings for other object systems if the glib's memory management could be overridden, ie;

  [Compact]
  [CCode (lower_case_cprefix = "PyObject_",
          ref_function = "Py_IncRef",
          ref_function_void = true,
          unref_function = "Py_DecRef",
          alloc_function = "PyObject_Malloc",
          free_function = "PyObject_Free")]

  public class Object {
...

Thoughts?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]