[ccan] [PATCH] mem: module for common operations on addr+length regions

David Gibson david at gibson.dropbear.id.au
Sat Aug 2 23:29:07 EST 2014


On Fri, Aug 01, 2014 at 10:13:46PM -0400, Cody P Schafer wrote:
> On Wed, Jul 30, 2014 at 2:53 AM, David Gibson
> <david at gibson.dropbear.id.au> wrote:
> > On Wed, Jul 30, 2014 at 01:47:03AM -0400, Cody P Schafer wrote:
> >> Impliments 'mem' variants of <string.h> and <ccan/str/str.h>
> >> functions.
> >
> > Uh.. you do realise this is just about what the bytestring module
> > already does?
> 
> I didn't, I had not yet looked at those patches closely.
> 
> As you've already got a module going, I'm happy with tweaking these to
> call your functions, the rational being that I'm not sure I want to
> deal with wrapping/unwrapping the fields in a struct, and I'm not
> ready to commit to using bytestrings for all my char * + length needs
> :)

Hm, fair enough.  Actually it would make more sense for the bytestring
module to call your functions rather than the other way around.

Your module should also replace my memmem module which does basically
the same thing, but only includes the memmem() function, if the C
library doesn't.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20140802/c78e67aa/attachment.sig>


More information about the ccan mailing list