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
This commit is contained in:
Colin Walters 2008-10-12 04:51:48 +00:00 committed by Philip Withnall
parent c0114d8811
commit 12f6efcf38

View File

@ -1064,13 +1064,16 @@ write_repository (const char *namespace,
{
const gchar *shared_library;
const char *ns = namespace;
const char *version;
version = g_irepository_get_version (repository, ns);
shared_library = g_irepository_get_shared_library (repository, ns);
if (shared_library)
g_fprintf (file, " <namespace name=\"%s\" shared-library=\"%s\">\n",
ns, shared_library);
g_fprintf (file, " <namespace name=\"%s\" version=\"%s\" shared-library=\"%s\">\n",
ns, version, shared_library);
else
g_fprintf (file, " <namespace name=\"%s\">\n", ns);
g_fprintf (file, " <namespace name=\"%s\" version=\"%s\">\n", ns, version);
for (j = 0; j < g_irepository_get_n_infos (repository, ns); j++)
{