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.
This commit is contained in:
parent
17be7bab81
commit
0a6299318e
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user