Message168773
The example script has two errors IMO:
- XOpenDisplay accepts a char*, but display_url is certainly a unicode string; it should be converted to a bytes string::
xlib.XOpenDisplay(display_url.encode('utf-8'))
- XOpenDisplay.restype is not set, so it will be coerced to a C int (and truncated in the case of a 64bit pointer)
I strongly suggest to set .argtypes and .restype, to ensure proper type check and conversion. |
|
Date |
User |
Action |
Args |
2012-08-21 14:16:39 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, belopolsky, pitrou, meador.inge, albertomilone |
2012-08-21 14:16:39 | amaury.forgeotdarc | set | messageid: <1345558599.59.0.822374489851.issue15637@psf.upfronthosting.co.za> |
2012-08-21 14:16:39 | amaury.forgeotdarc | link | issue15637 messages |
2012-08-21 14:16:38 | amaury.forgeotdarc | create | |
|