static PyObject *field_dopywrap(PyTypeObject *ty, field *f)
{
- field_pyobj *fobj = newtype(ty, 0);
+ field_pyobj *fobj = newtype(ty, 0, f->ops->name);
fobj->f = f;
- fobj->ty.tp_name = (/*unconst*/ char *)f->ops->name;
- fobj->ty.tp_basicsize = sizeof(fe_pyobj);
- fobj->ty.tp_base = fe_pytype;
+ fobj->ty.type.tp_basicsize = sizeof(fe_pyobj);
+ fobj->ty.type.tp_base = fe_pytype;
Py_INCREF(fe_pytype);
- fobj->ty.tp_flags = (Py_TPFLAGS_DEFAULT |
- Py_TPFLAGS_BASETYPE |
- Py_TPFLAGS_CHECKTYPES |
- Py_TPFLAGS_HEAPTYPE);
- fobj->ty.tp_alloc = PyType_GenericAlloc;
- fobj->ty.tp_free = _PyObject_Del;
- fobj->ty.tp_new = fe_pynew;
- PyType_Ready(&fobj->ty);
+ 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);
return ((PyObject *)fobj);
}
{
Py_DECREF(FE_FOBJ(me));
MP_DROP(FE_X(me));
- PyObject_DEL(me);
+ FREEOBJ(me);
}
#define UNOP(name, check) \
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
abstract_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
abstract_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
primefield_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
niceprimefield_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
abstract_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
binpolyfield_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
binnormfield_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};