blob: dd8964bbb04111fbc88bddf5402153fffeac578c [file] [log] [blame]
Guido van Rossum026f01a1996-09-06 21:16:21 +00001#include "Python.h"
2
3static PyObject *
4ex_foo(self, args)
5 PyObject *self, *args;
6{
7 printf("Hello, world\n");
8 Py_INCREF(Py_None);
9 return Py_None;
10}
11
12static PyMethodDef example_methods[] = {
13 {"foo", ex_foo, 1, "foo() doc string"},
14 {NULL, NULL}
15};
16
17void
18initexample()
19{
20 Py_InitModule("example", example_methods);
21}