summaryrefslogtreecommitdiff
path: root/girepository/girmodule.c
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2010-05-20 11:33:49 -0300
committerJohan Dahlin <johan@gnome.org>2010-05-20 11:41:44 -0300
commit891ba6c46a19e647f063e12131823e61f40f9c98 (patch)
treefb0eba21c64e6548723b5772f4056aa3deeaf5e4 /girepository/girmodule.c
parentabfd1719b3fd08718fe8dc6892d4a7c76556d652 (diff)
downloadgobject-introspection-891ba6c46a19e647f063e12131823e61f40f9c98.tar.gz
[girepository] Use g_slice
Use g_slice to allocate instead of g_new(x, 1); It uses a memory pool internally and should be faster, especially for GBaseInfo/GRealInfo, structs which are tiny.
Diffstat (limited to 'girepository/girmodule.c')
-rw-r--r--girepository/girmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/girepository/girmodule.c b/girepository/girmodule.c
index 66efceb2..b380912b 100644
--- a/girepository/girmodule.c
+++ b/girepository/girmodule.c
@@ -37,7 +37,7 @@ g_ir_module_new (const gchar *name,
{
GIrModule *module;
- module = g_new0 (GIrModule, 1);
+ module = g_slice_new0 (GIrModule);
module->name = g_strdup (name);
module->version = g_strdup (version);
@@ -73,7 +73,7 @@ g_ir_module_free (GIrModule *module)
g_hash_table_destroy (module->aliases);
g_hash_table_destroy (module->disguised_structures);
- g_free (module);
+ g_slice_free (GIrModule, module);
}
/**