diff --git a/.gitattributes b/.gitattributes index cf54629ac4ebb5c77a1e2d95d2cec3c2cf54646c..319f0af9a46bcc949a82b5f18102dfbdf463e17f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -326,7 +326,6 @@ testfont binary /src/apply_low.h foreign_ident /src/array.h foreign_ident /src/backend.h foreign_ident -/src/bignum.c foreign_ident /src/bignum.h foreign_ident /src/block_alloc_h.h foreign_ident /src/builtin_functions.c foreign_ident diff --git a/src/bignum.c b/src/bignum.c index 957a2565236d1686b93436258966e2e19af07ae6..520aa380910c70fbef147760e7609ee213b650ea 100644 --- a/src/bignum.c +++ b/src/bignum.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: bignum.c,v 1.45 2008/05/30 15:19:02 mast Exp $ +|| $Id$ */ #include "global.h" @@ -39,26 +39,16 @@ void exit_auto_bignum(void) PMOD_EXPORT void convert_stack_top_to_bignum(void) { + if (auto_bignum_program.type!=T_PROGRAM) + Pike_error("Gmp.mpz conversion failed (Gmp.bignum not loaded).\n"); apply_svalue(&auto_bignum_program, 1); - - if(sp[-1].type != T_OBJECT) { - if (auto_bignum_program.type!=T_PROGRAM) - Pike_error("Gmp.mpz conversion failed (Gmp.bignum not loaded).\n"); - else - Pike_error("Gmp.mpz conversion failed (unknown error).\n"); - } } PMOD_EXPORT void convert_stack_top_with_base_to_bignum(void) { + if (auto_bignum_program.type!=T_PROGRAM) + Pike_error("Gmp.mpz conversion failed (Gmp.bignum not loaded).\n"); apply_svalue(&auto_bignum_program, 2); - - if(sp[-1].type != T_OBJECT) { - if (auto_bignum_program.type!=T_PROGRAM) - Pike_error("Gmp.mpz conversion failed (Gmp.bignum not loaded).\n"); - else - Pike_error("Gmp.mpz conversion failed (unknown error).\n"); - } } int is_bignum_object(struct object *o)