-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
_minpackmodule.c
54 lines (48 loc) · 1.18 KB
/
_minpackmodule.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
Multipack project.
This file is generated by setmodules.py. Do not modify it.
*/
#include "minpack.h"
static PyObject *minpack_error;
#include "__minpack.h"
static struct PyMethodDef minpack_module_methods[] = {
{"_hybrd", minpack_hybrd, METH_VARARGS, doc_hybrd},
{"_hybrj", minpack_hybrj, METH_VARARGS, doc_hybrj},
{"_lmdif", minpack_lmdif, METH_VARARGS, doc_lmdif},
{"_lmder", minpack_lmder, METH_VARARGS, doc_lmder},
{"_chkder", minpack_chkder, METH_VARARGS, doc_chkder},
{NULL, NULL, 0, NULL}
};
static struct PyModuleDef moduledef = {
PyModuleDef_HEAD_INIT,
"_minpack",
NULL,
-1,
minpack_module_methods,
NULL,
NULL,
NULL,
NULL
};
PyMODINIT_FUNC
PyInit__minpack(void)
{
PyObject *module, *mdict;
import_array();
module = PyModule_Create(&moduledef);
if (module == NULL) {
return NULL;
}
mdict = PyModule_GetDict(module);
if (mdict == NULL) {
return NULL;
}
minpack_error = PyErr_NewException ("_minpack.error", NULL, NULL);
if (minpack_error == NULL) {
return NULL;
}
if (PyDict_SetItemString(mdict, "error", minpack_error)) {
return NULL;
}
return module;
}