On Fri, 5 Oct 2007, Sam Ravnborg wrote: > > Point taken although no sane person would name it strbuf_to_c(...). I agree with the "no sane person", but the problem is that the insane people seem to be in no short supply. Go look at string libraries, and they all do something like that. Or worse. - ustr: yes, it uses *exactly* what I described: "ustr_cstr()" and "ustr_len()" instead of having the data/length available easily (although it claims to do it for size reasons - perhaps valid in some cases!) - libast: SPIF_CHARPTR_C(x). No, really. - Vstr: doesn't have a linear data representation. Needs explicit flattening - although it appears to be something you're not ever supposed to do - it has 200+ functions to do various magic things. - Qt (QString): QString::"data()", "ascii()" or "utf8()" or something. At least this has the excuse of really being able to handle different locales (it didn't do that originally, though!), but they end up having a million helper functions exactly because you cannot use the normal string routines on anything! - safesrtr, bstring: you just cast the pointer to "char *". Now *that* is classy and safe. So there's a few sane out there, but I actually think they are in the minority (Glib, others) Linus - 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