2011/9/23 Jakub Narebski <jnareb@xxxxxxxxx>: > Brandon Casey <drafnel@xxxxxxxxx> writes: > >> ---------- Forwarded message ---------- >> From: Brandon Casey <drafnel@xxxxxxxxx> >> Date: Thu, Sep 22, 2011 at 11:21 PM >> Subject: permission to re-license strbuf subsystem as LGPL >> >> To those who have contributed to git's strbuf subsystem, >> >> I'd like to turn git's strbufs into a library. So with your consent >> I'd like to re-license the code in strbuf.c and strbuf.h, and any >> compat/ dependencies as LGPL so that I can create a strbuf library. > > That's a laudable goal. Do you plan on librarizing other universal > mini-libraries, like parseopt or test-lib? Not at the moment. > I wonder if for example "perf" tool in Linux kernel sources (userspace > companion to perf events subsystem) will move to using it; currently > it reuses some of internal git minilibraries, IIRC strbuf and parseopt > included. I would be pleased if it was useful to them. > By the way, how the 'strbuf' from git (which I think was created among > others to avoid additional external dependencies) differs from > existing C (not C++) string libraries, like 'bstring'[1], The Better > String Library, or the C libraries in http://bstring.sourceforge.net/features.html? > > [1]: http://bstring.sourceforge.net Hmm, I forgot about bstring. I think strbuf is a little smaller in scope than bstring, perhaps less ambitious. Less abstraction, and less protection too. With strbuf, you never forget that you're dealing with C char arrays. The data structures are pretty similar, but I don't think strbuf will ever have a function like bconcat(bstring1, bstring2) instead, you'd just do strbuf_add(strbuf1, strbuf2.buf, strbuf2.len) The benefit, of course, of a bconcat function is that either bstring1 or bstring2 can be NULL (like if a previous bstring2 = bfromcstr() initialization failed). This allows you to perform a sequence of bstring operations and only check errors at the end. -Brandon -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html