New issue 2625: Ctypes cast does not work on string like objects

Mihnea Saracin:

Running on PyPy, the attached script gives the following traceback, but on 
Cpython everything works fine.

  File "", line 20, in <module>
    s = cast(data, ptr)[0]
 line 501, in cast
    return _cast_addr(obj, obj, typ)
 line 148, in _cast_addr
    % (type(obj),))
TypeError: cast() argument 1 must be a pointer, not <type 'str'>
 This script is part of ctypes/test/ lines 196-220.

pypy-issue mailing list

Reply via email to