X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/fbc145f3a0f8cd119f7f9a9999eecbea0bb20dd4..24b3d57bcf320d9d7a90a40d5f6176b1f087ab3e:/field.c?ds=inline diff --git a/field.c b/field.c index d0ab05d..9f51f5f 100644 --- 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); }