More explicitly document how we'll use the version= attribute on repository

I want to start bumping it on incompatible .gir changes.

https://bugzilla.gnome.org/show_bug.cgi?id=621895
This commit is contained in:
Colin Walters 2010-06-17 10:38:39 -04:00
parent c3790c1af7
commit 911d98bb9d

View File

@ -30,6 +30,11 @@
#include "gitypelib-internal.h"
#include "config.h"
/* This is a "major" version in the sense that it's only bumped
* for incompatible changes.
*/
#define SUPPORTED_GIR_VERSION "1.0"
#if defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS)
# include <execinfo.h>
#endif
@ -2754,7 +2759,7 @@ start_element_handler (GMarkupParseContext *context,
if (version == NULL)
MISSING_ATTRIBUTE (context, error, element_name, "version");
else if (strcmp (version, "1.0") != 0)
else if (strcmp (version, SUPPORTED_GIR_VERSION) != 0)
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_INVALID_CONTENT,