mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-30 19:06:38 +02:00
girepository: Add checks on prerequisites of gi_repository_require
This commit is contained in:
@@ -2051,6 +2051,9 @@ gi_repository_require (GIRepository *repository,
|
||||
{
|
||||
GITypelib *typelib;
|
||||
|
||||
g_return_val_if_fail (GI_IS_REPOSITORY (repository), NULL);
|
||||
g_return_val_if_fail (namespace != NULL, NULL);
|
||||
|
||||
typelib = require_internal (repository, namespace, version, flags,
|
||||
(const char * const *) repository->typelib_search_path->pdata,
|
||||
repository->typelib_search_path->len, error);
|
||||
@@ -2089,6 +2092,9 @@ gi_repository_require_private (GIRepository *repository,
|
||||
{
|
||||
const char * const search_path[] = { typelib_dir, NULL };
|
||||
|
||||
g_return_val_if_fail (GI_IS_REPOSITORY (repository), NULL);
|
||||
g_return_val_if_fail (namespace != NULL, NULL);
|
||||
|
||||
return require_internal (repository, namespace, version, flags,
|
||||
search_path, 1, error);
|
||||
}
|
||||
|
Reference in New Issue
Block a user