summaryrefslogtreecommitdiff
path: root/girepository/girmodule.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2008-08-21 16:15:55 +0000
committerColin Walters <walters@src.gnome.org>2008-08-21 16:15:55 +0000
commit59df1dd48957bd494306d2a33a1a46d84895303f (patch)
tree49a55ce7666079896ca688a04cd82acdcf5634d9 /girepository/girmodule.c
parent851faec61462ecbc5a131fbbd75cba487e9953b2 (diff)
downloadgobject-introspection-59df1dd48957bd494306d2a33a1a46d84895303f.tar.gz
Tweak to use UINT instead of INT. Not likely to matter. Add to
2008-08-21 Colin Walters <walters@verbum.org> * girepository/girnode.c (write_string): Tweak to use UINT instead of INT. Not likely to matter. * girepository/girmodule.c (g_ir_module_build_typelib): Add to header_offset as well for header strings to match what write_string does. * girepository/gtypelib.c: Replace is_name with validate_name, which more strongly validates and handles errors in a better way. Update all callers. * giscanner/glibtransformer.py: Handle constructors better. svn path=/trunk/; revision=439
Diffstat (limited to 'girepository/girmodule.c')
-rw-r--r--girepository/girmodule.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/girepository/girmodule.c b/girepository/girmodule.c
index 1ffbf9ba..1fcdadbc 100644
--- a/girepository/girmodule.c
+++ b/girepository/girmodule.c
@@ -104,8 +104,12 @@ g_ir_module_build_typelib (GIrModule *module,
/* Adjust size for strings allocated in header below specially */
size += strlen (module->name);
- if (module->shared_library)
- size += strlen (module->shared_library);
+ header_size = ALIGN_VALUE (header_size + strlen (module->name) + 1, 4);
+ if (module->shared_library)
+ {
+ size += strlen (module->shared_library);
+ header_size = ALIGN_VALUE (header_size + strlen (module->shared_library) + 1, 4);
+ }
g_message ("allocating %d bytes (%d header, %d directory, %d entries)\n",
size, header_size, dir_size, size - header_size - dir_size);