RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES TODO rpm/lib/ package.c rpm/rpmdb/ hdrinline.h...

From: Jeff Johnson <jbj@rpm5.org>
Date: Fri 23 Nov 2007 - 01:29:48 CET
Message-Id: <20071123002948.5309234845F@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: rpm                              Date:   23-Nov-2007 01:29:48
  Branch: HEAD                             Handle: 2007112300294700

  Modified files:
    rpm                     CHANGES TODO
    rpm/lib                 package.c
    rpm/rpmdb               hdrinline.h header.c header.h header_internal.h
                            rpmtag.h tagname.c

  Log:
    - hmm, a memory leak, add doco to the TODO file.
    - eliminate hTAG_t, use "rpmTag *" instead.
    - drill rpmTag everywhere needed in header methods.

  Summary:
    Revision    Changes     Path
    1.1871      +3  -0      rpm/CHANGES
    1.23        +16 -0      rpm/TODO
    2.192       +3  -0      rpm/lib/package.c
    1.38        +10 -10     rpm/rpmdb/hdrinline.h
    1.128       +15 -15     rpm/rpmdb/header.c
    1.72        +11 -11     rpm/rpmdb/header.h
    1.35        +4  -4      rpm/rpmdb/header_internal.h
    1.6         +26 -27     rpm/rpmdb/rpmtag.h
    1.15        +6  -6      rpm/rpmdb/tagname.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1870 -r1.1871 CHANGES
  --- rpm/CHANGES	22 Nov 2007 22:28:13 -0000	1.1870
  +++ rpm/CHANGES	23 Nov 2007 00:29:47 -0000	1.1871
  @@ -1,4 +1,7 @@
   5.0a2 -> 5.0a3:
  +    - jbj: hmm, a memory leak, add doco to the TODO file.
  +    - jbj: eliminate hTAG_t, use "rpmTag *" instead.
  +    - jbj: drill rpmTag everywhere needed in header methods.
       - jbj: unsnarl header.h from everything else.
       - jbj: eliminate hRET_t, use rpmTagData instead.
       - jbj: fix: files.c: pass union ptr, not 1st element, address.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/TODO
  ============================================================================
  $ cvs diff -u -r1.22 -r1.23 TODO
  --- rpm/TODO	21 Nov 2007 13:31:37 -0000	1.22
  +++ rpm/TODO	23 Nov 2007 00:29:47 -0000	1.23
  @@ -70,6 +70,22 @@
       - jbj: choose between db-4.5.20 and db-4.6.18. db-4.5.20 may have fewer
   	upgrade/downgrade issues because of the db-4.6.18 DB_HASH change,
   	but rpm-5.0 already uses DB_BTREE for Packages.
  +    - jbj: this memory leak seen with "valgrind rpm -qa" no idea what pkg yet:
  +	==5186== 112 bytes in 16 blocks are definitely lost in loss record 2 of 2
  +	==5186==    at 0x4805525: malloc (vg_replace_malloc.c:149)
  +	==5186==    by 0x48E3923: formatValue (header.c:3403)
  +	==5186==    by 0x48E3FAB: singleSprintf (header.c:3557)
  +	==5186==    by 0x48E4C1E: headerSprintf (header.c:3872)
  +	==5186==    by 0x487C075: headerSprintf (hdrinline.h:515)
  +	==5186==    by 0x487BFFB: queryHeader (query.c:118)
  +	==5186==    by 0x487B4A9: showQueryPackage (query.c:162)
  +	==5186==    by 0x487C29D: rpmgiShowMatches (query.c:410)
  +	==5186==    by 0x487C48D: rpmQueryVerify (query.c:475)
  +	==5186==    by 0x487D4AC: rpmcliArgIter (query.c:739)
  +	==5186==    by 0x487DB08: rpmcliQuery (query.c:855)
  +	==5186==    by 0x46F9: main (rpmqv.c:738)
  +    - jbj: rpm-5.0 is almost compilation warning free, some effort to remove
  +	the Mickey Mouse warnings that remain should be undertaken.
   
     o to be resolved before RPM 5.0.0:
       - rse: NEWS polishing
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/package.c
  ============================================================================
  $ cvs diff -u -r2.191 -r2.192 package.c
  --- rpm/lib/package.c	22 Nov 2007 19:27:14 -0000	2.191
  +++ rpm/lib/package.c	23 Nov 2007 00:29:47 -0000	2.192
  @@ -239,6 +239,9 @@
   /*@=noeffect@*/
   
       switch (she->tag) {
  +    default:	/* XXX keep gcc quiet. */
  +assert(0);
  +	/*@notreached@*/ break;
       case RPMSIGTAG_RSA:
   	/* Parse the parameters from the OpenPGP packets that will be needed. */
   	xx = pgpPrtPkts(she->p.ptr, she->c, dig, (_print_pkts & rpmIsDebug()));
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/hdrinline.h
  ============================================================================
  $ cvs diff -u -r1.37 -r1.38 hdrinline.h
  --- rpm/rpmdb/hdrinline.h	22 Nov 2007 19:50:18 -0000	1.37
  +++ rpm/rpmdb/hdrinline.h	23 Nov 2007 00:29:47 -0000	1.38
  @@ -198,7 +198,7 @@
    * @return		1 on success, 0 on failure
    */
   /*@unused@*/ static inline
  -int headerIsEntry(/*@null@*/ Header h, uint32_t tag)
  +int headerIsEntry(/*@null@*/ Header h, rpmTag tag)
   	/*@modifies h @*/
   {
       /*@-abstract@*/
  @@ -361,7 +361,7 @@
    * @return		1 on success, 0 on failure
    */
   /*@unused@*/ static inline
  -int headerGetEntry(Header h, uint32_t tag,
  +int headerGetEntry(Header h, rpmTag tag,
   			/*@null@*/ /*@out@*/ rpmTagType * type,
   			/*@null@*/ /*@out@*/ rpmTagData * p,
   			/*@null@*/ /*@out@*/ rpmTagCount * c)
  @@ -387,7 +387,7 @@
    */
   /*@mayexit@*/
   /*@unused@*/ static inline
  -int headerAddEntry(Header h, uint32_t tag, rpmTagType type,
  +int headerAddEntry(Header h, rpmTag tag, rpmTagType type,
   		const void * p, rpmTagCount c)
   	/*@modifies h @*/
   {
  @@ -407,7 +407,7 @@
    * @return		1 on success, 0 on failure
    */
   /*@unused@*/ static inline
  -int headerAppendEntry(Header h, uint32_t tag, rpmTagType type,
  +int headerAppendEntry(Header h, rpmTag tag, rpmTagType type,
   		const void * p, rpmTagCount c)
   	/*@modifies h @*/
   {
  @@ -425,7 +425,7 @@
    * @return		1 on success, 0 on failure
    */
   /*@unused@*/ static inline
  -int headerAddOrAppendEntry(Header h, uint32_t tag, rpmTagType type,
  +int headerAddOrAppendEntry(Header h, rpmTag tag, rpmTagType type,
   		const void * p, rpmTagCount c)
   	/*@modifies h @*/
   {
  @@ -453,7 +453,7 @@
    * @return		1 on success, 0 on failure
    */
   /*@unused@*/ static inline
  -int headerAddI18NString(Header h, uint32_t tag, const char * string,
  +int headerAddI18NString(Header h, rpmTag tag, const char * string,
   		const char * lang)
   	/*@modifies h @*/
   {
  @@ -471,7 +471,7 @@
    * @return		1 on success, 0 on failure
    */
   /*@unused@*/ static inline
  -int headerModifyEntry(Header h, uint32_t tag, rpmTagType type,
  +int headerModifyEntry(Header h, rpmTag tag, rpmTagType type,
   			const void * p, rpmTagCount c)
   	/*@modifies h @*/
   {
  @@ -488,7 +488,7 @@
    * @return		0 on success, 1 on failure (INCONSISTENT)
    */
   /*@unused@*/ static inline
  -int headerRemoveEntry(Header h, uint32_t tag)
  +int headerRemoveEntry(Header h, rpmTag tag)
   	/*@modifies h @*/
   {
       return (h2hv(h)->hdrremove) (h, tag);
  @@ -522,7 +522,7 @@
    * @param tagstocopy	array of tags that are copied
    */
   /*@unused@*/ static inline
  -void headerCopyTags(Header headerFrom, Header headerTo, hTAG_t tagstocopy)
  +void headerCopyTags(Header headerFrom, Header headerTo, rpmTag * tagstocopy)
   	/*@modifies headerFrom, headerTo @*/
   {
   /*@-noeffectuncon@*/ /* FIX: add rc */
  @@ -566,7 +566,7 @@
    */
   /*@unused@*/ static inline
   int headerNextIterator(HeaderIterator hi,
  -		/*@null@*/ /*@out@*/ hTAG_t tag,
  +		/*@null@*/ /*@out@*/ rpmTag * tag,
   		/*@null@*/ /*@out@*/ rpmTagType * type,
   		/*@null@*/ /*@out@*/ rpmTagData * p,
   		/*@null@*/ /*@out@*/ rpmTagCount * c)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/header.c
  ============================================================================
  $ cvs diff -u -r1.127 -r1.128 header.c
  --- rpm/rpmdb/header.c	22 Nov 2007 22:28:17 -0000	1.127
  +++ rpm/rpmdb/header.c	23 Nov 2007 00:29:47 -0000	1.128
  @@ -923,7 +923,7 @@
    * @return 		header entry
    */
   static /*@null@*/
  -indexEntry findEntry(/*@null@*/ Header h, uint32_t tag, rpmTagType type)
  +indexEntry findEntry(/*@null@*/ Header h, rpmTag tag, rpmTagType type)
   	/*@modifies h @*/
   {
       indexEntry entry, entry2, last;
  @@ -971,7 +971,7 @@
    * @return		0 on success, 1 on failure (INCONSISTENT)
    */
   static
  -int headerRemoveEntry(Header h, uint32_t tag)
  +int headerRemoveEntry(Header h, rpmTag tag)
   	/*@modifies h @*/
   {
       indexEntry last = h->index + h->indexUsed;
  @@ -1370,7 +1370,7 @@
    * @return		1 on success, 0 on failure
    */
   static
  -int headerIsEntry(/*@null@*/Header h, uint32_t tag)
  +int headerIsEntry(/*@null@*/Header h, rpmTag tag)
   	/*@*/
   {
       /*@-mods@*/		/*@ FIX: h modified by sort. */
  @@ -1637,7 +1637,7 @@
    * @param minMem	string pointers reference header memory?
    * @return		1 on success, 0 on not found
    */
  -static int intGetEntry(Header h, uint32_t tag,
  +static int intGetEntry(Header h, rpmTag tag,
   		/*@null@*/ /*@out@*/ rpmTagType * type,
   		/*@null@*/ /*@out@*/ rpmTagData * p,
   		/*@null@*/ /*@out@*/ rpmTagCount * c,
  @@ -1709,7 +1709,7 @@
    * @return		1 on success, 0 on failure
    */
   static
  -int headerGetExtension(Header h, uint32_t tag,
  +int headerGetExtension(Header h, rpmTag tag,
   			/*@null@*/ /*@out@*/ rpmTagType * type,
   			/*@null@*/ /*@out@*/ rpmTagData * p,
   			/*@null@*/ /*@out@*/ rpmTagCount * c)
  @@ -1814,7 +1814,7 @@
    * @return		1 on success, 0 on failure
    */
   static
  -int headerGetEntry(Header h, uint32_t tag,
  +int headerGetEntry(Header h, rpmTag tag,
   			/*@null@*/ /*@out@*/ rpmTagType * type,
   			/*@null@*/ /*@out@*/ rpmTagData * p,
   			/*@null@*/ /*@out@*/ rpmTagCount * c)
  @@ -1901,7 +1901,7 @@
    * @return		1 on success, 0 on failure
    */
   static
  -int headerAddEntry(Header h, uint32_t tag, rpmTagType type, const void * p, rpmTagCount c)
  +int headerAddEntry(Header h, rpmTag tag, rpmTagType type, const void * p, rpmTagCount c)
   	/*@modifies h @*/
   {
       indexEntry entry;
  @@ -1958,7 +1958,7 @@
    * @return		1 on success, 0 on failure
    */
   static
  -int headerAppendEntry(Header h, uint32_t tag, rpmTagType type,
  +int headerAppendEntry(Header h, rpmTag tag, rpmTagType type,
   		const void * p, rpmTagCount c)
   	/*@modifies h @*/
   {
  @@ -2009,7 +2009,7 @@
    * @return		1 on success, 0 on failure
    */
   static
  -int headerAddOrAppendEntry(Header h, uint32_t tag, rpmTagType type,
  +int headerAddOrAppendEntry(Header h, rpmTag tag, rpmTagType type,
   		const void * p, rpmTagCount c)
   	/*@modifies h @*/
   {
  @@ -2039,7 +2039,7 @@
    * @return		1 on success, 0 on failure
    */
   static
  -int headerAddI18NString(Header h, uint32_t tag, const char * string,
  +int headerAddI18NString(Header h, rpmTag tag, const char * string,
   		const char * lang)
   	/*@modifies h @*/
   {
  @@ -2185,7 +2185,7 @@
    * @return		1 on success, 0 on failure
    */
   static
  -int headerModifyEntry(Header h, uint32_t tag, rpmTagType type,
  +int headerModifyEntry(Header h, rpmTag tag, rpmTagType type,
   			const void * p, rpmTagCount c)
   	/*@modifies h @*/
   {
  @@ -2379,7 +2379,7 @@
    */
   static
   int headerNextIterator(HeaderIterator hi,
  -		/*@null@*/ /*@out@*/ hTAG_t tag,
  +		/*@null@*/ /*@out@*/ rpmTag * tag,
   		/*@null@*/ /*@out@*/ rpmTagType * type,
   		/*@null@*/ /*@out@*/ rpmTagData * p,
   		/*@null@*/ /*@out@*/ rpmTagCount * c)
  @@ -3627,7 +3627,7 @@
   		hsa->vallen += (te - t);
   	    }
   	    if (isyaml) {
  -		uint32_t tagT = 0;
  +		rpmTag tagT = 0;
   		const char * tagN = myTagName(hsa->tags, tag->tagno, &tagT);
   		/* XXX display "Tag_0x01234567" for unknown tags. */
   		if (tagN == NULL) {
  @@ -3864,10 +3864,10 @@
    * @param tagstocopy	array of tags that are copied
    */
   static
  -void headerCopyTags(Header headerFrom, Header headerTo, hTAG_t tagstocopy)
  +void headerCopyTags(Header headerFrom, Header headerTo, rpmTag * tagstocopy)
   	/*@modifies headerTo @*/
   {
  -    uint32_t * tagno;
  +    rpmTag * tagno;
   
       if (headerFrom == headerTo)
   	return;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/header.h
  ============================================================================
  $ cvs diff -u -r1.71 -r1.72 header.h
  --- rpm/rpmdb/header.h	22 Nov 2007 22:28:17 -0000	1.71
  +++ rpm/rpmdb/header.h	23 Nov 2007 00:29:47 -0000	1.72
  @@ -273,7 +273,7 @@
    * @return		1 on success, 0 on failure
    */
   typedef
  -int (*HDRisentry) (/*@null@*/Header h, uint32_t tag)
  +int (*HDRisentry) (/*@null@*/Header h, rpmTag tag)
           /*@*/;  
   
   /** \ingroup header
  @@ -299,7 +299,7 @@
    * @return		1 on success, 0 on failure
    */
   typedef
  -int (*HDRext) (Header h, uint32_t tag,
  +int (*HDRext) (Header h, rpmTag tag,
   			/*@null@*/ /*@out@*/ rpmTagType * type,
   			/*@null@*/ /*@out@*/ rpmTagData * p,
   			/*@null@*/ /*@out@*/ rpmTagCount * c)
  @@ -319,7 +319,7 @@
    * @return		1 on success, 0 on failure
    */
   typedef
  -int (*HDRget) (Header h, uint32_t tag,
  +int (*HDRget) (Header h, rpmTag tag,
   			/*@null@*/ /*@out@*/ rpmTagType * type,
   			/*@null@*/ /*@out@*/ rpmTagData * p,
   			/*@null@*/ /*@out@*/ rpmTagCount * c)
  @@ -340,7 +340,7 @@
    * @return		1 on success, 0 on failure
    */
   typedef
  -int (*HDRadd) (Header h, uint32_t tag, rpmTagType type, const void * p, rpmTagCount c)
  +int (*HDRadd) (Header h, rpmTag tag, rpmTagType type, const void * p, rpmTagCount c)
           /*@modifies h @*/;
   
   /** \ingroup header
  @@ -356,7 +356,7 @@
    * @return		1 on success, 0 on failure
    */
   typedef
  -int (*HDRappend) (Header h, uint32_t tag, rpmTagType type, const void * p, rpmTagCount c)
  +int (*HDRappend) (Header h, rpmTag tag, rpmTagType type, const void * p, rpmTagCount c)
           /*@modifies h @*/;
   
   /** \ingroup header
  @@ -370,7 +370,7 @@
    * @return		1 on success, 0 on failure
    */
   typedef
  -int (*HDRaddorappend) (Header h, uint32_t tag, rpmTagType type, const void * p, rpmTagCount c)
  +int (*HDRaddorappend) (Header h, rpmTag tag, rpmTagType type, const void * p, rpmTagCount c)
           /*@modifies h @*/;
   
   /** \ingroup header
  @@ -394,7 +394,7 @@
    * @return		1 on success, 0 on failure
    */
   typedef
  -int (*HDRaddi18n) (Header h, uint32_t tag, const char * string,
  +int (*HDRaddi18n) (Header h, rpmTag tag, const char * string,
                   const char * lang)
           /*@modifies h @*/;
   
  @@ -409,7 +409,7 @@
    * @return		1 on success, 0 on failure
    */
   typedef
  -int (*HDRmodify) (Header h, uint32_t tag, rpmTagType type, const void * p, rpmTagCount c)
  +int (*HDRmodify) (Header h, rpmTag tag, rpmTagType type, const void * p, rpmTagCount c)
           /*@modifies h @*/;
   
   /** \ingroup header
  @@ -422,7 +422,7 @@
    * @return		0 on success, 1 on failure (INCONSISTENT)
    */
   typedef
  -int (*HDRremove) (Header h, uint32_t tag)
  +int (*HDRremove) (Header h, rpmTag tag)
           /*@modifies h @*/;
   
   /** \ingroup header
  @@ -450,7 +450,7 @@
    * @param tagstocopy	array of tags that are copied
    */
   typedef
  -void (*HDRcopytags) (Header headerFrom, Header headerTo, hTAG_t tagstocopy)
  +void (*HDRcopytags) (Header headerFrom, Header headerTo, rpmTag * tagstocopy)
   	/*@modifies headerFrom, headerTo @*/;
   
   /** \ingroup header
  @@ -482,7 +482,7 @@
    */
   typedef
   int (*HDRnextiter) (HeaderIterator hi,
  -		/*@null@*/ /*@out@*/ hTAG_t tag,
  +		/*@null@*/ /*@out@*/ rpmTag * tag,
   		/*@null@*/ /*@out@*/ rpmTagType * type,
   		/*@null@*/ /*@out@*/ rpmTagData * p,
   		/*@null@*/ /*@out@*/ rpmTagCount * c)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/header_internal.h
  ============================================================================
  $ cvs diff -u -r1.34 -r1.35 header_internal.h
  --- rpm/rpmdb/header_internal.h	22 Nov 2007 18:50:27 -0000	1.34
  +++ rpm/rpmdb/header_internal.h	23 Nov 2007 00:29:47 -0000	1.35
  @@ -53,10 +53,10 @@
    */
   typedef /*@abstract@*/ struct entryInfo_s * entryInfo;
   struct entryInfo_s {
  -    uint32_t tag;		/*!< Tag identifier. */
  -    uint32_t type;		/*!< Tag data type. */
  +    rpmTag tag;		/*!< Tag identifier. */
  +    rpmTagType type;		/*!< Tag data type. */
       int32_t offset;		/*!< Offset into data segment (ondisk only). */
  -    uint32_t count;		/*!< Number of tag elements. */
  +    rpmTagCount count;		/*!< Number of tag elements. */
   };
   
   #define	REGION_TAG_TYPE		RPM_BIN_TYPE
  @@ -116,7 +116,7 @@
   /*@null@*/
       headerTagTagFunction ext;   /*!< NULL if tag element is invalid */
       int extNum;
  -    uint32_t tagno;
  +    rpmTag tagno;
       int justOne;
       int arrayCount;
   /*@kept@*/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmtag.h
  ============================================================================
  $ cvs diff -u -r1.5 -r1.6 rpmtag.h
  --- rpm/rpmdb/rpmtag.h	22 Nov 2007 22:28:17 -0000	1.5
  +++ rpm/rpmdb/rpmtag.h	23 Nov 2007 00:29:47 -0000	1.6
  @@ -68,35 +68,15 @@
       const char * str;		/*!< RPM_STRING_TYPE */
       unsigned char * blob;	/*!< RPM_BIN_TYPE */
       const char ** argv;		/*!< RPM_STRING_ARRAY_TYPE */
  -    HE_t * he;
  +    HE_t he;
   };
   #endif
   /*@=typeuse =fielduse@*/
   
   /** \ingroup header
    */
  -typedef uint32_t *	hTAG_t;
   typedef rpmTagData *	hPTR_t;
   
  -/** \ingroup header
  - */
  -/*@-typeuse -fielduse@*/
  -#if !defined(SWIG)
  -struct _HE_s {
  -    uint32_t tag;
  -    rpmTagType t;
  -/*@owned@*/ /*@null@*/
  -    rpmTagData p;
  -    rpmTagCount c;
  -    int ix;
  -    unsigned int freeData	: 1;
  -    unsigned int avail		: 1;
  -    unsigned int append		: 1;
  -    unsigned int signature	: 1;
  -};
  -typedef struct _HE_s HE_s;
  -#endif
  -
   /*@=typeuse =fielduse@*/
   /** \ingroup header
    */
  @@ -465,6 +445,25 @@
    */
   typedef enum rpmTag_e rpmTag;
   
  +/** \ingroup header
  + */
  +/*@-typeuse -fielduse@*/
  +#if !defined(SWIG)
  +struct _HE_s {
  +    rpmTag tag;
  +    rpmTagType t;
  +/*@owned@*/ /*@null@*/
  +    rpmTagData p;
  +    rpmTagCount c;
  +    int ix;
  +    unsigned int freeData	: 1;
  +    unsigned int avail		: 1;
  +    unsigned int append		: 1;
  +    unsigned int signature	: 1;
  +};
  +typedef struct _HE_s HE_s;
  +#endif
  +
   /**
    */
   typedef /*@abstract@*/ struct headerTagTableEntry_s * headerTagTableEntry;
  @@ -481,16 +480,16 @@
       int byNameSize;			/*!< no. of entries. */
       int (*byNameCmp) (const void * avp, const void * bvp)
           /*@*/;				/*!< compare entries by name. */
  -    uint32_t (*tagValue) (const char * name)
  +    rpmTag (*tagValue) (const char * name)
   	/*@*/;				/* return value from name. */
   /*@relnull@*/
       headerTagTableEntry * byValue;	/*!< header tags sorted by value. */
       int byValueSize;			/*!< no. of entries. */
       int (*byValueCmp) (const void * avp, const void * bvp)
           /*@*/;				/*!< compare entries by value. */
  -    const char * (*tagName) (uint32_t value)
  +    const char * (*tagName) (rpmTag value)
   	/*@*/;				/* Return name from value. */
  -    uint32_t (*tagType) (uint32_t value)
  +    rpmTag (*tagType) (rpmTag value)
   	/*@*/;				/* Return type from value. */
   };
   #endif
  @@ -503,7 +502,7 @@
    */
   /*@-redecl@*/
   /*@unused@*/ static inline /*@observer@*/
  -const char * tagName(uint32_t tag)
  +const char * tagName(rpmTag tag)
   	/*@*/
   {
   /*@-type@*/
  @@ -518,7 +517,7 @@
    * @return		tag data type, RPM_NULL_TYPE on not found.
    */
   /*@unused@*/ static inline
  -unsigned int tagType(uint32_t tag)
  +unsigned int tagType(rpmTag tag)
   	/*@*/
   {
   /*@-type@*/
  @@ -532,7 +531,7 @@
    * @return		tag value, -1 on not found
    */
   /*@unused@*/ static inline
  -unsigned int tagValue(const char * tagstr)
  +rpmTag tagValue(const char * tagstr)
   	/*@*/
   {
   /*@-type@*/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/tagname.c
  ============================================================================
  $ cvs diff -u -r1.14 -r1.15 tagname.c
  --- rpm/rpmdb/tagname.c	22 Nov 2007 22:28:17 -0000	1.14
  +++ rpm/rpmdb/tagname.c	23 Nov 2007 00:29:47 -0000	1.15
  @@ -76,11 +76,11 @@
   
   
   /* forward refs */
  -static const char * _tagName(uint32_t tag)
  +static const char * _tagName(rpmTag tag)
   	/*@*/;
  -static unsigned int _tagType(uint32_t tag)
  +static unsigned int _tagType(rpmTag tag)
   	/*@*/;
  -static unsigned int _tagValue(const char * tagstr)
  +static rpmTag _tagValue(const char * tagstr)
   	/*@*/;
   
   /*@unchecked@*/
  @@ -95,7 +95,7 @@
   headerTagIndices rpmTags = &_rpmTags;
   /*@=compmempass@*/
   
  -static const char * _tagName(uint32_t tag)
  +static const char * _tagName(rpmTag tag)
   {
       static char nameBuf[128];	/* XXX yuk */
       const struct headerTagTableEntry_s *t;
  @@ -178,7 +178,7 @@
   /*@=statictrans@*/
   }
   
  -static unsigned int _tagType(uint32_t tag)
  +static unsigned int _tagType(rpmTag tag)
   {
       const struct headerTagTableEntry_s *t;
       int comparison, i, l, u;
  @@ -226,7 +226,7 @@
       return 0;
   }
   
  -static unsigned int _tagValue(const char * tagstr)
  +static rpmTag _tagValue(const char * tagstr)
   {
       const struct headerTagTableEntry_s *t;
       int comparison, i, l, u;
  @@ .
Received on Fri Nov 23 01:29:48 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.