Branch: Tag:

2003-06-30

2003-06-30 17:11:20 by Martin Stjernholm <mast@lysator.liu.se>

Cleaned up some pointer handling.

Rev: src/apply_low.h:1.19
Rev: src/backend.cmod:1.43
Rev: src/block_alloc.h:1.68
Rev: src/builtin_functions.c:1.497
Rev: src/cyclic.c:1.11
Rev: src/encode.c:1.190
Rev: src/fdlib.c:1.63
Rev: src/fsort_template.h:1.16
Rev: src/gc.c:1.220
Rev: src/interpret.c:1.307
Rev: src/interpret.h:1.142
Rev: src/interpret_functions.h:1.151
Rev: src/las.c:1.336
Rev: src/main.c:1.177
Rev: src/mapping.c:1.168
Rev: src/mapping.h:1.50
Rev: src/modules/Oracle/oracle.c:1.78
Rev: src/modules/_Charset/misc.c:1.14
Rev: src/multiset.c:1.74
Rev: src/object.c:1.238
Rev: src/object.h:1.79
Rev: src/pike_macros.h:1.37
Rev: src/pike_memory.c:1.146
Rev: src/pike_search.c:1.16
Rev: src/pike_search_engine2.c:1.9
Rev: src/pike_threadlib.h:1.47
Rev: src/pike_types.c:1.218
Rev: src/port.c:1.72
Rev: src/port.h:1.51
Rev: src/signal_handler.c:1.274
Rev: src/svalue.c:1.168
Rev: src/threads.c:1.219

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: encode.c,v 1.189 2003/06/12 18:42:56 mast Exp $ + || $Id: encode.c,v 1.190 2003/06/30 17:06:08 mast Exp $   */      #include "global.h"
27:   #include "bignum.h"   #include "pikecode.h"    - RCSID("$Id: encode.c,v 1.189 2003/06/12 18:42:56 mast Exp $"); + RCSID("$Id: encode.c,v 1.190 2003/06/30 17:06:08 mast Exp $");      /* #define ENCODE_DEBUG */   
296:       case T_ASSIGN:    { -  ptrdiff_t marker = ((char *)t->car)-(char *)0; +  ptrdiff_t marker = CAR_TO_INT(t);    if ((marker < 0) || (marker > 9)) {    Pike_fatal("Bad assign marker: %ld\n",    (long)marker);
337:    {    ptrdiff_t val;    -  val = ((char *)t->car)-(char *)0; +  val = CAR_TO_INT(t);    addchar((val >> 24)&0xff);    addchar((val >> 16)&0xff);    addchar((val >> 8)&0xff);    addchar(val & 0xff); -  val = ((char *)t->cdr)-(char *)0; +  val = CDR_TO_INT(t);    addchar((val >> 24)&0xff);    addchar((val >> 16)&0xff);    addchar((val >> 8)&0xff);
370:       case T_OBJECT:    { -  addchar(((char *)t->car)-(char *)0); +  addchar(CAR_TO_INT(t));       if(t->cdr)    { -  ptrdiff_t id = ((char *)t->cdr)-(char *)0; +  ptrdiff_t id = CAR_TO_INT(t);    if( id >= PROG_DYNAMIC_ID_START )    {    struct program *p=id_to_program(id);
3018:    } else {    placeholder->storage=p->storage_needed ?    (char *)xalloc(p->storage_needed) : -  (char *)0; +  (char *)NULL;    call_c_initializers(placeholder);    }    }
3039:    {    /* Logic for the PROGRAM_FINISHED flag:    * The purpose of this code is to make sure that the PROGRAM_FINISHED -  * flat is not set on the program until all inherited programs also +  * flag is not set on the program until all inherited programs also    * have that flag. -Hubbe    */    for(d=1;d<p->num_inherits;d++)