projects
/
gnome.gobject-introspection
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
520315e
)
Bug 585328 - Only set zero_terminated flag for types we know are
author
Simon van der Linden
<simon@vanderlinden.eu.org>
Wed, 17 Jun 2009 21:30:19 +0000
(17:30 -0400)
committer
Colin Walters
<walters@verbum.org>
Wed, 17 Jun 2009 21:32:48 +0000
(17:32 -0400)
Rationalize our setting of the zero_terminated flag; we shouldn't
set it if the gir doesn't say to.
girepository/girparser.c
patch
|
blob
|
history
diff --git
a/girepository/girparser.c
b/girepository/girparser.c
index
0ab6259
..
e5f5e75
100644
(file)
--- 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
{