diff options
author | Guido van Rossum <guido@python.org> | 2003-02-11 20:39:59 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-02-11 20:39:59 (GMT) |
commit | eea4718e814b8ec054557aa87d6c122305bf6f0b (patch) | |
tree | 9213634b65b978c106f773693578dd4c3211813b /Objects | |
parent | 6c7438e784a0537260ed9423079e3bb5d61be8c3 (diff) | |
download | cpython-eea4718e814b8ec054557aa87d6c122305bf6f0b.zip cpython-eea4718e814b8ec054557aa87d6c122305bf6f0b.tar.gz cpython-eea4718e814b8ec054557aa87d6c122305bf6f0b.tar.bz2 |
Fix from SF #681367: inherit tp_as_buffer. This only applies to C
types -- Python types already inherited this.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 38d5956..baea55a 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -2915,6 +2915,8 @@ PyType_Ready(PyTypeObject *type) type->tp_as_sequence = base->tp_as_sequence; if (type->tp_as_mapping == NULL) type->tp_as_mapping = base->tp_as_mapping; + if (type->tp_as_buffer == NULL) + type->tp_as_buffer = base->tp_as_buffer; } /* Link into each base class's list of subclasses */ |