Eliminate freePackage() from librpmbuild API
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 25 Aug 2010 11:13:10 +0000 (14:13 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 25 Aug 2010 11:13:10 +0000 (14:13 +0300)
- The only thing that should ever call this is freePackages() which
  was already made static. As newPackage() links the package structure
  with the spec, its not safe for others to call it.

build/rpmbuild.h
build/spec.c

index 7d37d8f..dd4c84f 100644 (file)
@@ -284,13 +284,6 @@ rpmRC lookupPackage(rpmSpec spec, const char * name, int flag,
 Package newPackage(rpmSpec spec);
 
 /** \ingroup rpmbuild
- * Destroy package control structure.
- * @param pkg          package control structure
- * @return             NULL
- */
-Package  freePackage(Package pkg);
-
-/** \ingroup rpmbuild
  * Add dependency to header, filtering duplicates.
  * @param spec         spec file control structure
  * @param h            header
index 23e1ab8..84d1c84 100644 (file)
@@ -142,7 +142,7 @@ Package newPackage(rpmSpec spec)
     return p;
 }
 
-Package freePackage(Package pkg)
+static Package freePackage(Package pkg)
 {
     if (pkg == NULL) return NULL;