Branch: Tag:

2014-09-18

2014-09-18 15:39:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

IOBuffer: Use add_ref().

68:       static void io_set_error_mode( IOBuffer *io, struct program *m )    { -  if( m ) m->refs++; +  if( m ) add_ref(m);    if( io->error_mode ) free_program( io->error_mode );    io->error_mode = m;    }
560:    to->buffer = io_read_pointer(io);    to->len = len;    to->sub = Pike_fp->current_object; -  to->sub->refs++; +  add_ref(to->sub);    io_consume( io, len );       if( do_copy )
749:    io->str = s;    io->buffer = (unsigned char*)s->str;    io->len = s->len; -  s->refs++; +  add_ref(s);    }    else    io_append( io, s->str, s->len );
783:    io->len = len;       io->source = p->u.object; -  io->source->refs++; +  add_ref(io->source);    return;    }    if( t != MEMOBJ_NONE )
894:    else    {    io->output = f->u.object; -  io->output->refs++; +  add_ref(io->output);    }    }   
2014:    this->len = x->len;    this->malloced = 0;    this->str = x; -  x->refs++; +  add_ref(x);    }       /*! @decl void read_only()