You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/gvanrossum'closed_at=<Date2003-02-11.20:48:39.000>created_at=<Date2003-02-06.00:23:39.000>labels= ['interpreter-core']
title='C subtypes do not inherit tp_as_buffer'updated_at=<Date2003-02-11.20:48:39.000>user='https://bugs.python.org/glchapman'
Subtypes of str (for example) implemented in C do not
inherit str's tp_as_buffer funcs unless the subtypes provide
a pointer to a tp_as_buffer structure in their type struct.
This is different from how the other method suites
(tp_as_sequence, etc.) are handled; near the end of
PyType_Ready the other method suites are copied from
the base into the subtype if the subtype's slot is NULL.
It looks like the tp_as_buffer omission is simply an
oversight, since the flag manipulations in inherit_special
appear to be preparing the way for copying the base
pointer into the subtype. So I've attached a small patch
(against the 2.3a1 version of typeobject.c) to fix this.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: