On Mar 26, 2009, at 10:29 AM, Pinto Elia wrote:

 Index: rpm/build/pack.c
= = = = = = ======================================================================
 $ cvs diff -u -r2.308 -r2.309 pack.c
 --- rpm/build/pack.c   26 Mar 2009 13:51:39 -0000      2.308
 +++ rpm/build/pack.c   26 Mar 2009 14:29:29 -0000      2.309
 @@ -28,6 +28,10 @@

  #include "debug.h"

 +#define rpmtsfree() rpmioFreePoolItem()
 +#define headerFree() rpmioFreePoolItem()
 +
 +

These need to be slightly more complicated (but its
ultimately still a #define):

Here's rpmgiFree() from lib/rpmgi.h:

/** Destroy a generalized iterator.
 * @param gi            generalized iterator
 * @return              NULL always
 */
/*...@null@*/
rpmgi rpmgiFree(/*...@killref@*/ /*...@only@*/ /*...@null@*/ rpmgi gi)
        /*...@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*...@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/;
#define rpmgiFree(_gi)  \
((rpmgi)rpmioFreePoolItem((rpmioItem)(_gi), __FUNCTION__, __FILE__, __LINE__

The only difference is the cast ...

Don't worry about the /*...@foo@*/ splint annotations, I'll fix
those later this week when I apply splint to lib/* code.

The define for headerFree() needs to be done once in rpmdb/rpmtag.h,
the corresponding define for rpmtsFree() needs to be done once in
lib/rpmts.h.

Apologies for not being precise.

73 de Jeff
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

Reply via email to