diff options
author | Colin Walters <walters@src.gnome.org> | 2008-10-12 04:51:48 +0000 |
---|---|---|
committer | Colin Walters <walters@src.gnome.org> | 2008-10-12 04:51:48 +0000 |
commit | 2d6a7c97d16cd56a01b6d044cc7048e01344799d (patch) | |
tree | e739a70f3f6f62323be09e8d83574e20c5b6eda2 /girepository/girmodule.c | |
parent | 8210400fe121dd9ba2694d4d6049b29beaa12eaa (diff) | |
download | gobject-introspection-2d6a7c97d16cd56a01b6d044cc7048e01344799d.tar.gz |
Bug 552858: versioning
This is a big patch. You should probably remove your installation
tree to be cleaner.
* docs/typelib-format.txt: Add nsversion entry which holds
version of namespace.
* girepository/girepository.h: Add 'version' parameter to
g_irepository_require. This may be NULL. Normally
bindings should pass an explicit version though.
* girepository/girepository.c: Lots of infrastructure to
support versioning. Add some more documentation. Disallow
some usage of NULL namespaces.
* girepository/girmodule.c: Add version parameter.
* girepository/gtypelib.c: Update header size.
* giscanner/ast.py: Add version to Namespace.
* giscanner/girparser.py: Parse version attribute from
XML, pass to Namespace.
* giscanner/girwriter.py: Write out version parameter.
* giscanner/transformer.py: Clean up include registration.
* tests/*: Add version attribute.
* tests/invoke/invoke.c: Don't try looking up test before
it's loaded in repository.
* tools/generate.c: Output version parameter.
* gir/Makefile.am: Add 2.0 version to .gir files.
svn path=/trunk/; revision=677
Diffstat (limited to 'girepository/girmodule.c')
-rw-r--r-- | girepository/girmodule.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/girepository/girmodule.c b/girepository/girmodule.c index 65ee392d..ad0ecf54 100644 --- a/girepository/girmodule.c +++ b/girepository/girmodule.c @@ -29,13 +29,16 @@ GIrModule * -g_ir_module_new (const gchar *name, const gchar *shared_library) +g_ir_module_new (const gchar *name, + const gchar *version, + const gchar *shared_library) { GIrModule *module; module = g_new0 (GIrModule, 1); module->name = g_strdup (name); + module->version = g_strdup (version); if (shared_library) module->shared_library = g_strdup (shared_library); else @@ -156,6 +159,7 @@ g_ir_module_build_typelib (GIrModule *module, header->dependencies = 0; header->size = 0; /* filled in later */ header->namespace = write_string (module->name, strings, data, &header_size); + header->nsversion = write_string (module->version, strings, data, &header_size); header->shared_library = (module->shared_library? write_string (module->shared_library, strings, data, &header_size) : 0); |