--- python-pqueue-0.2.orig/pqueuemodule.c
+++ python-pqueue-0.2/pqueuemodule.c
@@ -255,7 +255,7 @@
 	Py_DECREF(pqp->dict);
 	if(pqp->min != NULL)
 		children_dealloc(pqp->min);
-	PyMem_DEL(pqp);
+	PyObject_Del(pqp);
 }
 
 static PyObject *
@@ -716,6 +716,20 @@
 }
 
 static int
+pqueue_insert_build(pqp, data, priority)
+	pqueueobject *pqp;
+	PyObject *data, *priority;
+{
+	PyObject *args = Py_BuildValue("OO", priority, data);
+	PyObject *ret =	pqueue_insert(pqp, args);
+	Py_DECREF(args);
+	if (ret == NULL)
+		return -1;
+	Py_DECREF(ret);
+	return 0;
+}
+
+static int
 pqueue_ass_sub(pqp, data, priority)
 	pqueueobject *pqp;
 	PyObject *data, *priority;
@@ -733,14 +747,7 @@
 			return -1;
 		} else {		     /* Setting non-existent node */
 			/* Turn the set into an insert() */
-			PyObject *ret = 
-				pqueue_insert(pqp,
-					      Py_BuildValue("OO", priority,
-							    data));
-			if (ret == NULL)
-				return -1;
-			Py_DECREF(ret);
-			return 0;
+			return pqueue_insert_build(pqp, data, priority);
 		}
 	}
 
@@ -761,15 +768,8 @@
 		int ret = delete_key(pqp, hp);
 		if (ret != 0)
 			return ret;
-		else {
-			PyObject *ret = 
-				pqueue_insert(pqp,
-					      Py_BuildValue("OO", priority,
-							    data));
-			if (ret == NULL)
-				return -1;
-			Py_DECREF(ret);
-			return 0;
+ 		else {
+			return pqueue_insert_build(pqp, data, priority);
 		}
 	}
 #ifdef DEBUG
--- python-pqueue-0.2.orig/README
+++ python-pqueue-0.2/README
@@ -105,9 +105,7 @@
 
 	pq[data] = priority
 
-		Allows the priority associated with <data> to be
-		reduced. If <priority> is greater than the current
-		priority associated with <data>, ValueError is raised.
+		Sets the priority associated with <data> to <priority>.
 
 		This call runs in O(1) amortized time if the new
 		priority is less than or equal to the current
--- python-pqueue-0.2.orig/Makefile.pre.in
+++ python-pqueue-0.2/Makefile.pre.in
@@ -118,6 +118,7 @@
 MACHDEP=	@MACHDEP@
 SO=		@SO@
 LDSHARED=	@LDSHARED@
+BLDSHARED=	@LDSHARED@
 CCSHARED=	@CCSHARED@
 LINKFORSHARED=	@LINKFORSHARED@
 @SET_CCC@
@@ -165,7 +166,7 @@
 .SUFFIXES: .py .pyc
 
 # Target to install scripts and modules
-install: install-shmods install-scripts
+install: install-shmods
 install-shmods: $(SHAREDMODS)
 	@echo 'Installing shared modules...'
 	@if [ -n "$(SHAREDMODS)" ]; then \
@@ -194,7 +195,7 @@
 
 # Handy target to remove intermediate files and backups
 clean:
-		-rm -f *.o *~
+		-rm -f *.o *~ *.pyc *.pyo
 
 # Handy target to remove everything that is easily regenerated
 clobber:	clean
