*.c: Use the new `Py_TYPE' and `Py_SIZE' macros; define them if necessary.
[catacomb-python] / ec.c
diff --git a/ec.c b/ec.c
index ff0cc03..0644ea5 100644 (file)
--- a/ec.c
+++ b/ec.c
@@ -106,7 +106,7 @@ int getecpt(ec_curve *c, ec *d, PyObject *p)
 {
   if (toecpt(c, d, p)) {
     PyErr_Format(PyExc_TypeError, "can't convert %.100s to ecpt",
-                p->ob_type->tp_name);
+                Py_TYPE(p)->tp_name);
     return (-1);
   }
   return (0);