summaryrefslogtreecommitdiff
path: root/pkg.h
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2013-01-16 16:42:48 -0800
committerDan Nicholson <dbn.lists@gmail.com>2013-01-16 16:42:48 -0800
commitae2fef2c05bd7e875b4a84e584a183b027f53356 (patch)
treeac9103061515fa1f67d89e000bad89df34bf738c /pkg.h
parent4dac402b18f00cb9bf74b21631a073ae7acb04fc (diff)
downloadpkg-config-ae2fef2c05bd7e875b4a84e584a183b027f53356.tar.gz
Greatly simplify circular Requires checking
Instead of keeping of list of packages in the current Requires chain and searching it repeatedly, just mark each package as part of the chain or not. This nearly cuts in half the time on a particularly rough torture test I have.
Diffstat (limited to 'pkg.h')
-rw-r--r--pkg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg.h b/pkg.h
index e12aab2..5ead2a6 100644
--- a/pkg.h
+++ b/pkg.h
@@ -80,6 +80,7 @@ struct _Package
int path_position; /* used to order packages by position in path of their .pc file, lower number means earlier in path */
int libs_num; /* Number of times the "Libs" header has been seen */
int libs_private_num; /* Number of times the "Libs.private" header has been seen */
+ gboolean in_requires_chain; /* package is in current Requires chain */
};
Package *get_package (const char *name);