#include "Python.h"
-int
+static int
_siftdown(PyListObject *heap, int startpos, int pos)
{
PyObject *newitem, *parent;
return 0;
}
-int
+static int
_siftup(PyListObject *heap, int pos)
{
int startpos, endpos, childpos, rightpos;
return _siftdown(heap, startpos, pos);
}
-PyObject *
+static PyObject *
heappush(PyObject *self, PyObject *args)
{
PyObject *heap, *item;
PyDoc_STRVAR(heappush_doc,
"Push item onto heap, maintaining the heap invariant.");
-PyObject *
+static PyObject *
heappop(PyObject *self, PyObject *heap)
{
PyObject *lastelt, *returnitem;
PyDoc_STRVAR(heappop_doc,
"Pop the smallest item off the heap, maintaining the heap invariant.");
-PyObject *
+static PyObject *
heapreplace(PyObject *self, PyObject *args)
{
PyObject *heap, *item, *returnitem;
returned may be larger than item! That constrains reasonable uses of\n\
this routine.\n");
-PyObject *
+static PyObject *
heapify(PyObject *self, PyObject *heap)
{
int i, n;