Serhiy Storchaka | 18b250f | 2017-03-19 08:51:07 +0200 | [diff] [blame] | 1 | /*[clinic input] |
| 2 | preserve |
| 3 | [clinic start generated code]*/ |
| 4 | |
| 5 | PyDoc_STRVAR(module___init____doc__, |
| 6 | "module(name, doc=None)\n" |
| 7 | "--\n" |
| 8 | "\n" |
| 9 | "Create a module object.\n" |
| 10 | "\n" |
| 11 | "The name must be a string; the optional doc argument can have any type."); |
| 12 | |
| 13 | static int |
| 14 | module___init___impl(PyModuleObject *self, PyObject *name, PyObject *doc); |
| 15 | |
| 16 | static int |
| 17 | module___init__(PyObject *self, PyObject *args, PyObject *kwargs) |
| 18 | { |
| 19 | int return_value = -1; |
| 20 | static const char * const _keywords[] = {"name", "doc", NULL}; |
| 21 | static _PyArg_Parser _parser = {"U|O:module", _keywords, 0}; |
| 22 | PyObject *name; |
| 23 | PyObject *doc = Py_None; |
| 24 | |
| 25 | if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser, |
| 26 | &name, &doc)) { |
| 27 | goto exit; |
| 28 | } |
| 29 | return_value = module___init___impl((PyModuleObject *)self, name, doc); |
| 30 | |
| 31 | exit: |
| 32 | return return_value; |
| 33 | } |
| 34 | /*[clinic end generated code: output=7b1b324bf6a590d1 input=a9049054013a1b77]*/ |