[FFmpeg-devel] [PATCH] Doxygenate libavutil/mem.h

Stefano Sabatini stefano.sabatini-lala
Fri Sep 21 12:41:26 CEST 2007


On date Friday 2007-09-21 11:33:14 +0200, Diego Biurrun encoded:
> On Thu, Sep 20, 2007 at 08:53:44PM +0200, Stefano Sabatini wrote:
> > 
> > this patch documents the interface of the functions in
> > libavutil/mem.h.
> > 
> > Suggested log: $subject
> > 
> > --- libavutil/mem.h	(revision 10534)
> > +++ libavutil/mem.h	(working copy)
> > @@ -33,26 +33,46 @@
> >  
> > + * @return Pointer to the allocated block, NULL if it can't allocate
> > + * it.
> 
> if it cannot be allocated

Fixed this and all the following ones.

> > + * Allocates or reallocates a block of memory.
> > + * Same semantics as glibc realloc: if \p ptr is NULL and \p size > 0,
> > + * identical to malloc(size). If \p size is zero, it is identical to
> >   * free(ptr) and NULL is returned.
> 
> What is supposed to be "identical to malloc(size)"?

Changed to:
if \p ptr is NULL and \p size > 0, *it is* identical to malloc(size)

"it" meaning the function, which I believe is quite clear.

[...]
> > + * Allocates a block of \p size bytes with alignment suitable for all
> > + * memory accesses (including vectors if available on the CPU) and
> > + * sets to zero all the bytes of the block. av_mallocz(0) must return
> 
> zeroes all the bytes of the block

Fixed.

> > + * a non NULL pointer.
> 
> non-NULL 

Fixed here and in other places.

[...]
> Please avoid short forms.
[...]

Thanks for the review.

Regards.
-- 
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doxygenate-mem-h-01.patch
Type: text/x-diff
Size: 2508 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070921/8399a813/attachment.patch>



More information about the ffmpeg-devel mailing list