After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 313268 - Introspection namespace->file mapping, use gmodule instead of dlopen, etc..
Introspection namespace->file mapping, use gmodule instead of dlopen, etc..
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2005-08-11 21:39 UTC by Gustavo Carneiro
Modified: 2015-02-07 16:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the patch (119.29 KB, patch)
2005-08-11 21:41 UTC, Gustavo Carneiro
none Details | Review

Description Gustavo Carneiro 2005-08-11 21:39:38 UTC
Following up to [1], I have implemented the stuff I mentioned was missing.

  I realized eventually that there is no way we can make the namespace and file
name be the same, therefore I added a new 'shared_library' string to the
metadata file.  It is optional, but it can point to the shared library that
implementes the functions described in the metadata.

  Moreover, I created a GMetadata structure and replaced most occurrences of
"guchar *metadata" with "GMetadata *".  GMetadata holds the metadata, but can
also hold a GMappedFile and, most importantly, a GModule.  Since the GIBaseInfo
was changed to keep a pointer to GMetadata, g_function_info_invoke now uses
g_module_symbol to lookup the symbol from the correct library, whose symbols can
therefore be loaded as private symbols, and lazily.

  And yes, I practically gave it away already, memory mapping metadata is
implemented already.  And so is a metadata searching.  There's a "search path",
with a default value $(libdir), plus the colon-separated directories listed in
GIREPOPATH.

  Also the patch fixes some build/configure problems, makes the 'invoke' test
actually exectute on make check, and adds a new test to check the new
namespace->file mapping and automatic module loading.

[1] http://mail.gnome.org/archives/gtk-devel-list/2005-August/msg00006.html
Comment 1 Gustavo Carneiro 2005-08-11 21:41:04 UTC
Created attachment 50595 [details] [review]
the patch

Here's the patch.  Sorry; it's very difficult to break this stuff into several
patches. :|
Comment 2 Matthias Clasen 2005-08-12 13:23:26 UTC
I will look at this once the 2.8 releases are out of the way
Comment 3 Gustavo Carneiro 2005-08-21 17:44:24 UTC
Erm.. anytime now would be great...
Comment 4 Gustavo Carneiro 2005-09-19 21:47:43 UTC
ping?
Comment 5 Johan (not receiving bugmail) Dahlin 2007-12-06 00:21:40 UTC
I committed a modified version of this to svn, it's already in used by pybank and seems to work quite well.

Thanks!
Comment 6 André Klapper 2015-02-07 16:50:09 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]