libredwg
libredwg copied to clipboard
the python binds with output params is difficulty to use
in dwg.i ,
etc:
EXPORT bool dwg_dynapi_header_utf8text (const Dwg_Data *restrict dwg,
const char *restrict fieldname,
char **restrict textp, int *isnew,
Dwg_DYNAPI_field *restrict fp);
the output params is textp, isnew, fp, in LibreDWG.py
def dwg_dynapi_common_utf8text(_obj, fieldname, textp, isnew, fp):
return _LibreDWG.dwg_dynapi_common_utf8text(_obj, fieldname, textp, isnew, fp)
I cannot call this function success, always get error
TypeError: in method 'dwg_dynapi_entity_utf8text', argument 4 of type 'char **'
I found this https://stackoverflow.com/questions/15185010/how-to-receive-reference-and-pointer-arguments-in-python-swig , it seem need some modify in dwg.i.
But I am not familiar with SWIG