diff --git a/include/xbps.h.in b/include/xbps.h.in index ac34121c..f5a1a8fb 100644 --- a/include/xbps.h.in +++ b/include/xbps.h.in @@ -48,7 +48,7 @@ * * This header documents the full API for the XBPS Library. */ -#define XBPS_API_VERSION "20140912" +#define XBPS_API_VERSION "20140913" #ifndef XBPS_VERSION #define XBPS_VERSION "UNSET" @@ -1592,6 +1592,28 @@ int xbps_set_pkg_state_dictionary(xbps_dictionary_t dict, pkg_state_t state); /** @addtogroup util */ /*@{*/ +/** + * Removes a string object matching \a pkgname in + * the \a array array of strings. + * + * @param[in] array Proplib array of strings. + * @param[in] pkgname pkgname string object to remove. + * + * @return true on success, false otherwise. + */ +bool xbps_remove_pkgname_from_array(xbps_array_t array, const char *pkgname); + +/** + * Removes a string object matching \a str in the + * \a array array of strings. + * + * @param[in] array Proplib array of strings. + * @param[in] str string object to remove. + * + * @return true on success, false otherwise. + */ +bool xbps_remove_string_from_array(xbps_array_t array, const char *str); + /** * Creates a directory (and required components if necessary). * diff --git a/include/xbps_api_impl.h b/include/xbps_api_impl.h index b1d0201e..83dfff55 100644 --- a/include/xbps_api_impl.h +++ b/include/xbps_api_impl.h @@ -126,8 +126,6 @@ int HIDDEN xbps_array_replace_dict_by_pattern(xbps_array_t, bool HIDDEN xbps_remove_pkg_from_array_by_name(xbps_array_t, const char *); bool HIDDEN xbps_remove_pkg_from_array_by_pattern(xbps_array_t, const char *); bool HIDDEN xbps_remove_pkg_from_array_by_pkgver(xbps_array_t, const char *); -bool HIDDEN xbps_remove_pkgname_from_array(xbps_array_t, const char *); -bool HIDDEN xbps_remove_string_from_array(xbps_array_t, const char *); /** * @private diff --git a/lib/plist_remove.c b/lib/plist_remove.c index 5ec65a59..0f0d77fe 100644 --- a/lib/plist_remove.c +++ b/lib/plist_remove.c @@ -104,13 +104,13 @@ remove_obj_from_array(xbps_array_t array, const char *str, int mode) return true; } -bool HIDDEN +bool xbps_remove_string_from_array(xbps_array_t array, const char *str) { return remove_obj_from_array(array, str, 0); } -bool HIDDEN +bool xbps_remove_pkgname_from_array(xbps_array_t array, const char *str) { return remove_obj_from_array(array, str, 1);