pleiszenburg / zugbruecke

Calling routines in Windows DLLs from Python scripts running under Linux, MacOS or BSD
https://zugbruecke.readthedocs.io/en/latest/
GNU Lesser General Public License v2.1
108 stars 11 forks source link

ctypes handles byte objects as string buffers without argtypes configuration #91

Open s-m-e opened 1 year ago

s-m-e commented 1 year ago

Found while exploring #90. Usually, ctypes assumes c_int for arguments and return type if no directives via argtypes and/or restype are given, but somehow this also works for passing bytes objects in places where string buffers are usually expected. Not sure if it makes sense to allow this edge case without making the argument handling overly complicated.