Are you sure that the GncOwner* isn't a /return value/?
ISTR that many cases of GncOwner* were used so the caller could /set/ the
owner?
But it's been 20 years since I wrote that code.
-derek
On Sun, January 29, 2023 2:06 pm, john wrote:
> Yes, it does look like the in type map ignores the out ty
Partially answering my own question.
It doesn't look like the GncOwner out typemap is quite right.
The return should be an object of type Customer, Job, Employee or
Vendor as suggested by the decorate at gnucash_business.py:176.
I wrote a function in my script based on that decorate that convert
Yes, it does look like the in type map ignores the out typemap's tuple and
tries to convert it into a pointer. That won't work. It should be something like
if (! PyTuple_Ceck($input))
return NULL;
GncOwnerType type = (GncOwnerType)PyLong_asLong(PyTuple_GetItem($input, 0));
PyObject* py_inst
I get a Python GncOwner object returned to Python. It appears well
formed.
owner:
owner_instance: (4, )
It's not clear how to easily inspect the Swig object.
However, the object doesn't convert back to C. It's not recognized as
GncVendor.
I get:
ValueError: Python object passed to functio