Browse Source

Fix regression that stopped buffer protocol from working

rdb 9 years ago
parent
commit
33c6e21352
1 changed files with 2 additions and 1 deletions
  1. 2 1
      dtool/src/interrogate/typeManager.cxx

+ 2 - 1
dtool/src/interrogate/typeManager.cxx

@@ -1740,7 +1740,8 @@ is_Py_buffer(CPPType *type) {
 
   case CPPDeclaration::ST_extension:
   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:
     return is_Py_buffer(type->as_typedef_type()->_type);