Commits

Jörg Rädler committed e2d15b3

changed Polygon_Check() to accept instances of subclasses

  • Participants
  • Parent commits ca0af85

Comments (0)

Files changed (1)

 staticforward PySequenceMethods Polygon_SequenceMethods;
 
 /* check if object o is a Polygon */
-#define Polygon_Check(o) ((o)->ob_type == &Polygon_Type)
+#define Polygon_Check(o) (PyObject_TypeCheck(o, &Polygon_Type))
 
 
 /* gets (cached) boundingbox or calculates and caches */