Issue #6985: number of range() items should be constrained to lie
[python.git] / Tools / modulator / Templates / module_tail
blob59cc50b6c0c113a06561e47f56a9d465dc37f1a2
2 /* List of methods defined in the module */
4 static struct PyMethodDef $abbrev$_methods[] = {
5         $methodlist$
6         {NULL,   (PyCFunction)NULL, 0, NULL}            /* sentinel */
7 };
10 /* Initialization function for the module (*must* be called init$name$) */
12 static char $name$_module_documentation[] = 
16 void
17 init$name$()
19         PyObject *m, *d;
21         /* Create the module and add the functions */
22         m = Py_InitModule4("$name$", $abbrev$_methods,
23                 $name$_module_documentation,
24                 (PyObject*)NULL,PYTHON_API_VERSION);
26         /* Add some symbolic constants to the module */
27         d = PyModule_GetDict(m);
28         ErrorObject = PyString_FromString("$name$.error");
29         PyDict_SetItemString(d, "error", ErrorObject);
31         /* XXXX Add constants here */
32         
33         /* Check for errors */
34         if (PyErr_Occurred())
35                 Py_FatalError("can't initialize module $name$");