[typelib] Clean up dlopen handling
authorColin Walters <walters@verbum.org>
Tue, 18 Aug 2009 14:23:09 +0000 (10:23 -0400)
committerColin Walters <walters@verbum.org>
Wed, 19 Aug 2009 15:05:08 +0000 (11:05 -0400)
commit6d510b8db845f0c368dddf9b8d15aaac71a8a676
tree5b95024424d3be7bb470897fb09fe6dbd131df92
parentefa7266bcf78478ce62e8dd778a4f0417bfd4d15
[typelib] Clean up dlopen handling

It's was busted that g_typelib_new_* does the dlopen() since that caused
g-ir-compiler to load the modules even though it wasn't going to do
anything with them.

Instead, change things so that g_module_symbol does the dlopen on-demand.
Remove the extra dlopen(NULL) inside girepository.c, we had another
already in gtypelib.c.

Thanks to Owen Taylor for suggesting this approach.
girepository/girepository.c
girepository/gtypelib.c
girepository/gtypelib.h