Author: Antonio Cuni <anto.c...@gmail.com> Branch: cpyext-nowrapper Changeset: r92601:a4307fb5912e Date: 2017-10-04 16:03 +0200 http://bitbucket.org/pypy/pypy/changeset/a4307fb5912e/
Log: (antocuni, arigo, ronan): fix translation Directly from table mountain, cape town: https://bytebucket.org/pypy/extradoc/raw/extradoc/sprintinfo/cape- town-2017/2017-10-04-155524.jpg 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 @@ -295,6 +295,11 @@ def get_llhelper(space): return llhelper(self.functype, self.get_wrapper(space)) self.get_llhelper = get_llhelper + # + def get_raw_llhelper(): + assert self.no_gc, 'Please call get_llhelper' + return llhelper(self.functype, self.callable) + self.get_raw_llhelper = get_raw_llhelper def _freeze_(self): return True diff --git a/pypy/module/cpyext/typeobject.py b/pypy/module/cpyext/typeobject.py --- a/pypy/module/cpyext/typeobject.py +++ b/pypy/module/cpyext/typeobject.py @@ -548,7 +548,7 @@ def subtype_dealloc(obj): pto = obj.c_ob_type base = pto - this_func_ptr = ll_subtype_dealloc + this_func_ptr = subtype_dealloc.api_func.get_raw_llhelper() # This wrapper is created on a specific type, call it w_A. # We wish to call the dealloc function from one of the base classes of w_A, # the first of which is not this function itself. @@ -567,9 +567,6 @@ # hopefully this does not clash with the memory model assumed in # extension modules -# XXX -ll_subtype_dealloc = llhelper(subtype_dealloc.api_func.functype, - subtype_dealloc.api_func.callable) @slot_function([PyObject, Py_ssize_tP], lltype.Signed, error=CANNOT_FAIL) def bf_segcount(space, w_obj, ref): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit