mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Fix from SF #681367: inherit tp_as_buffer. This only applies to C
types -- Python types already inherited this.
This commit is contained in:
parent
6c7438e784
commit
eea4718e81
2 changed files with 6 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue