[gi-docgen/ebassi/parse-array: 5/5] gir: Narrow the zero-terminated heuristic
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gi-docgen/ebassi/parse-array: 5/5] gir: Narrow the zero-terminated heuristic
- Date: Tue, 9 Nov 2021 23:02:50 +0000 (UTC)
commit e58dd4f8b9bb6ab7239952871e038d6c14f4f230
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Nov 9 23:01:26 2021 +0000
gir: Narrow the zero-terminated heuristic
If the array element has a name, like GLib.PtrArray or GLib.ByteArray,
then it cannot be assumed to be zero-terminated.
gidocgen/gir/parser.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gidocgen/gir/parser.py b/gidocgen/gir/parser.py
index bfa18d5..f47ff94 100644
--- a/gidocgen/gir/parser.py
+++ b/gidocgen/gir/parser.py
@@ -370,7 +370,7 @@ class GirParser:
if attr_zero_terminated is not None:
zero_terminated = bool(attr_zero_terminated == '1')
else:
- zero_terminated = bool(attr_fixed_size is None and attr_length is None)
+ zero_terminated = bool(array_name is None and attr_fixed_size is None and attr_length is None)
if attr_fixed_size is not None:
fixed_size = int(attr_fixed_size)
if attr_length is not None:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]