[pypy-issue] [issue1242] lib_pypy/_ctypes/function.py accesses _rawffi.get_last_error in linux

Vincent Pelletier tracker at bugs.pypy.org
Sat Aug 25 15:00:40 CEST 2012

New submission from Vincent Pelletier <plr.vincent at gmail.com>:

When calling a C function of a library declared with
on linux (where get_last_error does not exist), pypy raises whereas cpython just 
ignores the parameter.

(libusb1 is a CDLL instance)

  File "/home/vincent/git/python-libusb1/usb1.py", line 1566, in __init__
    result = libusb1.libusb_init(byref(context_p))
  File "/home/vincent/git/ITI1480A-linux/pypy-1.9/lib_pypy/_ctypes/function.py", 
line 699, in __call__
    result = self._call_funcptr(funcptr, *args)
  File "/home/vincent/git/ITI1480A-linux/pypy-1.9/lib_pypy/_ctypes/function.py", 
line 357, in _call_funcptr
    tmp = _rawffi.get_last_error()
AttributeError: 'module' object has no attribute 'get_last_error'

messages: 4673
nosy: pypy-issue, vpelletier
priority: bug
release: 1.9
status: unread
title: lib_pypy/_ctypes/function.py accesses _rawffi.get_last_error in linux

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

More information about the pypy-issue mailing list