Add environment variable G_IREPOSITORY_VERBOSE so we can print out what

2008-07-24  Colin Walters  <walters@verbum.org>

	* girepository/girepository.c (g_irepository_register): Add
	environment variable G_IREPOSITORY_VERBOSE so we can print
	out what we're doing.
	* girepository/girepository.c (g_irepository_register_file): 
	Add GError error message to g_debug call.


svn path=/trunk/; revision=296
This commit is contained in:
Colin Walters 2008-07-24 19:20:40 +00:00 committed by Colin Walters
parent 776ee5f79e
commit abf9c86431
2 changed files with 9 additions and 5 deletions

View File

@ -4,7 +4,7 @@ include $(top_srcdir)/gcov.mak
INCLUDES = -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\""
noinst_LTLIBRARIES = libgirepository.la
lib_LTLIBRARIES = libgirepository.la
libgirepository_la_SOURCES = \
girepository.c \
@ -15,8 +15,7 @@ libgirepository_la_SOURCES = \
libgirepository_la_CPPFLAGS = $(GIREPO_CFLAGS)
libgirepository_la_LIBADD = $(GIREPO_LIBS)
#girepodir = $(includedir)/gobject-introspection-1.0/
#girepo_HEADERS = girepository.h
noinst_HEADERS = girepository.h
girepodir = $(includedir)/gobject-introspection-1.0/
girepo_HEADERS = girepository.h
GCOVSOURCES = $(libgirepository_la_SOURCES)

View File

@ -114,6 +114,11 @@ g_irepository_register (GIRepository *repository,
if (metadata->module == NULL)
metadata->module = g_module_open (NULL, 0);
if (g_getenv ("G_IREPOSITORY_VERBOSE"))
{
g_printerr ("Loaded typelib %s\n", name);
}
return name;
}
@ -443,7 +448,7 @@ g_irepository_register_file (GIRepository *repository,
full_path = g_build_filename (dir, fname, NULL);
mfile = g_mapped_file_new (full_path, FALSE, &error1);
if (error1) {
g_debug ("Failed to mmap \"%s\"", full_path);
g_debug ("Failed to mmap \"%s\": %s", full_path, error1->message);
g_clear_error (&error1);
g_free (full_path);
continue;