Author: Armin Rigo <ar...@tunes.org> Branch: cpyext-gc-support-2 Changeset: r82120:0016cf6f514f Date: 2016-02-09 09:28 +0100 http://bitbucket.org/pypy/pypy/changeset/0016cf6f514f/
Log: imports, and "oops" diff --git a/pypy/module/cpyext/api.py b/pypy/module/cpyext/api.py --- a/pypy/module/cpyext/api.py +++ b/pypy/module/cpyext/api.py @@ -617,6 +617,7 @@ @specialize.ll() def wrapper(*args): from pypy.module.cpyext.pyobject import make_ref, from_ref, is_pyobj + from pypy.module.cpyext.pyobject import as_pyobj # we hope that malloc removal removes the newtuple() that is # inserted exactly here by the varargs specializer if gil_acquire: @@ -671,7 +672,7 @@ if is_pyobj(result): retval = result else: - if result is None: + if result is not None: if callable.api_func.result_borrowed: retval = as_pyobj(space, result) else: @@ -1262,7 +1263,8 @@ @specialize.memo() def make_generic_cpy_call(FT, expect_null): from pypy.module.cpyext.pyobject import make_ref, from_ref, Py_DecRef - from pypy.module.cpyext.pyobject import RefcountState + from pypy.module.cpyext.pyobject import is_pyobj, as_pyobj + from pypy.module.cpyext.pyobject import get_w_obj_and_decref from pypy.module.cpyext.pyerrors import PyErr_Occurred unrolling_arg_types = unrolling_iterable(enumerate(FT.ARGS)) RESULT_TYPE = FT.RESULT _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit