Staging
v0.5.1
https://github.com/python/cpython
Revision ffd5d886c2eb95c04e37736058994b263b2ab424 authored by Gregory P. Smith on 03 January 2010, 00:43:02 UTC, committed by Gregory P. Smith on 03 January 2010, 00:43:02 UTC
1 parent 6dcdcde
Raw File
Tip revision: ffd5d886c2eb95c04e37736058994b263b2ab424 authored by Gregory P. Smith on 03 January 2010, 00:43:02 UTC
make setup.py similar to py3k's when reporting on _hashlib as missing or not.
Tip revision: ffd5d88
example.c
#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);
}
back to top