pike.git / src / dynamic_buffer.c

version» Context lines:

pike.git/src/dynamic_buffer.c:76:      PMOD_EXPORT void low_init_buf_with_string(dynbuf_string s, dynamic_buffer *buf)   {    if(buf->s.str) { free(buf->s.str); buf->s.str=NULL; }    buf->s=s;    if(!buf->s.str) initialize_buf(buf);    /* if the string is an old buffer, this realloc will set the old    the bufsize back */    for(buf->bufsize=BUFFER_BEGIN_SIZE;buf->bufsize<buf->s.len;buf->bufsize*=2);    buf->s.str=realloc(buf->s.str,buf->bufsize); - #ifdef PIKE_DEBUG +     if(!buf->s.str)    Pike_fatal("Realloc failed.\n"); - #endif +    }      PMOD_EXPORT dynbuf_string complex_free_buf(dynamic_buffer *old_buf)   {    dynbuf_string tmp;    if(!pike_global_buffer.s.str) return pike_global_buffer.s;    my_putchar(0);    pike_global_buffer.s.len--;    tmp=pike_global_buffer.s;    pike_global_buffer = *old_buf;