[pypy-commit] pypy cffi-1.0: NonConstant is not actually needed here (rffi.cast() is enough) and
arigo
noreply at buildbot.pypy.org
Fri May 8 19:05:21 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: cffi-1.0
Changeset: r77233:31adb4a02ab8
Date: 2015-05-08 19:05 +0200
http://bitbucket.org/pypy/pypy/changeset/31adb4a02ab8/
Log: NonConstant is not actually needed here (rffi.cast() is enough) and
it fails the non-translated tests...
diff --git a/pypy/module/_cffi_backend/ffi_obj.py b/pypy/module/_cffi_backend/ffi_obj.py
--- a/pypy/module/_cffi_backend/ffi_obj.py
+++ b/pypy/module/_cffi_backend/ffi_obj.py
@@ -2,7 +2,7 @@
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.typedef import TypeDef, GetSetProperty, ClassAttr
from pypy.interpreter.gateway import interp2app, unwrap_spec, WrappedDefault
-from rpython.rlib import jit, rgc, nonconst
+from rpython.rlib import jit, rgc
from rpython.rtyper.lltypesystem import rffi
from pypy.module._cffi_backend import parse_c_type, realize_c_type
@@ -340,7 +340,7 @@
def W_FFIObject___new__(space, w_subtype, __args__):
r = space.allocate_instance(W_FFIObject, w_subtype)
# get in 'src_ctx' a NULL which transaction doesn't consider a constant
- src_ctx = rffi.cast(parse_c_type.PCTX, nonconst.NonConstant(0))
+ src_ctx = rffi.cast(parse_c_type.PCTX, 0)
r.__init__(space, src_ctx)
return space.wrap(r)
More information about the pypy-commit
mailing list