[ccan] [PATCH] btree: Add custom allocator interface.

Stuart Longland stuartl at longlandclan.id.au
Mon Feb 8 15:26:29 AEDT 2016


On 08/02/16 12:17, David Gibson wrote:
>> +static void* default_malloc(const struct btree_allocator* alloc, size_t size);
> Existing style in this function suggests "void *foo" rather than
> "void* foo".

Ahh, call it habit, I'm used to having the "pointer" bit with the type
(as to me; "pointer to void" is a distinct type from "void").  Caught
myself doing it elsewhere but missed it here, I'll fix it.

> [snip]
>> > +/* Default allocator implementation */
>> > +const struct btree_allocator BTREE_DEFAULT_ALLOCATOR = {
> Use of all-caps for a non-macro is a bit unexpected.
> 

Good point.  I guess I wanted to visually differentiate a constant from
other member types.

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20160208/7221cc26/attachment.sig>


More information about the ccan mailing list