summaryrefslogtreecommitdiffstats
path: root/PC/example_nt/example.c
blob: 953fb824e7f70fb4696c32e6ab4f7f5c835de4fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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}
};

PyMODINIT_FUNC
initexample(void)
{
	Py_InitModule("example", example_methods);
}