[pypy-commit] pypy issue2444: fix hack from f66ee40b4bc5
mattip
pypy.commits at gmail.com
Mon Dec 26 13:32:48 EST 2016
Author: Matti Picus <matti.picus at gmail.com>
Branch: issue2444
Changeset: r89237:978a8d3f3300
Date: 2016-12-26 20:17 +0200
http://bitbucket.org/pypy/pypy/changeset/978a8d3f3300/
Log: fix hack from f66ee40b4bc5
diff --git a/rpython/rlib/buffer.py b/rpython/rlib/buffer.py
--- a/rpython/rlib/buffer.py
+++ b/rpython/rlib/buffer.py
@@ -6,7 +6,6 @@
class Buffer(object):
"""Abstract base class for buffers."""
- __slots__ = ['readonly']
_immutable_ = True
def getlength(self):
@@ -79,7 +78,7 @@
pass
class StringBuffer(Buffer):
- __slots__ = ['value']
+ __slots__ = ['readonly', 'value']
_immutable_ = True
def __init__(self, value):
@@ -110,7 +109,7 @@
class SubBuffer(Buffer):
- __slots__ = ['buffer', 'offset', 'size']
+ __slots__ = ['buffer', 'offset', 'size', 'readonly']
_immutable_ = True
def __init__(self, buffer, offset, size):
diff --git a/rpython/rlib/rgc.py b/rpython/rlib/rgc.py
--- a/rpython/rlib/rgc.py
+++ b/rpython/rlib/rgc.py
@@ -450,7 +450,6 @@
"the object must have a __dict__" % (obj,))
assert (not hasattr(obj, '__slots__') or
type(obj).__slots__ == () or
- type(obj).__slots__ == ['readonly'] or
type(obj).__slots__ == ('__weakref__',)), (
"%r: to run register_finalizer() untranslated, "
"the object must not have __slots__" % (obj,))
More information about the pypy-commit
mailing list