[PATCH 1/4] Make sure recursion only happens with requires

Dan Nicholson dbn.lists at gmail.com
Tue May 29 23:05:43 PDT 2012


The function recursive_fill_list() is designed to descend lists of
packages, so it only makes sense to use with Requires and
Requires.private. Ensure it to make later code additions simpler.
---
 pkg.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/pkg.c b/pkg.c
index 9695e3e..5628686 100644
--- a/pkg.c
+++ b/pkg.c
@@ -574,6 +574,12 @@ recursive_fill_list (Package *pkg, GetListFunc func, GSList **listp)
 {
   GSList *tmp;
 
+  /*
+   * This function should only be called to resolve Requires or
+   * Requires.private.
+   */
+  g_assert (func == get_requires || func == get_requires_private);
+
   fill_one_level (pkg, func, listp);
   
   tmp = (*func) (pkg);
-- 
1.7.7.6



More information about the pkg-config mailing list