python renderer: Try out function parameters
This commit is contained in:
parent
a4d84cff43
commit
95f6b31e4b
@ -27,16 +27,19 @@
|
||||
|
||||
static PyObject *test(PyObject *self, PyObject *args)
|
||||
{
|
||||
if(!PyArg_ParseTuple(args, ":numargs"))
|
||||
return NULL;
|
||||
long int i;
|
||||
|
||||
return PyLong_FromLong(20UL);
|
||||
if(!PyArg_ParseTuple(args, "l:get_number", &i))
|
||||
return NULL;
|
||||
|
||||
i *= 2;
|
||||
|
||||
return PyLong_FromLong(i);
|
||||
}
|
||||
|
||||
static PyMethodDef gds_render_methods[] = {
|
||||
{"get_number", test, METH_VARARGS,
|
||||
"Return the number of arguments received by the process."},
|
||||
{NULL, NULL, 0, NULL}
|
||||
{"get_number", test, METH_VARARGS, "Return the number of arguments received by the process."},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
static PyModuleDef gds_render_module = {
|
||||
|
Loading…
Reference in New Issue
Block a user