diff options
author | Simon van der Linden <simon@vanderlinden.eu.org> | 2009-06-17 17:30:19 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2009-06-17 17:32:48 -0400 |
commit | 2fe9b9db765635a6a6246b36db28b58452ececde (patch) | |
tree | 1caf9264e408194b1d2a441e1cb4cb2da30dec7d | |
parent | 520315e331f187f5f1cd720b0a9fc5331872f977 (diff) | |
download | gobject-introspection-2fe9b9db765635a6a6246b36db28b58452ececde.tar.gz |
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.
-rw-r--r-- | girepository/girparser.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/girepository/girparser.c b/girepository/girparser.c index 0ab6259e..e5f5e75a 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 { |