From 2ac3726ce5a776d31ca5096b54e1b2845043efdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se> Date: Sun, 7 Sep 1997 17:04:08 +0200 Subject: [PATCH] mpzmod_digits: Pop stack a little later. Rev: src/modules/Gmp/mpz_glue.c:1.22 --- src/modules/Gmp/mpz_glue.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/Gmp/mpz_glue.c b/src/modules/Gmp/mpz_glue.c index 8aba4c7d2b..ee6b6b863f 100644 --- a/src/modules/Gmp/mpz_glue.c +++ b/src/modules/Gmp/mpz_glue.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: mpz_glue.c,v 1.21 1997/08/30 22:25:44 grubba Exp $"); +RCSID("$Id: mpz_glue.c,v 1.22 1997/09/07 15:04:08 nisse Exp $"); #include "gmp_machine.h" #if !defined(HAVE_LIBGMP) @@ -200,6 +200,8 @@ static void mpzmod_get_string(INT32 args) static void mpzmod_digits(INT32 args) { INT32 base; + struct pike_string *s; + if (!args) { base = 10; @@ -210,9 +212,11 @@ static void mpzmod_digits(INT32 args) error("Bad argument 1 for Mpz->digits().\n"); base = sp[-args].u.integer; } + + s = low_get_digits(THIS, base); pop_n_elems(args); - push_string(low_get_digits(THIS, base)); + push_string(s); } static void mpzmod_size(INT32 args) -- GitLab