mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-02 17:26:17 +01:00
girepository/girmodule: Use clearer scope for the build struct
Allocate it only when needed avoiding manual memset
This commit is contained in:
parent
05f606f3c5
commit
6a4f8e5bb7
@ -481,7 +481,6 @@ gi_ir_module_build_typelib (GIIrModule *module)
|
||||
|
||||
for (e = module->entries, i = 0; e; e = e->next, i++)
|
||||
{
|
||||
GIIrTypelibBuild build;
|
||||
GIIrNode *node = e->data;
|
||||
|
||||
if (strchr (node->name, '.'))
|
||||
@ -524,6 +523,7 @@ gi_ir_module_build_typelib (GIIrModule *module)
|
||||
}
|
||||
else
|
||||
{
|
||||
GIIrTypelibBuild build = {0};
|
||||
old_offset = offset;
|
||||
offset2 = offset + gi_ir_node_get_size (node);
|
||||
|
||||
@ -532,7 +532,6 @@ gi_ir_module_build_typelib (GIIrModule *module)
|
||||
entry->offset = offset;
|
||||
entry->name = gi_ir_write_string (node->name, strings, data, &offset2);
|
||||
|
||||
memset (&build, 0, sizeof (build));
|
||||
build.module = module;
|
||||
build.strings = strings;
|
||||
build.types = types;
|
||||
|
Loading…
Reference in New Issue
Block a user