[pypy-issue] [issue858] Can't create a ctypes pointer to a bool:

Alex Gaynor tracker at bugs.pypy.org
Sat Sep 3 05:16:19 CEST 2011


New submission from Alex Gaynor <alex.gaynor at gmail.com>:

>>>> import ctypes
>>>> ctypes.c_bool
<class 'ctypes.c_bool'>
>>>> ctypes.POINTER(ctypes.c_bool)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/alex/projects/pypy/lib_pypy/_ctypes/pointer.py", line 179, in 
POINTER
    {'_type_': cls})
  File "/home/alex/projects/pypy/lib_pypy/_ctypes/pointer.py", line 31, in 
__new__
    self.set_type(obj, typedict['_type_'])
  File "/home/alex/projects/pypy/lib_pypy/_ctypes/pointer.py", line 70, in 
set_type
    self._ffiargtype = _ffi.types.Pointer(TP.get_ffi_argtype())
  File "/home/alex/projects/pypy/lib_pypy/_ctypes/basics.py", line 57, in 
get_ffi_argtype
    self._ffiargtype = _shape_to_ffi_type(self._ffiargshape)
  File "/home/alex/projects/pypy/lib_pypy/_ctypes/basics.py", line 204, in 
_shape_to_ffi_type
    assert False, 'unknown shape %s' % (shape,)
AssertionError: unknown shape ?

----------
messages: 3069
nosy: agaynor, pypy-issue
priority: bug
status: unread
title: Can't create a ctypes pointer to a bool:

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue858>
________________________________________


More information about the pypy-issue mailing list