#include static char second_doc[] = "This module is just a simple example. It provides one function: func()."; static PyObject* second_func(PyObject *self, PyObject *args) { PyObject *a, *b; if (!PyArg_UnpackTuple(args, "func", 2, 2, &a, &b)) { return NULL; } return PyNumber_Add(a, b); } static char second_func_doc[] = "func(a, b)\n\ \n\ Return the sum of a and b."; static PyMethodDef second_methods[] = { {"func", second_func, METH_VARARGS, second_func_doc}, {NULL, NULL} }; PyMODINIT_FUNC initsecond(void) { Py_InitModule3("second", second_methods, second_doc); }