Branch: Tag:

2003-01-13

2003-01-13 14:42:07 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Moved the responsibility for loading of Gmp.bignum to the master.
The bignum hookin is now performed by the Gmp module initialization.

Rev: lib/master.pike.in:1.248
Rev: src/bignum.c:1.29
Rev: src/main.c:1.166
Rev: src/modules/Gmp/mpz_glue.c:1.116

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.115 2002/10/21 17:06:12 marcus Exp $ + || $Id: mpz_glue.c,v 1.116 2003/01/13 14:42:07 grubba Exp $   */      #include "global.h" - RCSID("$Id: mpz_glue.c,v 1.115 2002/10/21 17:06:12 marcus Exp $"); + RCSID("$Id: mpz_glue.c,v 1.116 2003/01/13 14:42:07 grubba Exp $");   #include "gmp_machine.h"   #include "module.h"   
308:    */   static void mpzmod_create(INT32 args)   { - #ifdef AUTO_BIGNUM -  /* Alert bignum.c that we have been loaded /Hubbe */ -  if(THIS_PROGRAM == bignum_program) -  gmp_library_loaded=1; - #endif -  +     switch(args)    {    case 1:
1719: Inside #if defined(USE_GMP) || defined(USE_GMP2) and #if defined(AUTO_BIGNUM)
  #ifdef AUTO_BIGNUM    {    int id; +  extern struct svalue auto_bignum_program;       /* This program autoconverts to integers, Gmp.mpz does not!!    * magic? no, just an if statement :) /Hubbe
1741:    PROGRAM_NO_EXPLICIT_DESTRUCT |    PROGRAM_CONSTANT ;    +  /* Magic hook in... */ +  free_svalue(&auto_bignum_program); +  add_ref(auto_bignum_program.u.program = bignum_program); +  auto_bignum_program.type = PIKE_T_PROGRAM; +    #if 0    /* magic /Hubbe    * This seems to break more than it fixes though... /Hubbe
1749:    ID_FROM_INT(Pike_compiler->new_program, id)->type=CONSTTYPE(tOr(tFunc(tOr5(tVoid,tStr,tInt,tFlt,tObj),tInt),tFunc(tStr tInt,tInt)));   #endif    } +    #endif      #endif