Fix regression that stopped buffer protocol from working

This commit is contained in:
rdb 2016-08-09 01:45:26 +02:00
parent 29ea65bb3f
commit 33c6e21352

View File

@ -1740,7 +1740,8 @@ is_Py_buffer(CPPType *type) {
case CPPDeclaration::ST_extension: case CPPDeclaration::ST_extension:
case CPPDeclaration::ST_struct: case CPPDeclaration::ST_struct:
return (type->get_local_name(&parser) == "Py_buffer"); return (type->get_local_name(&parser) == "Py_buffer" ||
type->get_local_name(&parser) == "bufferinfo");
case CPPDeclaration::ST_typedef: case CPPDeclaration::ST_typedef:
return is_Py_buffer(type->as_typedef_type()->_type); return is_Py_buffer(type->as_typedef_type()->_type);