From 3e0292cd66752489d5b05bed57abffec0315b3ae Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Wed, 1 Jun 2011 16:59:17 +0200 Subject: Always add a zero-terminated attribute when it cannot be implied g-ir-compiler assumes that an array is zero terminated when the attribute is absent and there is no other attribute (length and fixed-size), but g-ir-scanner only added the attribute when it is 0. This means that an explicit zero-terminated=1 annotation would have had no effect. Fix that and at the same time ensure that all other arrays are not zero-terminated by default. https://bugzilla.gnome.org/show_bug.cgi?id=646635 --- tests/scanner/Annotation-1.0-expected.gir | 18 ++++++++-------- tests/scanner/Regress-1.0-expected.gir | 36 ++++++++++++++++--------------- 2 files changed, 28 insertions(+), 26 deletions(-) (limited to 'tests/scanner') diff --git a/tests/scanner/Annotation-1.0-expected.gir b/tests/scanner/Annotation-1.0-expected.gir index a760a19a..f650c256 100644 --- a/tests/scanner/Annotation-1.0-expected.gir +++ b/tests/scanner/Annotation-1.0-expected.gir @@ -146,7 +146,7 @@ and/or use gtk-doc annotations. --> Sequence of numbers - + @@ -180,7 +180,7 @@ and/or use gtk-doc annotations. --> Sequence of numbers that are zero-terminated - + @@ -377,7 +377,7 @@ each string needs to be freed. caller-allocates="0" transfer-ownership="full"> Argument vector - + @@ -391,7 +391,7 @@ each string needs to be freed. The data - + @@ -409,7 +409,7 @@ each string needs to be freed. The data - + @@ -428,7 +428,7 @@ type. The data - + @@ -687,7 +687,7 @@ detection, and fixing it via annotations. caller-allocates="0" transfer-ownership="full"> The arguments. - + @@ -723,7 +723,7 @@ detection, and fixing it via annotations. The return value - + @@ -765,7 +765,7 @@ detection, and fixing it via annotations. - + diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir index 6302579d..6c5fdec5 100644 --- a/tests/scanner/Regress-1.0-expected.gir +++ b/tests/scanner/Regress-1.0-expected.gir @@ -1104,12 +1104,14 @@ TpAccount::status-changed - + - + @@ -1337,7 +1339,7 @@ TpAccount::status-changed a list of 5 integers - + @@ -1354,7 +1356,7 @@ TpAccount::status-changed caller-allocates="0" transfer-ownership="full"> a list of 5 integers ranging from 0 to 4 - + @@ -1364,7 +1366,7 @@ TpAccount::status-changed c:identifier="regress_test_array_fixed_size_int_return"> a list of 5 integers ranging from 0 to 4 - + @@ -1380,7 +1382,7 @@ TpAccount::status-changed List of ints - + @@ -1397,7 +1399,7 @@ TpAccount::status-changed List of ints - + @@ -1414,7 +1416,7 @@ TpAccount::status-changed List of ints - + @@ -1431,7 +1433,7 @@ TpAccount::status-changed List of ints - + @@ -1449,7 +1451,7 @@ TpAccount::status-changed List of types - + @@ -1459,7 +1461,7 @@ TpAccount::status-changed c:identifier="regress_test_array_int_full_out"> a new array of integers. - + @@ -1484,7 +1486,7 @@ TpAccount::status-changed List of ints - + @@ -1508,7 +1510,7 @@ TpAccount::status-changed caller-allocates="0" transfer-ownership="full"> a list of integers whose items will be increased by 1, except the first that will be dropped - + @@ -1518,7 +1520,7 @@ TpAccount::status-changed c:identifier="regress_test_array_int_none_out"> a static array of integers. - + @@ -1539,7 +1541,7 @@ TpAccount::status-changed - + @@ -1560,7 +1562,7 @@ TpAccount::status-changed caller-allocates="0" transfer-ownership="full" allow-none="1"> - + @@ -1591,7 +1593,7 @@ TpAccount::status-changed caller-allocates="0" transfer-ownership="full"> a list of 5 integers, from 0 to 4 in consecutive order - + -- cgit v1.2.1