X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib-python/blobdiff_plain/20bce5e92b01cd928f26b61be78215117039c561..579d01693c86259110fe7a2c2a6f005f1bdbad5b:/atom-base.c diff --git a/atom-base.c b/atom-base.c index 44b915b..e59fa2b 100644 --- a/atom-base.c +++ b/atom-base.c @@ -39,8 +39,6 @@ /*----- Data structures ---------------------------------------------------*/ -static PyTypeObject atom_pytype; - typedef struct entry { assoc_base _b; PyObject *a; @@ -156,7 +154,7 @@ done: 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@ */ @@ -203,11 +201,7 @@ static PyTypeObject atom_pytype = { 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 -------------------------------------------------*/