mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
[GIRepository] Rename g_irepository_enumerate
Rename it to g_irepository_enumerate_versions
This commit is contained in:
parent
da698167a0
commit
ab9085eda3
@ -1050,7 +1050,7 @@ free_candidate (struct NamespaceVersionCandidadate *candidate)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GSList *
|
static GSList *
|
||||||
enumerate_namespace_versions (const gchar *namespace)
|
enumerate_namespace_versions (const gchar *namespace)
|
||||||
{
|
{
|
||||||
GSList *candidates = NULL;
|
GSList *candidates = NULL;
|
||||||
GHashTable *found_versions = g_hash_table_new (g_str_hash, g_str_equal);
|
GHashTable *found_versions = g_hash_table_new (g_str_hash, g_str_equal);
|
||||||
@ -1123,7 +1123,7 @@ enumerate_namespace_versions (const gchar *namespace)
|
|||||||
g_dir_close (dir);
|
g_dir_close (dir);
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_slist_free (tmp_path);
|
g_slist_free (tmp_path);
|
||||||
g_free (namespace_dash);
|
g_free (namespace_dash);
|
||||||
g_free (namespace_typelib);
|
g_free (namespace_typelib);
|
||||||
@ -1165,20 +1165,21 @@ find_namespace_latest (const gchar *namespace,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_irepository_enumerate:
|
* g_irepository_enumerate_versions:
|
||||||
* @repository: (allow-none): Repository
|
* @repository: (allow-none): the repository
|
||||||
* @namespace_: GI namespace, e.g. "Gtk"
|
* @namespace_: GI namespace, e.g. "Gtk"
|
||||||
*
|
*
|
||||||
* Returns: (element-type utf8) (transfer full): An array of versions available for
|
* Obtain a list of versions for @namespace_ in this @repository.
|
||||||
* this namespace.
|
*
|
||||||
|
* Returns: (element-type utf8) (transfer full): the array of versions.
|
||||||
*/
|
*/
|
||||||
GList *
|
GList *
|
||||||
g_irepository_enumerate (GIRepository *repository,
|
g_irepository_enumerate_versions (GIRepository *repository,
|
||||||
const gchar *namespace_)
|
const gchar *namespace_)
|
||||||
{
|
{
|
||||||
GList *ret = NULL;
|
GList *ret = NULL;
|
||||||
GSList *candidates, *link;
|
GSList *candidates, *link;
|
||||||
|
|
||||||
candidates = enumerate_namespace_versions (namespace_);
|
candidates = enumerate_namespace_versions (namespace_);
|
||||||
for (link = candidates; link; link = link->next)
|
for (link = candidates; link; link = link->next)
|
||||||
{
|
{
|
||||||
|
@ -101,8 +101,8 @@ gboolean g_irepository_is_registered (GIRepository *repository,
|
|||||||
GIBaseInfo * g_irepository_find_by_name (GIRepository *repository,
|
GIBaseInfo * g_irepository_find_by_name (GIRepository *repository,
|
||||||
const gchar *namespace_,
|
const gchar *namespace_,
|
||||||
const gchar *name);
|
const gchar *name);
|
||||||
GList * g_irepository_enumerate (GIRepository *repository,
|
GList * g_irepository_enumerate_versions (GIRepository *repository,
|
||||||
const gchar *namespace_);
|
const gchar *namespace_);
|
||||||
GTypelib * g_irepository_require (GIRepository *repository,
|
GTypelib * g_irepository_require (GIRepository *repository,
|
||||||
const gchar *namespace_,
|
const gchar *namespace_,
|
||||||
const gchar *version,
|
const gchar *version,
|
||||||
|
Loading…
Reference in New Issue
Block a user