Branch: Tag:

1998-04-20

1998-04-20 18:54:01 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Changed a lot of ->refs++ to use add_ref() or ref_push_*() instead.

Rev: src/cpp.c:1.23
Rev: src/encode.c:1.19
Rev: src/gc.c:1.35
Rev: src/mapping.c:1.29
Rev: src/modules/Gmp/mpz_glue.c:1.32
Rev: src/modules/Image/blit.c:1.28
Rev: src/modules/Image/colortable.c:1.44
Rev: src/modules/Image/encodings/png.c:1.14
Rev: src/modules/Image/encodings/pnm.c:1.16
Rev: src/modules/Image/encodings/x.c:1.16
Rev: src/modules/Image/encodings/xwd.c:1.5
Rev: src/modules/Image/font.c:1.34
Rev: src/modules/Image/image.c:1.104
Rev: src/modules/Image/pnm.c:1.10
Rev: src/modules/Image/polyfill.c:1.25
Rev: src/modules/Image/togif.c:1.31
Rev: src/modules/Mysql/mysql.c:1.19
Rev: src/modules/Mysql/result.c:1.11
Rev: src/modules/Odbc/odbc.c:1.7
Rev: src/modules/Odbc/odbc_result.c:1.8
Rev: src/modules/Oracle/oracle.c:1.10
Rev: src/modules/Pipe/pipe.c:1.21
Rev: src/modules/Postgres/pgresult.c:1.6
Rev: src/modules/Postgres/postgres.c:1.6
Rev: src/modules/Regexp/glue.c:1.11
Rev: src/modules/Ssleay/ssleay.c:1.8
Rev: src/modules/_Crypto/cbc.c:1.11
Rev: src/modules/_Crypto/crypto.c:1.25
Rev: src/modules/_Crypto/md2.c:1.4
Rev: src/modules/_Crypto/pipe.c:1.12
Rev: src/modules/call_out/call_out.c:1.20
Rev: src/modules/spider/spider.c:1.67
Rev: src/modules/spider/streamed_parser.c:1.10
Rev: src/multiset.c:1.11
Rev: src/object.h:1.18
Rev: src/opcodes.c:1.20
Rev: src/signal_handler.c:1.48
Rev: src/stralloc.c:1.34
Rev: src/threads.c:1.69

22:   #include <fcntl.h>      #include "global.h" - RCSID("$Id: pipe.c,v 1.20 1998/04/06 20:40:04 hubbe Exp $"); + RCSID("$Id: pipe.c,v 1.21 1998/04/20 18:53:46 grubba Exp $");      #include "threads.h"   #include "stralloc.h"
158:    */   static void push_callback(int no)   { -  sp->u.object=THISOBJ; -  THISOBJ->refs++; +  add_ref(sp->u.object=THISOBJ);    sp->subtype=no+fp->context.identifier_level;    sp->type=T_FUNCTION;    sp++;
278:    b->next=NULL;    b->s=s;    sbuffers += s->len; -  s->refs++; +  add_ref(s);       if (THIS->lastbuffer)    THIS->lastbuffer->next=b;
299:    struct output *o;       -  THISOBJ->refs++; /* dont kill yourself now */ +  add_ref(THISOBJ); /* dont kill yourself now */    for(obj=THIS->firstoutput;obj;obj=next)    { -  obj->refs++; /* Hang on PLEASE!! /hubbe */ +  add_ref(obj); /* Hang on PLEASE!! /hubbe */    o=(struct output *)(obj->storage);    if (o->obj && o->mode==O_SLEEP)    {
518:       if (pos==this->pos)    { -  this->firstbuffer->s->refs++; +  add_ref(this->firstbuffer->s);    return this->firstbuffer->s;    }    return make_shared_binary_string(this->firstbuffer->s->str+
717:    i->u.obj=obj;    nobjects++;    i->type=I_OBJ; -  i->u.obj->refs++; +  add_ref(i->u.obj);    i->set_nonblocking_offset=find_identifier("set_nonblocking",i->u.obj->prog);    i->set_blocking_offset=find_identifier("set_blocking",i->u.obj->prog);   
784:    i=new_input();    i->type=I_STRING;    nstrings++; -  i->u.str=sp[-args].u.string; -  i->u.str->refs++; +  add_ref(i->u.str=sp[-args].u.string);    pop_n_elems(args-1);   }   
853:    }       THIS->living_outputs++; -  THISOBJ->refs++; /* Weird */ +  add_ref(THISOBJ); /* Weird */       /* Allocate a new struct output */    obj=clone_object(output_program,0);
863:    noutputs++;    o->obj=NULL;    -  o->obj=sp[-args].u.object; -  o->obj->refs++; +  add_ref(o->obj=sp[-args].u.object);       o->write_offset=find_identifier("write",o->obj->prog);    o->set_nonblocking_offset=find_identifier("set_nonblocking",o->obj->prog);
885:    o->pos=0; */    o->pos=THIS->pos;    -  push_object(obj); -  obj->refs++; +  ref_push_object(obj);    apply(o->obj,"set_id",1);    pop_stack();   
1079:    p->done=1;       if (thisobj) -  thisobj->refs++; /* don't kill object during this */ +  add_ref(thisobj); /* don't kill object during this */       while (p->firstbuffer)    {