view PC/example_nt/example.c @ 48416:fb02fedfe647

Merged revisions 64677 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r64677 | brett.cannon | 2008-07-02 14:52:42 -0700 (Wed, 02 Jul 2008) | 2 lines Revert r64673 and instead just change the file encoding. ........
author Brett Cannon <bcannon@gmail.com>
date Wed, 02 Jul 2008 22:06:12 +0000
parents 19fd6141940d
children bd0e361bd642
line wrap: on
line source

#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);
}