/* -*- Mode: C; tab-width: 8 -*- */ #include "Python.h" #include static PyObject * Py_Malloc_Stats (PyObject * self, PyObject * args) { if (!PyArg_ParseTuple (args, "")) { return NULL; } else { malloc_stats(); } Py_INCREF (Py_None); return Py_None; } static PyMethodDef malloc_stats_methods[] = { {"malloc_stats", Py_Malloc_Stats, 1}, {0, 0}, }; void initmalloc_stats (void) { Py_InitModule ("malloc_stats", malloc_stats_methods); }