* mpzmodule.c: cast some methods to the proper type.
* traceback.c (tb_print): use sys.tracebacklimit as a maximum number of
  traceback entries to print (default 1000).
* ceval.c (printtraceback): Don't print stack trace header -- this is now
  done by tb_print().
diff --git a/Modules/mpzmodule.c b/Modules/mpzmodule.c
index 5ff0801..d0b9d7f 100644
--- a/Modules/mpzmodule.c
+++ b/Modules/mpzmodule.c
@@ -993,7 +993,9 @@
 	err_setstr(TypeError, "number coercion (to mpzobject) failed");
 	return NULL;
 } /* mpz_mpzcoerce() */
-	
+
+static void mpz_divm();
+
 static object *
 MPZ_powm(self, args)
 	object *self;
@@ -1181,7 +1183,7 @@
 } /* MPZ_sqrtrem() */
 
 
-void
+static void
 #if __STDC__
 mpz_divm(MP_INT *res, const MP_INT *num, const MP_INT *den, const MP_INT *mod)
 #else
@@ -1544,7 +1546,7 @@
 	{"hex",			mpz_hex},
 	{"oct",			mpz_oct},
 #endif /* def MPZ_CONVERSIONS_AS_METHODS */
-	{"binary",		mpz_binary},
+	{"binary", (object * (*) (object *, object *)) mpz_binary},
 	{NULL,			NULL}		/* sentinel */
 };
 
@@ -1639,11 +1641,11 @@
 	sizeof(mpzobject),	/*tp_size*/
 	0,			/*tp_itemsize*/
 	/* methods */
-	mpz_dealloc,	/*tp_dealloc*/
+	(void (*) (object *)) mpz_dealloc,	/*tp_dealloc*/
 	0,		/*tp_print*/
-	mpz_getattr,	/*tp_getattr*/
+	(object * (*)(object *, char *)) mpz_getattr,	/*tp_getattr*/
 	0,		/*tp_setattr*/
-	mpz_compare,	/*tp_compare*/
+	(int (*) (object *, object *))  mpz_compare,	/*tp_compare*/
 	mpz_repr,	/*tp_repr*/
         &mpz_as_number, /*tp_as_number*/
 };