summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@src.gnome.org>2008-11-18 18:42:32 +0000
committerColin Walters <walters@src.gnome.org>2008-11-18 18:42:32 +0000
commiteef46134c0c931c665d2e88781bd95784ee10843 (patch)
treecafe67df4599fb641d5125277d6f1f0bba898534
parenta26517953e7fefedc8a450f8c727f787296d8823 (diff)
downloadgobject-introspection-eef46134c0c931c665d2e88781bd95784ee10843.tar.gz
Add a comment about keeping hardcoded numbers in g_typelib_check_sanity
svn path=/trunk/; revision=945
-rw-r--r--girepository/gtypelib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/girepository/gtypelib.c b/girepository/gtypelib.c
index 8472195f..5cda7057 100644
--- a/girepository/gtypelib.c
+++ b/girepository/gtypelib.c
@@ -152,6 +152,14 @@ g_typelib_check_sanity (void)
n, sizeof (s)); \
size_check_ok = FALSE; \
}
+
+ /* When changing the size of a typelib structure, you are required to update
+ * the hardcoded size here. Do NOT change these to use sizeof(); these
+ * should match whatever is defined in the text specification and serve as
+ * a sanity check on structure modifications.
+ *
+ * Everything else in the code however should be using sizeof().
+ */
CHECK_SIZE (Header, 108);
CHECK_SIZE (DirEntry, 12);