Author: Armin Rigo <[email protected]> Branch: cffi-handle-lifetime Changeset: r80144:10debcf2b5c5 Date: 2015-10-12 18:16 +0100 http://bitbucket.org/pypy/pypy/changeset/10debcf2b5c5/
Log: jit translation fix diff --git a/pypy/module/_cffi_backend/ccallback.py b/pypy/module/_cffi_backend/ccallback.py --- a/pypy/module/_cffi_backend/ccallback.py +++ b/pypy/module/_cffi_backend/ccallback.py @@ -19,6 +19,7 @@ # ____________________________________________________________ [email protected]_look_inside def make_callback(space, ctype, w_callable, w_error, w_onerror): # Allocate a callback as a nonmovable W_CDataCallback instance, which # we can cast to a plain VOIDP. As long as the object is not freed, diff --git a/pypy/module/_cffi_backend/handle.py b/pypy/module/_cffi_backend/handle.py --- a/pypy/module/_cffi_backend/handle.py +++ b/pypy/module/_cffi_backend/handle.py @@ -38,9 +38,12 @@ "expected a 'cdata' object with a 'void *' out of " "new_handle(), got '%s'", ctype.name) with w_cdata as ptr: - addr = rffi.cast(llmemory.Address, ptr) - gcref = rgc.reveal_gcref(addr) - # + return _reveal(space, ptr) + [email protected]_look_inside +def _reveal(space, ptr): + addr = rffi.cast(llmemory.Address, ptr) + gcref = rgc.reveal_gcref(addr) if not gcref: raise oefmt(space.w_RuntimeError, "cannot use from_handle() on NULL pointer") _______________________________________________ pypy-commit mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-commit
