[PATCH] gc-improv merge (1/n): new libiberty interfaces
Laurynas Biveinis
laurynas.biveinis@gmail.com
Fri May 7 08:35:00 GMT 2010
> Functions in libiberty use inline texinfo to document them; that's
> what functions.texi is generated from. It's not magic - you still
> have to write the texinfo; you just have to write it in the *.c files
> near each function.
I see that hash tables and splay trees were completely undocumented in
texinfo. Adding documentation for one function of each is not very
useful, but I guess we have to start somewhere.
>
>> The patch only adds new API. The old API is not deprecated nor
>> changed. Am I missing something here?
>
> - splay_tree_allocate_fn allocate;
>
Oh, right, that's a rename. I guess it is easiest to just keep the old
name (it is not misleading IMHO).
Here is an updated patch. Changes from the previous one:
1) Formatting fixes
2) Renamed the new functions to htab_create_typed_alloc and
splay_tree_new_typed_alloc.
3) Documented them in texinfo
4) No longer touches the splay_tree_s fields.
Tested on x86_64-linux, also with make info pdf.
Comments? Thanks.
include:
2010-05-05 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* splay-tree.h: Update copyright years.
(splay_tree_s): Document fields.
(splay_tree_new_typed_alloc): New.
* hashtab.h: Update copyright years.
(htab_create_typed_alloc): New.
libiberty:
* splay-tree.c: Update copyright years.
(splay_tree_new_typed_alloc): New.
(splay_tree_new_with_allocator): Use it.
* hashtab.c: Update copyright years.
(htab_create_typed_alloc): New.
(htab_create_alloc): Use it.
* functions.texi: Regenerate.
--
Laurynas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gc-improv-1-libiberty.patch
Type: application/octet-stream
Size: 11974 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100507/ba82dfc3/attachment.obj>
More information about the Gcc-patches
mailing list