Add a comment about keeping hardcoded numbers in g_typelib_check_sanity
authorColin Walters <walters@src.gnome.org>
Tue, 18 Nov 2008 18:42:32 +0000 (18:42 +0000)
committerColin Walters <walters@src.gnome.org>
Tue, 18 Nov 2008 18:42:32 +0000 (18:42 +0000)
svn path=/trunk/; revision=945

girepository/gtypelib.c

index 8472195..5cda705 100644 (file)
@@ -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);