[pypy-issue] [issue807] wrong exception with ctypes cast

Albert Zeyer tracker at bugs.pypy.org
Sat Jul 23 23:04:03 CEST 2011

New submission from Albert Zeyer <albzey at gmail.com>:


import ctypes
__dummy_b = ctypes.c_uint(0)
__dummy_b = ctypes.cast(ctypes.c_void_p(ctypes.cast(__dummy_b, 
ctypes.c_void_p).value), ctypes.POINTER(ctypes.c_char))

Expected exception (what I get with CPython 2.7.1):
ArgumentError: argument 1: <type 'exceptions.TypeError'>: wrong type

Exception in PyPy 1.5:
AttributeError: 'int' object has no attribute 'value'

messages: 2848
nosy: albert, pypy-issue
priority: bug
release: 1.5
status: unread
title: wrong exception with ctypes cast

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list