Passing bytes to a service DATA arg seems to send garbage, at least in front of the real DATA.
Passing bytearray straight throws an OOM error, event when passing just a few bytes.
It appears that the python wrapper uses the wrong python C-API to pass DATA to igs_service_args_add_data resulting in conversion error or wrong memory block passed to ingescape.
Solution: Check if passed python object is of types bytes or bytearray and use the proper APIs to convert python data object to C char*
NOTE: There is still problems with sending DATA as output.
An other PR should follow with corrections about that (related issue #67).
Passing
bytes
to a service DATA arg seems to send garbage, at least in front of the real DATA. Passingbytearray
straight throws an OOM error, event when passing just a few bytes.It appears that the python wrapper uses the wrong python C-API to pass DATA to
igs_service_args_add_data
resulting in conversion error or wrong memory block passed to ingescape.Solution: Check if passed python object is of types
bytes
orbytearray
and use the proper APIs to convert python data object to Cchar*
NOTE: There is still problems with sending DATA as output. An other PR should follow with corrections about that (related issue #67).