[vala/0.48] girwriter: Add c:identifier-prefixes to <namespace>
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] girwriter: Add c:identifier-prefixes to <namespace>
- Date: Wed, 22 Jul 2020 11:54:08 +0000 (UTC)
commit 2f69321fe75a264738ec109be418b4266debd6a3
Author: Jean Pierre Dudey <me jeandudey tech>
Date: Sun Jul 19 13:32:07 2020 -0500
girwriter: Add c:identifier-prefixes to <namespace>
c:prefix is deprecated and c:identifier-prefixes should be used.
codegen/valagirwriter.vala | 1 +
tests/girwriter/GirTest-1.0.gir-expected | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index 86fff038a..99d79b4af 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -347,6 +347,7 @@ public class Vala.GIRWriter : CodeVisitor {
}
if (cprefix != null) {
buffer.append_printf (" c:prefix=\"%s\"", cprefix);
+ buffer.append_printf (" c:identifier-prefixes=\"%s\"", cprefix);
}
buffer.append_printf (">\n");
indent++;
diff --git a/tests/girwriter/GirTest-1.0.gir-expected b/tests/girwriter/GirTest-1.0.gir-expected
index e0d5128a1..97ea48fbe 100644
--- a/tests/girwriter/GirTest-1.0.gir-expected
+++ b/tests/girwriter/GirTest-1.0.gir-expected
@@ -4,7 +4,7 @@
<include name="Gio" version="2.0"/>
<package name="girtest"/>
<c:include name="girtest.h"/>
-<namespace name="GirTest" version="1.0" shared-library="girtest" c:prefix="GirTest">
+<namespace name="GirTest" version="1.0" shared-library="girtest" c:prefix="GirTest"
c:identifier-prefixes="GirTest">
<enumeration name="EnumTest" c:type="GirTestEnumTest" glib:type-name="GirTestEnumTest"
glib:get-type="gir_test_enum_test_get_type">
<member name="value1" c:identifier="GIR_TEST_ENUM_TEST_VALUE1" value="0"/>
<member name="value2" c:identifier="GIR_TEST_ENUM_TEST_VALUE2" value="1"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]