diff Objects/typeobject.c @ 27821:b804ee5beb49 legacy-trunk

Fix from SF #681367: inherit tp_as_buffer. This only applies to C types -- Python types already inherited this.
author Guido van Rossum <guido@python.org>
date Tue, 11 Feb 2003 20:39:59 +0000
parents 48dc4a59a50e
children 6b5696541ba4
line wrap: on
line diff
--- a/Objects/typeobject.c	Tue Feb 11 20:05:50 2003 +0000
+++ b/Objects/typeobject.c	Tue Feb 11 20:39:59 2003 +0000
@@ -2915,6 +2915,8 @@
 			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 */