pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:19:   #include "operators.h"   #include "builtin_functions.h"   #include "module_support.h"   #include "fsort.h"   #include "threads.h"   #include "stuff.h"   #include "version.h"   #include "bignum.h"   #include "pikecode.h"    - RCSID("$Id: encode.c,v 1.143 2002/05/10 16:10:26 grubba Exp $"); + RCSID("$Id: encode.c,v 1.144 2002/05/11 00:28:59 nilsson Exp $");      /* #define ENCODE_DEBUG */      /* Use the old encoding method for programs. */   #define OLD_PIKE_ENCODE_PROGRAM      #ifdef ENCODE_DEBUG   /* Pass a nonzero integer as the third arg to encode_value,    * encode_value_canonic and decode_value to activate this debug. */   #define EDB(N,X) do { debug_malloc_touch(data); if (data->debug>=N) {X;} } while (0)   #else   #define EDB(N,X) do { debug_malloc_touch(data); } while (0)   #endif    - /* The sp macro conflicts with Solaris 2.5.1's <sys/conf.h>. */ - #ifdef sp - #undef sp - #define STACKPOINTER_WAS_DEFINED - #endif /* sp */ -  +    #ifdef _AIX   #include <net/nh.h>   #endif      #ifdef HAVE_NETINET_IN_H   #include <netinet/in.h>   #endif      #ifdef HAVE_IEEEFP_H   #include <ieeefp.h>   #endif /* HAVE_IEEEFP_H */      #include <math.h>    - /* Restore the sp macro */ - #ifdef STACKPOINTER_WAS_DEFINED - #define sp Pike_sp - #undef STACK_POINTER_WAS_DEFINED - #endif /* STACKPOINTER_WAS_DEFINED */ -  +    #ifdef PIKE_DEBUG   #define encode_value2 encode_value2_   #define decode_value2 decode_value2_   #endif         /* Tags used by encode value.    * Currently they only differ from the PIKE_T variants by    * TAG_FLOAT == PIKE_T_TYPE == 7    * and
pike.git/src/encode.c:2361:    a = low_allocate_array (num, 0);   #else    SETUP_DECODE_MEMOBJ(T_MULTISET, multiset, m,    allocate_multiset(low_allocate_array(num, 0)), ;);    a=m->ind;   #endif       for(e=0;e<num;e++)    {    decode_value2(data); -  assign_svalue(a->item+e , sp-1); +  assign_svalue(a->item+e , Pike_sp-1);    pop_stack(); -  dmalloc_touch_svalue(sp); +  dmalloc_touch_svalue(Pike_sp);    }    array_fix_type_field(a);   #ifdef PIKE_NEW_MULTISETS    {    struct multiset *l = mkmultiset (a);    free_array (a);    /* This special case is handled efficiently by merge_multisets. */    merge_multisets (m, l, PIKE_MERGE_DESTR_A | PIKE_ARRAY_OP_ADD);    free_multiset (l);    }