/*----- Data structures ---------------------------------------------------*/
-static PyTypeObject atom_pytype;
-
typedef struct entry {
assoc_base _b;
PyObject *a;
static long atom_pyhash(PyObject *me)
{ long h = ATOM_HASH(ATOM_A(me)); if (h == -1) h = -2; return (h); }
-static PyTypeObject atom_pytype = {
+PyTypeObject atom_pytype = {
PyObject_HEAD_INIT(0) 0, /* Header */
"atom.Atom", /* @tp_name@ */
sizeof(atom_pyobj), /* @tp_basicsize@ */
0 /* @tp_is_gc@ */
};
-PyObject *atom_pystartup(void)
-{
- assoc_create(&obarray);
- PyType_Ready(&atom_pytype);
- return ((PyObject *)&atom_pytype);
-}
+void atom_pysetup(void)
+ { assoc_create(&obarray); PyType_Ready(&atom_pytype); }
/*----- That's all, folks -------------------------------------------------*/