Staging
v0.8.1
v0.8.1
Revision fbd7518a412b162a0b749f6df71b3105140ab253 authored by Georg Brandl on 09 March 2014, 08:37:14 UTC, committed by Georg Brandl on 09 March 2014, 08:37:14 UTC
1 parent 444c171
example.c
#include "Python.h"
static PyObject *
ex_foo(PyObject *self, PyObject *args)
{
printf("Hello, world\n");
Py_INCREF(Py_None);
return Py_None;
}
static PyMethodDef example_methods[] = {
{"foo", ex_foo, METH_VARARGS, "foo() doc string"},
{NULL, NULL}
};
static struct PyModuleDef examplemodule = {
PyModuleDef_HEAD_INIT,
"example",
"example module doc string",
-1,
example_methods,
NULL,
NULL,
NULL,
NULL
};
PyMODINIT_FUNC
PyInit_example(void)
{
return PyModule_Create(&examplemodule);
}
Computing file changes ...