diff --git a/Include/longobject.h b/Include/longobject.h
index d4bcbad..88854a6 100644
--- a/Include/longobject.h
+++ b/Include/longobject.h
@@ -44,8 +44,10 @@
 #define PyLong_Check(op) ((op)->ob_type == &PyLong_Type)
 
 extern PyObject *PyLong_FromLong Py_PROTO((long));
+extern PyObject *PyLong_FromUnsignedLong Py_PROTO((unsigned long));
 extern PyObject *PyLong_FromDouble Py_PROTO((double));
 extern long PyLong_AsLong Py_PROTO((PyObject *));
+extern unsigned long PyLong_AsUnsignedLong Py_PROTO((PyObject *));
 extern double PyLong_AsDouble Py_PROTO((PyObject *));
 
 PyObject *PyLong_FromString Py_PROTO((char *, char **, int));
diff --git a/Objects/longobject.c b/Objects/longobject.c
index f98e517..36f2a26 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -109,6 +109,27 @@
 	return (object *)v;
 }
 
+/* Create a new long int object from a C unsigned long int */
+
+object *
+PyLong_FromUnsignedLong(ival)
+	unsigned long ival;
+{
+	/* Assume a C long fits in at most 5 'digits' */
+	/* Works on both 32- and 64-bit machines */
+	longobject *v = alloclongobject(5);
+	if (v != NULL) {
+		unsigned long t = ival;
+		int i;
+		for (i = 0; i < 5; i++) {
+			v->ob_digit[i] = t & MASK; 
+			t >>= SHIFT;
+		}
+		v = long_normalize(v);
+	}
+	return (object *)v;
+}
+
 /* Create a new long int object from a C double */
 
 object *
@@ -181,6 +202,41 @@
 	return x * sign;
 }
 
+/* Get a C long int from a long int object.
+   Returns -1 and sets an error condition if overflow occurs. */
+
+unsigned long
+PyLong_AsUnsignedLong(vv)
+	object *vv;
+{
+	register longobject *v;
+	unsigned long x, prev;
+	int i;
+	
+	if (vv == NULL || !is_longobject(vv)) {
+		err_badcall();
+		return (unsigned long) -1;
+	}
+	v = (longobject *)vv;
+	i = v->ob_size;
+	x = 0;
+	if (i < 0) {
+		err_setstr(OverflowError,
+			   "can't convert negative value to unsigned long");
+		return (unsigned long) -1;
+	}
+	while (--i >= 0) {
+		prev = x;
+		x = (x << SHIFT) + v->ob_digit[i];
+		if ((x >> SHIFT) != prev) {
+			err_setstr(OverflowError,
+				"long int too long to convert");
+			return (unsigned long) -1;
+		}
+	}
+	return x;
+}
+
 /* Get a C double from a long int object.  No overflow check. */
 
 double
