From 0a6299318e6629aca85c78c54e0df8d906e6161f Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 24 Feb 2011 15:48:50 +0100 Subject: [PATCH] Revert revision 581: "Inline some very common functions in the API." Some compilers yet don't support fully the inline C99 keyword and there's little benefit anyway. --- lib/plist_find.c | 22 +++++++++++----------- lib/plist_remove.c | 6 +++--- lib/repository_findpkg.c | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/plist_find.c b/lib/plist_find.c index f3a1d0fc..5d7f2819 100644 --- a/lib/plist_find.c +++ b/lib/plist_find.c @@ -72,7 +72,7 @@ find_pkg_dict_from_plist(const char *plist, return res; } -inline prop_dictionary_t +prop_dictionary_t xbps_find_pkg_dict_from_plist_by_name(const char *plist, const char *key, const char *pkgname) @@ -80,7 +80,7 @@ xbps_find_pkg_dict_from_plist_by_name(const char *plist, return find_pkg_dict_from_plist(plist, key, pkgname, false); } -inline prop_dictionary_t +prop_dictionary_t xbps_find_pkg_dict_from_plist_by_pattern(const char *plist, const char *key, const char *pattern) @@ -152,13 +152,13 @@ find_pkg_in_array(prop_array_t array, const char *str, bool bypattern) return obj; } -inline prop_dictionary_t +prop_dictionary_t xbps_find_pkg_in_array_by_name(prop_array_t array, const char *name) { return find_pkg_in_array(array, name, false); } -inline prop_dictionary_t +prop_dictionary_t xbps_find_pkg_in_array_by_pattern(prop_array_t array, const char *pattern) { return find_pkg_in_array(array, pattern, true); @@ -268,7 +268,7 @@ find_pkg_in_dict(prop_dictionary_t d, return find_pkg_in_array(array, str, bypattern); } -inline prop_dictionary_t +prop_dictionary_t xbps_find_pkg_in_dict_by_name(prop_dictionary_t d, const char *key, const char *pkgname) @@ -276,7 +276,7 @@ xbps_find_pkg_in_dict_by_name(prop_dictionary_t d, return find_pkg_in_dict(d, key, pkgname, false, false); } -inline prop_dictionary_t +prop_dictionary_t xbps_find_pkg_in_dict_by_pattern(prop_dictionary_t d, const char *key, const char *pattern) @@ -284,7 +284,7 @@ xbps_find_pkg_in_dict_by_pattern(prop_dictionary_t d, return find_pkg_in_dict(d, key, pattern, true, false); } -inline prop_dictionary_t HIDDEN +prop_dictionary_t HIDDEN xbps_find_virtualpkg_user_in_dict_by_name(prop_dictionary_t d, const char *key, const char *name) @@ -292,7 +292,7 @@ xbps_find_virtualpkg_user_in_dict_by_name(prop_dictionary_t d, return find_pkg_in_dict(d, key, name, false, true); } -inline prop_dictionary_t HIDDEN +prop_dictionary_t HIDDEN xbps_find_virtualpkg_user_in_dict_by_pattern(prop_dictionary_t d, const char *key, const char *pattern) @@ -386,19 +386,19 @@ find_string_in_array(prop_array_t array, const char *str, int mode) return found; } -inline bool +bool xbps_find_string_in_array(prop_array_t array, const char *str) { return find_string_in_array(array, str, 0); } -inline bool +bool xbps_find_pkgname_in_array(prop_array_t array, const char *pkgname) { return find_string_in_array(array, pkgname, 1); } -inline bool +bool xbps_find_pkgpattern_in_array(prop_array_t array, const char *pattern) { return find_string_in_array(array, pattern, 2); diff --git a/lib/plist_remove.c b/lib/plist_remove.c index 2102db8d..be510b2c 100644 --- a/lib/plist_remove.c +++ b/lib/plist_remove.c @@ -87,19 +87,19 @@ remove_string_from_array(prop_array_t array, const char *str, int mode) return true; } -inline bool +bool xbps_remove_string_from_array(prop_array_t array, const char *str) { return remove_string_from_array(array, str, 0); } -inline bool +bool xbps_remove_pkgname_from_array(prop_array_t array, const char *name) { return remove_string_from_array(array, name, 1); } -inline bool +bool xbps_remove_pkg_from_array_by_name(prop_array_t array, const char *name) { return remove_string_from_array(array, name, 2); diff --git a/lib/repository_findpkg.c b/lib/repository_findpkg.c index 12beb2ab..4d33bfaf 100644 --- a/lib/repository_findpkg.c +++ b/lib/repository_findpkg.c @@ -245,13 +245,13 @@ xbps_repository_update_allpkgs(void) return rv; } -inline int +int xbps_repository_update_pkg(const char *pkgname) { return repository_find_pkg(pkgname, "update"); } -inline int +int xbps_repository_install_pkg(const char *pkgpattern) { return repository_find_pkg(pkgpattern, "install");