Message330931
The repr of the ctypes.CArgObject instance will fail when the value is a non-ascii character.
The code is:
sprintf(buffer, "<cparam '%c' (%c)>",
self->tag, self->value.c);
...
return PyUnicode_FromString(buffer);
If self->value.c is out of range 0-127, buffer will contain a string not decodable with UTF-8.
There is a similar problem with non-ascii self->tag.
The following PR is purposed to fix this, but I don't know how to test it. Current tests only create CArgObject instances with tag='P' (in byref()). |
|
Date |
User |
Action |
Args |
2018-12-03 10:52:28 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, amaury.forgeotdarc, belopolsky, meador.inge |
2018-12-03 10:52:28 | serhiy.storchaka | set | messageid: <1543834348.49.0.788709270274.issue35384@psf.upfronthosting.co.za> |
2018-12-03 10:52:28 | serhiy.storchaka | link | issue35384 messages |
2018-12-03 10:52:28 | serhiy.storchaka | create | |
|