On Mon, Nov 26, 2007 at 11:29:37AM -0600, Kevin P. Fleming wrote:
> SVN commits to the Asterisk project wrote:
>
> > -struct ast_hashtab *ast_hashtab_create(int initial_buckets,
> > - int (*compare)(const void *a, const void *b), /* a func to compare two
> > elements in the hash -- cannot be null */
> > - int (*resize)(struct ast_hashtab *), /* a func to decide if the table
> > needs to be resized, a NULL ptr here will cause a default to be used */
> > - int (*newsize)(struct ast_hashtab *tab), /* a ptr to func that returns
> > a new size of the array. A NULL will cause a default to be used */
> > - unsigned int (*hash)(const void *obj), /* a func to do the hashing */
> > - int do_locking ) /* use locks to guarantee safety of
> > iterators/insertion/deletion -- real simpleminded right now */
> > +struct ast_hashtab *ast_hashtab_create(int initial_buckets,
> > + int (*compare)(const void *a, const void *b),
> > + int (*resize)(struct ast_hashtab *),
> > + int (*newsize)(struct ast_hashtab *tab),
> > + unsigned int (*hash)(const void *obj),
> > + int do_locking)
> > {
> > struct ast_hashtab *ht;
> >
>
> This hunk removes the documentation of the arguments... was this
> intended? They should be put back, and using Doxygen syntax as the
> coding guidelines mandate.
I suppose the documentation goes in the associated header file.
But while we are on the subject, i'd really use a typedef for the
various function pointers involved - having function prototypes
as arguments of a function is really horrible C.
cheers
luigi
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev