Branch: Tag:

2010-10-10

2010-10-10 21:56:29 by Martin Stjernholm <mast@lysator.liu.se>

Fixed error checks for some bignum functions.

2:   || 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:      PMOD_EXPORT void convert_stack_top_to_bignum(void)   { -  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"); +  apply_svalue(&auto_bignum_program, 1);   } - } +       PMOD_EXPORT void convert_stack_top_with_base_to_bignum(void)   { -  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"); +  apply_svalue(&auto_bignum_program, 2);   } - } +       int is_bignum_object(struct object *o)   {