Patch: add ByteString.Unsafe.unsafePackMallocCStringLen

Lauri Alanko la at
Wed Jun 20 11:40:56 CEST 2012


There's a minor lapse in Data.ByteString.Unsafe:  
unsafePackMallocCString, unlike the other unsafePack* -functions,  
doesn't have a variant with an explicit length. This is useful when  
interfacing with C libraries that return a blob of binary data that  
the caller must free. Attached is a darcs patch that adds it.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: unsafePackMallocCStringLen.patch
Type: text/x-patch
Size: 17562 bytes
Desc: not available
URL: <>

More information about the Libraries mailing list