From 8d448745f053103ce3fbcf16f014cc376be8ddcf Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 25 Aug 2010 14:13:10 +0300 Subject: [PATCH] Eliminate freePackage() from librpmbuild API - 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 | 7 ------- build/spec.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/build/rpmbuild.h b/build/rpmbuild.h index 7d37d8f..dd4c84f 100644 --- a/build/rpmbuild.h +++ b/build/rpmbuild.h @@ -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 diff --git a/build/spec.c b/build/spec.c index 23e1ab8..84d1c84 100644 --- a/build/spec.c +++ b/build/spec.c @@ -142,7 +142,7 @@ Package newPackage(rpmSpec spec) return p; } -Package freePackage(Package pkg) +static Package freePackage(Package pkg) { if (pkg == NULL) return NULL; -- 2.7.4