General: Update for Python 2.5.
[catacomb-python] / field.c
diff --git a/field.c b/field.c
index d0ab05d..9f51f5f 100644 (file)
--- a/field.c
+++ b/field.c
@@ -58,17 +58,17 @@ static PyObject *field_dopywrap(PyTypeObject *ty, field *f)
 {
   field_pyobj *fobj = newtype(ty, 0, f->ops->name);
   fobj->f = f;
-  fobj->ty.type.tp_basicsize = sizeof(fe_pyobj);
-  fobj->ty.type.tp_base = fe_pytype;
+  fobj->ty.ht_type.tp_basicsize = sizeof(fe_pyobj);
+  fobj->ty.ht_type.tp_base = fe_pytype;
   Py_INCREF(fe_pytype);
-  fobj->ty.type.tp_flags = (Py_TPFLAGS_DEFAULT |
-                           Py_TPFLAGS_BASETYPE |
-                           Py_TPFLAGS_CHECKTYPES |
-                           Py_TPFLAGS_HEAPTYPE);
-  fobj->ty.type.tp_alloc = PyType_GenericAlloc;
-  fobj->ty.type.tp_free = 0;
-  fobj->ty.type.tp_new = fe_pynew;
-  PyType_Ready(&fobj->ty.type);
+  fobj->ty.ht_type.tp_flags = (Py_TPFLAGS_DEFAULT |
+                              Py_TPFLAGS_BASETYPE |
+                              Py_TPFLAGS_CHECKTYPES |
+                              Py_TPFLAGS_HEAPTYPE);
+  fobj->ty.ht_type.tp_alloc = PyType_GenericAlloc;
+  fobj->ty.ht_type.tp_free = 0;
+  fobj->ty.ht_type.tp_new = fe_pynew;
+  PyType_Ready(&fobj->ty.ht_type);
   return ((PyObject *)fobj);
 }