On 26 March 2011 12:55, OJ <olej...@gmail.com> wrote:
>> 1. Use c_char_p instead of POINTER(c_char).
>> 2. Use msg.value to obtain a Python string from the pointer.
>>
>
> If I change to c_char_p, my program segfaults.
>
> If I use msg.value, I get this error message:
> Traceback (most recent call last):
> File "_ctypes/callbacks.c", line 295, in 'calling callback function'
> File "./core.py", line 54, in DebugMessage
> print lvl, msg.value
> AttributeError: 'LP_c_char' object has no attribute 'value'
>
--
http://mail.python.org/mailman/listinfo/python-list