diff options
Diffstat (limited to 'PC/example_nt/example.c')
-rw-r--r-- | PC/example_nt/example.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/PC/example_nt/example.c b/PC/example_nt/example.c new file mode 100644 index 0000000..dd8964b --- /dev/null +++ b/PC/example_nt/example.c @@ -0,0 +1,21 @@ +#include "Python.h" + +static PyObject * +ex_foo(self, args) + PyObject *self, *args; +{ + printf("Hello, world\n"); + Py_INCREF(Py_None); + return Py_None; +} + +static PyMethodDef example_methods[] = { + {"foo", ex_foo, 1, "foo() doc string"}, + {NULL, NULL} +}; + +void +initexample() +{ + Py_InitModule("example", example_methods); +} |