[PyPy-issue] [issue616] ctypes: 'c_long' object is not iterable

Stephan Hadinger pypy-dev-issue at codespeak.net
Mon Dec 27 09:51:52 CET 2010


New submission from Stephan Hadinger <stephan.hadinger at orange-ftgroup.com>:

Problem when applying hexlify on c_int:

>>>> import binascii
>>>> import ctypes
>>>> i = ctypes.c_int(0x12345678)
>>>> binascii.hexlify(i)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "c:\Pypy14\lib_pypy\binascii.py", line 665, in b2a_hex
    for char in s:
TypeError: 'c_long' object is not iterable


Whereas in Python 2.5/2.6 this works:

>>> import binascii
>>> import ctypes
>>> i = ctypes.c_int(0x12345678)
>>> binascii.hexlify(i)
'78563412'
>>>

----------
effort: ???
messages: 2038
nosy: pypy-issue, shadinger
priority: bug
release: 1.4
status: unread
title: ctypes: 'c_long' object is not iterable

_______________________________________________________
PyPy development tracker <pypy-dev-issue at codespeak.net>
<https://codespeak.net/issue/pypy-dev/issue616>
_______________________________________________________



More information about the Pypy-issue mailing list