Message32107
Unfortunately your test script does not run for me (I don't have twisted installed on Linux).
I fear this is not a bug. When the .argtypes attribute for a foreign function is not set, you can pass (among others) Python strings *and* Python unicode strings to the function. The foreign function will receive a 'char *' in the former case, and a 'wchar_t *' in the latter case - the unicode string will *not* be converted.
If this is your problem, and the foreign function expects a 'char *', you have several choices:
1. You can convert the unicode string to an ascii string in the Python code yourself.
2. You can wrap the unicode string in a c_char_p instance, and ctypes will do the conversion for you.
3. You can set the correct .argtypes attribute on the function, and ctypes will do the conversion for you.
If this is not your problem, please provide a self-contained test case. |
|
Date |
User |
Action |
Args |
2007-08-23 14:54:05 | admin | link | issue1723338 messages |
2007-08-23 14:54:05 | admin | create | |
|