Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f580d27

Browse files
committed
Use METH_VARARGS constant in example module.
Fix comment typo
1 parent cdec8c7 commit f580d27

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Modules/xxmodule.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
99
******************************************************************/
1010

1111
/* Use this file as a template to start implementing a module that
12-
also declares objects types. All occurrences of 'Xxo' should be changed
12+
also declares object types. All occurrences of 'Xxo' should be changed
1313
to something reasonable for your objects. After that, all other
1414
occurrences of 'xx' should be changed to something reasonable for your
1515
module. If your module is named foo your sourcefile should be named
@@ -66,7 +66,7 @@ Xxo_demo(XxoObject *self, PyObject *args)
6666
}
6767

6868
static PyMethodDef Xxo_methods[] = {
69-
{"demo", (PyCFunction)Xxo_demo, 1},
69+
{"demo", (PyCFunction)Xxo_demo, METH_VARARGS},
7070
{NULL, NULL} /* sentinel */
7171
};
7272

@@ -191,10 +191,10 @@ xx_roj(PyObject *self, PyObject *args)
191191
/* List of functions defined in the module */
192192

193193
static PyMethodDef xx_methods[] = {
194-
{"roj", xx_roj, 1},
195-
{"foo", xx_foo, 1},
196-
{"new", xx_new, 1},
197-
{"bug", xx_bug, 1},
194+
{"roj", xx_roj, METH_VARARGS},
195+
{"foo", xx_foo, METH_VARARGS},
196+
{"new", xx_new, METH_VARARGS},
197+
{"bug", xx_bug, METH_VARARGS},
198198
{NULL, NULL} /* sentinel */
199199
};
200200

0 commit comments

Comments
 (0)