summaryrefslogtreecommitdiffstats
path: root/gi
diff options
context:
space:
mode:
authorSimon van der Linden <svdlinden@src.gnome.org>2010-01-08 21:10:28 +0100
committerSimon van der Linden <svdlinden@src.gnome.org>2010-01-08 21:10:28 +0100
commitb11cf2595987c1f0fc4ffd834f07c98b92aa2355 (patch)
tree2a9aa42e58d13c6b2bd8f9361fddc87634976347 /gi
parentb4189be2b2d3c350fdf33e27309bee5a72e4f72a (diff)
downloadpygi-b11cf2595987c1f0fc4ffd834f07c98b92aa2355.tar.gz
pygi-b11cf2595987c1f0fc4ffd834f07c98b92aa2355.tar.xz
pygi-b11cf2595987c1f0fc4ffd834f07c98b92aa2355.zip
Initialize struct fields to 0 when allocating
Diffstat (limited to 'gi')
-rw-r--r--gi/pygi-struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gi/pygi-struct.c b/gi/pygi-struct.c
index 8b672c7..b1e81bf 100644
--- a/gi/pygi-struct.c
+++ b/gi/pygi-struct.c
@@ -72,7 +72,7 @@ _struct_new (PyTypeObject *type,
}
size = g_struct_info_get_size((GIStructInfo *)info);
- pointer = g_try_malloc(size);
+ pointer = g_try_malloc0(size);
if (pointer == NULL) {
PyErr_NoMemory();
goto out;