Re: [PATCH/RFC v1 0/5] add strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Duy, On Mon, Jun 09, 2014 at 05:39:12PM +0700, Duy Nguyen wrote: > On Mon, Jun 9, 2014 at 3:36 PM, Jeremiah Mahler wrote: > > Currently, the data in a strbuf is modified using add operations. To > > set the buffer to some data a reset must be performed before an add. > > > > strbuf_reset(buf);

Re: [PATCH/RFC v1 0/5] add strbuf_set operations

2014-06-09 Thread Duy Nguyen
On Mon, Jun 9, 2014 at 3:36 PM, Jeremiah Mahler wrote: > Currently, the data in a strbuf is modified using add operations. To > set the buffer to some data a reset must be performed before an add. > > strbuf_reset(buf); > strbuf_add(buf, cb.buf.buf, cb.buf.len); > > And this is a common seque

[PATCH/RFC v1 0/5] add strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Currently, the data in a strbuf is modified using add operations. To set the buffer to some data a reset must be performed before an add. strbuf_reset(buf); strbuf_add(buf, cb.buf.buf, cb.buf.len); And this is a common sequence of operations with 70 occurrences found in the current s