Author: Matti Picus <[email protected]>
Branch: py3.5
Changeset: r89318:7096ceaddf76
Date: 2017-01-02 21:48 +0200
http://bitbucket.org/pypy/pypy/changeset/7096ceaddf76/
Log: remove file
on pypy2 implements PyObject_CheckBuffer which is a C macro in
abstract.h, CBuffer is not now used and it seems at some point the
file was rewritten but not renamed
diff --git a/pypy/module/cpyext/buffer.py b/pypy/module/cpyext/buffer.py
deleted file mode 100644
--- a/pypy/module/cpyext/buffer.py
+++ /dev/null
@@ -1,28 +0,0 @@
-from rpython.rtyper.lltypesystem import rffi
-from rpython.rlib import buffer
-from pypy.module.cpyext.api import (
- cpython_api, CANNOT_FAIL)
-from pypy.module.cpyext.pyobject import PyObject, Py_DecRef
-
-class CBuffer(buffer.Buffer):
-
- _immutable_ = True
-
- def __init__(self, space, c_buf, c_len, c_obj):
- self.space = space
- self.c_buf = c_buf
- self.c_len = c_len
- self.c_obj = c_obj
-
- def __del__(self):
- Py_DecRef(self.space, self.c_obj)
-
- def getlength(self):
- return self.c_len
-
- def getitem(self, index):
- return self.c_buf[index]
-
- def as_str(self):
- return rffi.charpsize2str(rffi.cast(rffi.CCHARP, self.c_buf),
- self.c_len)
diff --git a/pypy/module/cpyext/memoryobject.py
b/pypy/module/cpyext/memoryobject.py
--- a/pypy/module/cpyext/memoryobject.py
+++ b/pypy/module/cpyext/memoryobject.py
@@ -11,7 +11,6 @@
from pypy.objspace.std.memoryobject import W_MemoryView
from pypy.module.cpyext.object import _dealloc
from pypy.module.cpyext.import_ import PyImport_Import
-from pypy.module.cpyext.buffer import CBuffer
PyMemoryView_Check, PyMemoryView_CheckExact = build_type_checkers("MemoryView")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit