[vala/staging: 2/3] gtkmodule: Recurse inner classes of ObjectTypeSymbols
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 2/3] gtkmodule: Recurse inner classes of ObjectTypeSymbols
- Date: Tue, 8 Feb 2022 23:05:38 +0000 (UTC)
commit 17302b9a6a0af60ca9931c61618ec13988b6a830
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Feb 9 00:05:24 2022 +0100
gtkmodule: Recurse inner classes of ObjectTypeSymbols
codegen/valagtkmodule.vala | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/codegen/valagtkmodule.vala b/codegen/valagtkmodule.vala
index cf7d26b55..4ed5cd8f5 100644
--- a/codegen/valagtkmodule.vala
+++ b/codegen/valagtkmodule.vala
@@ -79,15 +79,23 @@ public class Vala.GtkModule : GSignalModule {
recurse_cclass_to_vala_map (context.root);
}
- private void recurse_cclass_to_vala_map (Namespace ns) {
- foreach (var cl in ns.get_classes()) {
+ private void recurse_cclass_to_vala_map (Symbol sym) {
+ unowned List<Class> classes;
+ if (sym is Namespace) {
+ foreach (var inner in ((Namespace) sym).get_namespaces()) {
+ recurse_cclass_to_vala_map (inner);
+ }
+ classes = ((Namespace) sym).get_classes ();
+ } else if (sym is ObjectTypeSymbol) {
+ classes = ((ObjectTypeSymbol) sym).get_classes ();
+ } else {
+ return;
+ }
+ foreach (var cl in classes) {
if (!cl.is_compact) {
cclass_to_vala_map.set (get_ccode_name (cl), cl);
}
}
- foreach (var inner in ns.get_namespaces()) {
- recurse_cclass_to_vala_map (inner);
- }
}
private void ensure_gresource_to_file_map () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]