Bruno Haible <[EMAIL PROTECTED]> writes: > Simon Josefsson wrote: >> Review most appreciated, as always. >> ... >> +/* Hashes. */ >> +extern int >> +gc_hash_buffer (int hash, const void *in, size_t inlen, char *out); > > About the specification of this function: I can guess what 'in' and 'inlen' > mean, but it's not clear what HASH is, what OUT is (and how much memory > should be allocated for it), and what the return value is.
Thanks, I installed the patch below. I will write docstrings for all of the functions eventually. Index: gc.h =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/gc.h,v retrieving revision 1.2 diff -u -p -u -w -r1.2 gc.h --- gc.h 8 Oct 2005 09:26:59 -0000 1.2 +++ gc.h 11 Oct 2005 17:40:05 -0000 @@ -63,6 +63,12 @@ extern void gc_set_allocators (gc_malloc gc_free_t func_free); /* Hashes. */ + +/* Compute a hash value over buffer IN of INLEN bytes size using the + algorithm HASH, placing the result in the pre-allocated buffer OUT. + The required size of OUT depends on HASH, and is generally + GC_<HASH>_DIGEST_SIZE. For example, for GC_MD5 the output buffer + must be 16 bytes. */ extern int gc_hash_buffer (int hash, const void *in, size_t inlen, char *out); _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib