123456789101112131415161718192021222324252627282930313233 |
- #include "cturmit.h"
-
- PyMODINIT_FUNC
- PyInit_cturmit(void)
- {
- PyObject* m;
-
- CTurmitType.tp_new = PyType_GenericNew;
- if (PyType_Ready(&CTurmitType) < 0)
- return NULL;
-
- m = PyModule_Create(&cturmitmodule);
- if (m == NULL)
- return NULL;
-
- Py_INCREF(&CTurmitType);
- PyModule_AddObject(m, "CTurmit", (PyObject *)&CTurmitType);
- return m;
- }
-
- void
- CTurmit_dealloc(CTurmit *self)
- {
- Py_TYPE(self)->tp_free((PyObject*)self);
- }
-
- Py_ssize_t
- CTurmit_len(CTurmit *self)
- {
- return self->len;
- }
-
|