RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/rpmdb/ header.c header.h header_internal.h

From: Jeff Johnson <jbj@rpm5.org>
Date: Sat 20 Oct 2007 - 16:39:44 CEST
Message-Id: <20071020143944.BCF4634845A@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:   20-Oct-2007 16:39:44
  Branch: HEAD                             Handle: 2007102015394300

  Modified files:
    rpm                     CHANGES
    rpm/rpmdb               header.c header.h header_internal.h

  Log:
    - merge rpmec into HE_t.

  Summary:
    Revision    Changes     Path
    1.1740      +1  -0      rpm/CHANGES
    1.100       +9  -8      rpm/rpmdb/header.c
    1.49        +5  -3      rpm/rpmdb/header.h
    1.25        +0  -13     rpm/rpmdb/header_internal.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1739 -r1.1740 CHANGES
  --- rpm/CHANGES	20 Oct 2007 14:09:07 -0000	1.1739
  +++ rpm/CHANGES	20 Oct 2007 14:39:43 -0000	1.1740
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - jbj: merge rpmec into HE_t.
       - jbj: not yet for binary search retrieve using tagValue.
       - jbj: unbork --yaml.
       - rpm.org: rpmpsi iterator.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/header.c
  ============================================================================
  $ cvs diff -u -r1.99 -r1.100 header.c
  --- rpm/rpmdb/header.c	20 Oct 2007 14:09:07 -0000	1.99
  +++ rpm/rpmdb/header.c	20 Oct 2007 14:39:43 -0000	1.100
  @@ -3437,18 +3437,18 @@
   	int xx;
   
   	xx = fn(hsa->h, he);
  -	ec->type = he->t;
  -	ec->data.ptr = he->p.ptr;
  -	ec->count = he->c;
  -	ec->freeit = he->freeData;
  +	ec->t = he->t;
  +	ec->p.ptr = he->p.ptr;
  +	ec->c = he->c;
  +	ec->freeData = he->freeData;
   	if (xx)
   	    return 1;
   	ec->avail = 1;
       }
   
  -    if (typeptr) *typeptr = ec->type;
  -    if (data) (*data).ptr = ec->data.ptr;
  -    if (countptr) *countptr = ec->count;
  +    if (typeptr) *typeptr = ec->t;
  +    if (data) (*data).ptr = ec->p.ptr;
  +    if (countptr) *countptr = ec->c;
   
       return 0;
   }
  @@ -3871,7 +3871,8 @@
       for (ext = exts, extNum = 0; ext != NULL && ext->type != HEADER_EXT_LAST;
   	ext = (ext->type == HEADER_EXT_MORE ? ext->u.more : ext+1), extNum++)
       {
  -	if (ec[extNum].freeit) ec[extNum].data.ptr = _free(ec[extNum].data.ptr);
  +	if (ec[extNum].freeData)
  +	    ec[extNum].p.ptr = _free(ec[extNum].p.ptr);
       }
   
       ec = _free(ec);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/header.h
  ============================================================================
  $ cvs diff -u -r1.48 -r1.49 header.h
  --- rpm/rpmdb/header.h	19 Oct 2007 19:03:11 -0000	1.48
  +++ rpm/rpmdb/header.h	20 Oct 2007 14:39:43 -0000	1.49
  @@ -177,15 +177,17 @@
   struct _HE_s {
       int_32 tag;
       rpmTagType t;
  -/*@null@*/
  +/*@owned@*/ /*@null@*/
       rpmTagData p;
       rpmTagCount c;
  -    int freeData;
       int ix;
  +    unsigned int freeData	: 1;
  +    unsigned int avail		: 1;
   };
   typedef struct _HE_s HE_s;
   #endif
  -typedef HE_s * HE_t;
  +typedef HE_s * HE_t;		/* tag container. */
  +typedef /*@abstract@*/ HE_s * rpmec;		/* Extension Cache entry. */
   /*@=typeuse =fielduse@*/
   
   /** \ingroup header
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/header_internal.h
  ============================================================================
  $ cvs diff -u -r1.24 -r1.25 header_internal.h
  --- rpm/rpmdb/header_internal.h	19 Oct 2007 23:44:35 -0000	1.24
  +++ rpm/rpmdb/header_internal.h	20 Oct 2007 14:39:43 -0000	1.25
  @@ -125,19 +125,6 @@
   };
   
   /** \ingroup header
  - * Extension cache.
  - */
  -typedef /*@abstract@*/ struct rpmec_s * rpmec;
  -struct rpmec_s {
  -    rpmTagType type;
  -    int_32 count;
  -    int avail;
  -    int freeit;
  -/*@owned@*/
  -    hRET_t data;
  -};
  -
  -/** \ingroup header
    */
   typedef /*@abstract@*/ struct sprintfToken_s * sprintfToken;
   /*@-fielduse@*/
  @@ .
Received on Sat Oct 20 16:39:44 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.