RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  j...@rpm5.org
  Module: rpm                              Date:   01-Jun-2009 15:40:29
  Branch: HEAD                             Handle: 2009060113402701

  Modified files:
    rpm                     CHANGES
    rpm/build               librpmbuild.vers rpmbuild.h rpmspec.h spec.c

  Log:
    - replace freeSpec/freePackage with defines, eliminate symbols in ABI.

  Summary:
    Revision    Changes     Path
    1.3008      +1  -0      rpm/CHANGES
    1.4         +0  -2      rpm/build/librpmbuild.vers
    2.101       +15 -12     rpm/build/rpmbuild.h
    2.83        +13 -10     rpm/build/rpmspec.h
    2.203       +6  -15     rpm/build/spec.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.3007 -r1.3008 CHANGES
  --- rpm/CHANGES       1 Jun 2009 13:27:55 -0000       1.3007
  +++ rpm/CHANGES       1 Jun 2009 13:40:27 -0000       1.3008
  @@ -1,5 +1,6 @@
   
   5.2b1 -> 5.3a1
  +    - jbj: replace freeSpec/freePackage with defines, eliminate symbols in 
ABI.
       - rse: upgrade build environment to GNU automake 1.11 and GNU m4 1.4.13
       - jbj: performance tweaks.
       - jbj: change default dep whiteout to ensure filessystem before setup.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/librpmbuild.vers
  ============================================================================
  $ cvs diff -u -r1.3 -r1.4 librpmbuild.vers
  --- rpm/build/librpmbuild.vers        30 May 2009 14:06:00 -0000      1.3
  +++ rpm/build/librpmbuild.vers        1 Jun 2009 13:40:28 -0000       1.4
  @@ -10,9 +10,7 @@
       doScript;
       _fini;
       freeNames;
  -    freePackage;
       freePackages;
  -    freeSpec;
       getBuildTime;
       getGidS;
       getGname;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/rpmbuild.h
  ============================================================================
  $ cvs diff -u -r2.100 -r2.101 rpmbuild.h
  --- rpm/build/rpmbuild.h      18 Jan 2009 17:19:58 -0000      2.100
  +++ rpm/build/rpmbuild.h      1 Jun 2009 13:40:28 -0000       2.101
  @@ -410,15 +410,6 @@
                internalState @*/;
   
   /** \ingroup rpmbuild
  - * Create and initialize package control structure.
  - * @param spec               spec file control structure
  - * @return           package control structure
  - */
  -/*...@only@*/
  -Package newPackage(Spec spec)
  -     /*...@modifies spec->packages, spec->packages->next @*/;
  -
  -/** \ingroup rpmbuild
    * Destroy all packages associated with spec file.
    * @param packages   package control structure chain
    * @return           NULL
  @@ -429,14 +420,26 @@
        /*...@modifies packages, fileSystem @*/;
   
   /** \ingroup rpmbuild
  - * Destroy package control structure.
  + * Destroy a package control structure.
  + * @todo Rename to pkgFree.
    * @param pkg                package control structure
  - * @return           NULL
  + * @return           NULL on last dereference
    */
   /*...@null@*/
  -Package  freePackage(/*...@only@*/ /*...@null@*/ Package pkg)
  +Package freePackage(/*...@killref@*/ /*...@null@*/ Package pkg)
        /*...@globals fileSystem @*/
        /*...@modifies pkg, fileSystem @*/;
  +#define      freePackage(_pkg)       \
  +    ((Package)rpmioFreePoolItem((rpmioItem)(_pkg), __FUNCTION__, __FILE__, 
__LINE__))
  +
  +/** \ingroup rpmbuild
  + * Create and initialize package control structure.
  + * @param spec               spec file control structure
  + * @return           package control structure
  + */
  +/*...@only@*/
  +Package newPackage(Spec spec)
  +     /*...@modifies spec->packages, spec->packages->next @*/;
   
   /** \ingroup rpmbuild
    * Add dependency to header, filtering duplicates.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/rpmspec.h
  ============================================================================
  $ cvs diff -u -r2.82 -r2.83 rpmspec.h
  --- rpm/build/rpmspec.h       30 May 2009 19:41:58 -0000      2.82
  +++ rpm/build/rpmspec.h       1 Jun 2009 13:40:28 -0000       2.83
  @@ -247,6 +247,19 @@
   #endif
   
   /** \ingroup rpmbuild
  + * Destroy a spec file control structure.
  + * @todo Rename to specFree.
  + * @param spec               spec file control structure
  + * @return           NULL on last dereference
  + */
  +/*...@null@*/
  +Spec freeSpec(/*...@killref@*/ /*...@null@*/ Spec spec)
  +     /*...@globals fileSystem, internalState @*/
  +     /*...@modifies spec, fileSystem, internalState @*/;
  +#define      freeSpec(_spec) \
  +    ((Spec)rpmioFreePoolItem((rpmioItem)(_spec), __FUNCTION__, __FILE__, 
__LINE__))
  +
  +/** \ingroup rpmbuild
    * Create and initialize Spec structure.
    * @return spec              spec file control structure
    */
  @@ -256,16 +269,6 @@
        /*...@modifies rpmGlobalMacroContext, internalState @*/;
   
   /** \ingroup rpmbuild
  - * Destroy Spec structure.
  - * @param spec               spec file control structure
  - * @return           NULL always
  - */
  -/*...@null@*/
  -Spec freeSpec(/*...@only@*/ /*...@null@*/ Spec spec)
  -     /*...@globals fileSystem, internalState @*/
  -     /*...@modifies spec, fileSystem, internalState @*/;
  -
  -/** \ingroup rpmbuild
    * Function to query spec file(s).
    * @param ts         transaction set
    * @param qva                parsed query/verify options
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/spec.c
  ============================================================================
  $ cvs diff -u -r2.202 -r2.203 spec.c
  --- rpm/build/spec.c  30 May 2009 19:41:58 -0000      2.202
  +++ rpm/build/spec.c  1 Jun 2009 13:40:28 -0000       2.203
  @@ -147,12 +147,6 @@
       return ((lastp == NULL) ? RPMRC_FAIL : RPMRC_OK);
   }
   
  -Package freePackage(Package pkg)
  -{
  -    (void)rpmioFreePoolItem((rpmioItem)pkg, __FUNCTION__, __FILE__, 
__LINE__);
  -    return NULL;
  -}
  -
   static void pkgFini(void * _pkg)
        /*...@modifies _pkg @*/
   {
  @@ -551,12 +545,6 @@
       return _free(st);
   }
   
  -Spec freeSpec(Spec spec)
  -{
  -    (void)rpmioFreePoolItem((rpmioItem)spec, __FUNCTION__, __FILE__, 
__LINE__);
  -    return NULL;
  -}
  -
   static void specFini(void * _spec)
        /*...@modifies _spec @*/
   {
  @@ -649,6 +637,8 @@
   
   Spec newSpec(void)
   {
  +    static const char _spec_line_buffer_size[] =
  +     "%{?_spec_line_buffer_size}%{!?_spec_line_buffer_size:100000}";
       Spec spec = specGetPool(_specPool);
       
       spec->specFile = NULL;
  @@ -657,13 +647,14 @@
       spec->st = newSt();
   
       spec->fileStack = NULL;
  -    spec->lbuf_len = 
(size_t)rpmExpandNumeric("%{?_spec_line_buffer_size}%{!?_spec_line_buffer_size:100000}");
  -    spec->lbuf = (char *)xcalloc(1, spec->lbuf_len);
  +    spec->lbuf_len = (size_t)rpmExpandNumeric(_spec_line_buffer_size);
  +    spec->lbuf = (char *)xmalloc(spec->lbuf_len);
  +    spec->lbuf[0] = '\0';
       spec->line = spec->lbuf;
       spec->nextline = NULL;
       spec->nextpeekc = '\0';
       spec->lineNum = 0;
  -    spec->readStack = xcalloc(1, sizeof(*spec->readStack));
  +    spec->readStack = xmalloc(sizeof(*spec->readStack));
       spec->readStack->next = NULL;
       spec->readStack->reading = 1;
   
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to