Branch: Tag:

2006-10-20

2006-10-20 07:08:46 by Martin Nilsson <mani@lysator.liu.se>

Convert bignum Gmp.mpz objects to Gmp.bignum when cast to int.

Rev: src/modules/Gmp/mpz_glue.c:1.168

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: mpz_glue.c,v 1.167 2005/09/15 15:39:55 grubba Exp $ + || $Id: mpz_glue.c,v 1.168 2006/10/20 07:08:46 nilsson Exp $   */      #include "global.h"
517: Inside #if defined(AUTO_BIGNUM)
  #ifdef AUTO_BIGNUM    add_ref(fp->current_object);    mpzmod_reduce(fp->current_object); +  if( Pike_sp[-1].type == T_OBJECT && +  Pike_sp[-1].u.object->prog != bignum_program ) +  { +  apply_svalue(&auto_bignum_program, 1); +  }   #else    push_int(mpz_get_si(THIS));   #endif /* AUTO_BIGNUM */