Branch: Tag:

1999-10-25

1999-10-25 10:20:26 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

API upgrade + don't load GMP until required

Rev: src/bignum.c:1.7
Rev: src/bignum.h:1.7
Rev: src/modules/Gmp/mpz_glue.c:1.53

10:      struct svalue auto_bignum_program = { T_INT };    + int gmp_library_loaded=0; +    static void resolve_auto_bignum_program(void)   {    if(auto_bignum_program.type == T_INT)
52:      int is_bignum_object(struct object *o)   { +  /* Note: +  * This function should *NOT* try to resolv Gmp.mpz unless +  * it is already loaded into memory. +  * /Hubbe +  */ +  +  if(!gmp_library_loaded) return 0; /* not possible */ +     resolve_auto_bignum_program();    return o->prog == program_from_function(&auto_bignum_program);   }