summaryrefslogtreecommitdiffstats
path: root/Modules/mpzmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-12-17 12:09:14 (GMT)
committerGuido van Rossum <guido@python.org>1993-12-17 12:09:14 (GMT)
commit67a5fdbcc2d86cda9ee2efb7a97cb458036d6927 (patch)
tree2a23c03983e370fc5da75f547961f1e0ccc713cf /Modules/mpzmodule.c
parentad7324c71fbbb60eb34f7d6fe6b5c3663d114304 (diff)
downloadcpython-67a5fdbcc2d86cda9ee2efb7a97cb458036d6927.zip
cpython-67a5fdbcc2d86cda9ee2efb7a97cb458036d6927.tar.gz
cpython-67a5fdbcc2d86cda9ee2efb7a97cb458036d6927.tar.bz2
* 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().
Diffstat (limited to 'Modules/mpzmodule.c')
-rw-r--r--Modules/mpzmodule.c14
1 files changed, 8 insertions, 6 deletions
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 @@ mpz_mpzcoerce(z)
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(self, args)
} /* 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 @@ static struct methodlist mpz_methods[] = {
{"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 @@ static typeobject MPZtype = {
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*/
};