libpkgconf: path: make pkgconf_path_match_list() take a const list argument

pull/109/head
William Pitcock 2016-12-21 19:50:05 -06:00
parent ef27db944a
commit f6b074f267
3 changed files with 4 additions and 6 deletions

View File

@ -34,7 +34,7 @@ variables.
:return: number of path nodes added to the path list :return: number of path nodes added to the path list
:rtype: size_t :rtype: size_t
.. c:function:: bool pkgconf_path_match_list(const char *path, pkgconf_list_t *dirlist) .. c:function:: bool pkgconf_path_match_list(const char *path, const pkgconf_list_t *dirlist)
Checks whether a path has a matching prefix in a path list. Checks whether a path has a matching prefix in a path list.

View File

@ -136,10 +136,8 @@ struct pkgconf_client_ {
pkgconf_list_t dir_list; pkgconf_list_t dir_list;
pkgconf_list_t pkg_cache; pkgconf_list_t pkg_cache;
#ifdef XXX_NOTYET
pkgconf_list_t filter_libdirs; pkgconf_list_t filter_libdirs;
pkgconf_list_t filter_includedirs; pkgconf_list_t filter_includedirs;
#endif
pkgconf_list_t global_vars; pkgconf_list_t global_vars;
@ -274,7 +272,7 @@ void pkgconf_audit_log_dependency(pkgconf_client_t *client, const pkgconf_pkg_t
void pkgconf_path_add(const char *text, pkgconf_list_t *dirlist); void pkgconf_path_add(const char *text, pkgconf_list_t *dirlist);
size_t pkgconf_path_split(const char *text, pkgconf_list_t *dirlist); size_t pkgconf_path_split(const char *text, pkgconf_list_t *dirlist);
size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist); size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist);
bool pkgconf_path_match_list(const char *path, pkgconf_list_t *dirlist); bool pkgconf_path_match_list(const char *path, const pkgconf_list_t *dirlist);
void pkgconf_path_free(pkgconf_list_t *dirlist); void pkgconf_path_free(pkgconf_list_t *dirlist);
#endif #endif

View File

@ -114,7 +114,7 @@ pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgco
/* /*
* !doc * !doc
* *
* .. c:function:: bool pkgconf_path_match_list(const char *path, pkgconf_list_t *dirlist) * .. c:function:: bool pkgconf_path_match_list(const char *path, const pkgconf_list_t *dirlist)
* *
* Checks whether a path has a matching prefix in a path list. * Checks whether a path has a matching prefix in a path list.
* *
@ -124,7 +124,7 @@ pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgco
* :rtype: bool * :rtype: bool
*/ */
bool bool
pkgconf_path_match_list(const char *path, pkgconf_list_t *dirlist) pkgconf_path_match_list(const char *path, const pkgconf_list_t *dirlist)
{ {
pkgconf_node_t *n = NULL; pkgconf_node_t *n = NULL;