1. Pypy
  2. Untitled project
  3. pypy

Commits

Philip Jenvey  committed e60a94e

minor cleanup

  • Participants
  • Parent commits 6a1045e
  • Branches refactor-buffer-api

Comments (0)

Files changed (3)

File pypy/interpreter/baseobjspace.py

View file
         return None
 
     def buffer_w(self, space):
-        from pypy.module.__builtin__.interp_memoryview import W_Buffer
         w_impl = space.lookup(self, '__buffer__')
         if w_impl is not None:
             w_result = space.get_and_call_function(w_impl, self)
+            from pypy.module.__builtin__.interp_memoryview import W_Buffer
             if isinstance(w_result, W_Buffer):
                 return w_result.buf
         self._typed_unwrap_error(space, "buffer")

File pypy/module/_cffi_backend/cbuffer.py

View file
 
 class MiniBuffer(W_Buffer):
     def __init__(self, buffer, keepalive=None):
-        W_Buffer. __init__(self, buffer)
+        W_Buffer.__init__(self, buffer)
         self.keepalive = keepalive
 
 MiniBuffer.typedef = TypeDef(

File pypy/module/cpyext/bufferobject.py

View file
 from pypy.module.cpyext.pyobject import make_typedescr, Py_DecRef, make_ref
 from pypy.interpreter.buffer import StringBuffer, SubBuffer
 from pypy.interpreter.error import OperationError
+from pypy.module.__builtin__.interp_memoryview import W_Buffer
 from pypy.module.array.interp_array import ArrayBuffer
-from pypy.module.__builtin__.interp_memoryview import W_Buffer
 
 
 PyBufferObjectStruct = lltype.ForwardReference()