pike.git / src / bignum.c

version» Context lines:

pike.git/src/bignum.c:7:   #include "global.h"      #include "interpret.h"   #include "program.h"   #include "object.h"   #include "svalue.h"   #include "pike_error.h"      #include "bignum.h"    - #define sp Pike_sp -  - PMOD_EXPORT struct program *get_auto_bignum_program(void) - { -  return bignum_program; - } -  +    PMOD_EXPORT void convert_stack_top_to_bignum(void)   {    push_object(clone_object(bignum_program, 1));   }      PMOD_EXPORT void convert_stack_top_with_base_to_bignum(void)   {    push_object(clone_object(bignum_program, 2));   }   
pike.git/src/bignum.c:51:   {    push_svalue(s);    return make_bignum_object();   }      PMOD_EXPORT struct pike_string *string_from_bignum(struct object *o, int base)   {    push_int(base);    safe_apply(o, "digits", 1);    -  if(TYPEOF(sp[-1]) != T_STRING) +  if(TYPEOF(Pike_sp[-1]) != T_STRING)    Pike_error("Gmp.mpz string conversion failed.\n");    -  dmalloc_touch_svalue(sp-1); -  return (--sp)->u.string; +  dmalloc_touch_svalue(Pike_sp-1); +  return (--Pike_sp)->u.string;   }      PMOD_EXPORT void convert_svalue_to_bignum(struct svalue *s)   {    push_svalue(s);    convert_stack_top_to_bignum();    free_svalue(s); -  *s=sp[-1]; -  sp--; -  dmalloc_touch_svalue(sp); +  *s=Pike_sp[-1]; +  Pike_sp--; +  dmalloc_touch_svalue(Pike_sp);   }