summaryrefslogtreecommitdiff
path: root/girepository/girparser.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-06-17 10:38:39 -0400
committerColin Walters <walters@verbum.org>2010-06-17 10:49:41 -0400
commit7b4af5e3bd9081e5ff72d9439bb868017dd8c2c8 (patch)
treeb24d72c5d8bf36c5e8fd20d666fe6da657401774 /girepository/girparser.c
parentb683ef027b2d96c7cd6c7f895a0437a03567dc05 (diff)
downloadgobject-introspection-7b4af5e3bd9081e5ff72d9439bb868017dd8c2c8.tar.gz
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
Diffstat (limited to 'girepository/girparser.c')
-rw-r--r--girepository/girparser.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/girepository/girparser.c b/girepository/girparser.c
index d0bd8aa3..f9c1fb66 100644
--- a/girepository/girparser.c
+++ b/girepository/girparser.c
@@ -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,