Merged revisions 75928 via svnmerge from
[python/dscho.git] / PC / example_nt / example.c
blobd807311d96225509610458862bda7abcb4de0cce
1 #include "Python.h"
3 static PyObject *
4 ex_foo(PyObject *self, PyObject *args)
6 printf("Hello, world\n");
7 Py_INCREF(Py_None);
8 return Py_None;
11 static PyMethodDef example_methods[] = {
12 {"foo", ex_foo, METH_VARARGS, "foo() doc string"},
13 {NULL, NULL}
16 static struct PyModuleDef examplemodule = {
17 PyModuleDef_HEAD_INIT,
18 "example",
19 "example module doc string",
20 -1,
21 example_methods,
22 NULL,
23 NULL,
24 NULL,
25 NULL
28 PyMODINIT_FUNC
29 PyInit_example(void)
31 return PyModule_Create(&examplemodule);