Kaydet (Commit) 3851d12f authored tarafından Benjamin Peterson's avatar Benjamin Peterson

make struct static

üst e348d1a4
...@@ -300,13 +300,13 @@ parameters to be passed in as a tuple acceptable for parsing via ...@@ -300,13 +300,13 @@ parameters to be passed in as a tuple acceptable for parsing via
The :const:`METH_KEYWORDS` bit may be set in the third field if keyword The :const:`METH_KEYWORDS` bit may be set in the third field if keyword
arguments should be passed to the function. In this case, the C function should arguments should be passed to the function. In this case, the C function should
accept a third ``PyObject *`` parameter which will be a dictionary of keywords. accept a third ``PyObject \*`` parameter which will be a dictionary of keywords.
Use :cfunc:`PyArg_ParseTupleAndKeywords` to parse the arguments to such a Use :cfunc:`PyArg_ParseTupleAndKeywords` to parse the arguments to such a
function. function.
The method table must be referenced in the module definition structure:: The method table must be referenced in the module definition structure::
struct PyModuleDef spammodule = { static struct PyModuleDef spammodule = {
PyModuleDef_HEAD_INIT, PyModuleDef_HEAD_INIT,
"spam", /* name of module */ "spam", /* name of module */
spam_doc, /* module documentation, may be NULL */ spam_doc, /* module documentation, may be NULL */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment