Branch: Tag:

1999-11-12

1999-11-12 07:33:45 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

objectp() and sprintf("%t"..) fixed for bignums (I hope)

Rev: src/bignum.c:1.13
Rev: src/builtin_functions.c:1.205
Rev: src/modules/Gmp/mpz_glue.c:1.66

11:   struct svalue auto_bignum_program = { T_INT };      int gmp_library_loaded=0; + int gmp_library_resolving=0;      static void resolve_auto_bignum_program(void)   {    if(auto_bignum_program.type == T_INT)    { -  +  gmp_library_resolving=1;    push_text("Gmp.bignum");    SAFE_APPLY_MASTER("resolv", 1);   
25:    auto_bignum_program=sp[-1];    sp--;    dmalloc_touch_svalue(sp); +  gmp_library_resolving=0;    }   }   
36:      struct program *get_auto_bignum_program_or_zero(void)   { -  if(!gmp_library_loaded) return 0; +  if(!gmp_library_loaded || gmp_library_resolving) return 0;    resolve_auto_bignum_program();    return program_from_function(&auto_bignum_program);   }
73:    * /Hubbe    */    -  if(!gmp_library_loaded) return 0; /* not possible */ +  if(!gmp_library_loaded || gmp_library_resolving) +  return 0; /* not possible */       resolve_auto_bignum_program();    return o->prog == program_from_function(&auto_bignum_program);