chiark / gitweb /
New features covered.
[mLib-python] / atom-base.c
index 44b915b0cb7c489c3aeed1c223acd2df7255f4ae..e59fa2bc8e03a6e79862251cc6ad2e68d07c6f70 100644 (file)
@@ -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 -------------------------------------------------*/