5 * (c) 2019 Straylight/Edgeware
8 /*----- Licensing notice --------------------------------------------------*
10 * This file is part of the Python interface to mLib.
12 * mLib/Python is free software: you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
17 * mLib/Python is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with mLib/Python. If not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
28 /*----- Header files ------------------------------------------------------*/
30 #include "mLib-python.h"
32 /*----- Main code ---------------------------------------------------------*/
34 static PyObject *meth__ready(PyObject *me, PyObject *arg)
38 if (!PyArg_ParseTuple(arg, "O!:_ready", &PyModule_Type, &mod))
40 Py_XDECREF(home_module); home_module = mod; Py_INCREF(home_module);
41 if (ui_pyready()) goto end;
47 static const PyMethodDef methods[] = {
48 #define METHNAME(name) meth_##name
55 static PyModuleDef moddef = {
56 PyModuleDef_HEAD_INIT,
57 "mLib._base", /* @m_name@ */
58 "Low-level module for mLib bindings. Use `mLib' instead.",
69 EXPORT PyMODINIT_FUNC PY23(init_base, PyInit__base)(void)
73 modname = TEXT_FROMSTR("mLib");
77 moddef.m_methods = donemethods();
78 mod = PyModule_Create(&moddef);
80 mod = Py_InitModule("mLib._base", donemethods());
88 /*----- That's all, folks -------------------------------------------------*/