[gobject-introspection] Bug 585328 - Only set zero_terminated flag for types we know are
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Subject: [gobject-introspection] Bug 585328 - Only set zero_terminated flag for types we know are
- Date: Wed, 17 Jun 2009 17:31:50 -0400 (EDT)
commit 2fe9b9db765635a6a6246b36db28b58452ececde
Author: Simon van der Linden <simon vanderlinden eu org>
Date: Wed Jun 17 17:30:19 2009 -0400
Bug 585328 - Only set zero_terminated flag for types we know are
Rationalize our setting of the zero_terminated flag; we shouldn't
set it if the gir doesn't say to.
girepository/girparser.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/girepository/girparser.c b/girepository/girparser.c
index 0ab6259..e5f5e75 100644
--- a/girepository/girparser.c
+++ b/girepository/girparser.c
@@ -1710,6 +1710,12 @@ start_type (GMarkupParseContext *context,
typenode->has_size = size != NULL;
typenode->size = typenode->has_size ? atoi (size) : -1;
+
+ if (zero)
+ typenode->zero_terminated = strcmp(zero, "1") == 0;
+ else
+ /* If neither zero-terminated nor length nor fixed-size is given, assume zero-terminated. */
+ typenode->zero_terminated = !(typenode->has_length || typenode->has_size);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]