diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2012-11-29 05:40:40 -0800 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2012-12-03 07:02:27 -0800 |
commit | e8086bc54fa0f9e2e5f10408cfccbcba8ba9b434 (patch) | |
tree | d7b94198accfc22629523a91faa235b812bc8e2c /pkg.h | |
parent | d6337ec9861f9f32d484159014f921e97fbcb264 (diff) | |
download | pkg-config-e8086bc54fa0f9e2e5f10408cfccbcba8ba9b434.tar.gz |
Convert to doubly-linked GList
Using a doubly-linked list allows it to be easily traversed in both
directions and makes removing nodes in place much simpler. This adds an
extra pointer to each node and associated manipulation during any list
processing, but this trade seems acceptable over the repeated hacks to
work with singly-linked lists.
Diffstat (limited to 'pkg.h')
-rw-r--r-- | pkg.h | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -64,18 +64,18 @@ struct _Package char *description; char *url; char *pcfiledir; /* directory it was loaded from */ - GSList *requires_entries; - GSList *requires; - GSList *requires_private_entries; - GSList *requires_private; - GSList *l_libs; - GSList *L_libs; - GSList *other_libs; - GSList *I_cflags; - GSList *other_cflags; + GList *requires_entries; + GList *requires; + GList *requires_private_entries; + GList *requires_private; + GList *l_libs; + GList *L_libs; + GList *other_libs; + GList *I_cflags; + GList *other_cflags; GHashTable *vars; GHashTable *required_versions; /* hash from name to RequiredVersion */ - GSList *conflicts; /* list of RequiredVersion */ + GList *conflicts; /* list of RequiredVersion */ gboolean uninstalled; /* used the -uninstalled file */ 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 */ @@ -84,11 +84,11 @@ struct _Package Package *get_package (const char *name); Package *get_package_quiet (const char *name); -char * packages_get_flags (GSList *pkgs, +char * packages_get_flags (GList *pkgs, FlagType flags); char * package_get_var (Package *pkg, const char *var); -char * packages_get_var (GSList *pkgs, +char * packages_get_var (GList *pkgs, const char *var); void add_search_dir (const char *path); |