Author: Manuel Jacob Branch: refactor-buffer-api Changeset: r66458:568267eb017a Date: 2013-08-30 13:01 +0100 http://bitbucket.org/pypy/pypy/changeset/568267eb017a/
Log: Fix. diff --git a/pypy/module/cpyext/slotdefs.py b/pypy/module/cpyext/slotdefs.py --- a/pypy/module/cpyext/slotdefs.py +++ b/pypy/module/cpyext/slotdefs.py @@ -14,8 +14,9 @@ from pypy.module.cpyext.pyobject import from_ref from pypy.module.cpyext.pyerrors import PyErr_Occurred from pypy.module.cpyext.state import State +from pypy.module.__builtin__.interp_memoryview import W_Buffer from pypy.interpreter.error import OperationError, operationerrfmt -from pypy.interpreter.buffer import Buffer as W_Buffer +from pypy.interpreter.buffer import Buffer from pypy.interpreter.argument import Arguments from rpython.rlib.unroll import unrolling_iterable from rpython.rlib.objectmodel import specialize @@ -228,7 +229,7 @@ check_num_args(space, w_args, 0) return space.wrap(generic_cpy_call(space, func_target, w_self)) -class CPyBuffer(W_Buffer): +class CPyBuffer(Buffer): # Similar to Py_buffer def __init__(self, ptr, size, w_obj): @@ -249,7 +250,7 @@ size = generic_cpy_call(space, func_target, w_self, index, ptr) if size < 0: space.fromcache(State).check_and_raise_exception(always=True) - return space.wrap(CPyBuffer(ptr[0], size, w_self)) + return W_Buffer(CPyBuffer(ptr[0], size, w_self)) def get_richcmp_func(OP_CONST): def inner(space, w_self, w_args, func): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit