[vala/wip/transform: 55/100] Access SemanticAnalyzer.get_data_type_for_symbol in a static way
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/transform: 55/100] Access SemanticAnalyzer.get_data_type_for_symbol in a static way
- Date: Sun, 26 Mar 2017 10:44:21 +0000 (UTC)
commit 904cbafda850d2098c73b4c5b6935da43649223b
Author: Rico Tzschichholz <ricotz t-online de>
Date: Mon Oct 1 17:23:02 2012 +0200
Access SemanticAnalyzer.get_data_type_for_symbol in a static way
codegen/valagdbusclienttransformer.vala | 2 +-
codegen/valagdbusservertransformer.vala | 8 ++++----
codegen/valagvarianttransformer.vala | 6 +++---
vala/valacodetransformer.vala | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/codegen/valagdbusclienttransformer.vala b/codegen/valagdbusclienttransformer.vala
index 59e11a6..80b1dad 100644
--- a/codegen/valagdbusclienttransformer.vala
+++ b/codegen/valagdbusclienttransformer.vala
@@ -328,7 +328,7 @@ public class Vala.GDBusClientTransformer : GVariantTransformer {
// create proxy class
var proxy = new Class (iface.name+"Proxy", iface.source_reference, null);
proxy.add_base_type (data_type ("GLib.DBusProxy"));
- proxy.add_base_type (context.analyzer.get_data_type_for_symbol (iface));
+ proxy.add_base_type (SemanticAnalyzer.get_data_type_for_symbol (iface));
proxy.access = iface.access;
iface.parent_symbol.add_class (proxy);
diff --git a/codegen/valagdbusservertransformer.vala b/codegen/valagdbusservertransformer.vala
index 525e9a6..2bc81bc 100644
--- a/codegen/valagdbusservertransformer.vala
+++ b/codegen/valagdbusservertransformer.vala
@@ -39,7 +39,7 @@ public class Vala.GDBusServerTransformer : GDBusClientTransformer {
string generate_dbus_method_wrapper (Method m, ObjectTypeSymbol sym) {
Method wrapper;
wrapper_method (new VoidType (), "gdbus_server "+m.get_full_name (), out wrapper);
- var object_type = context.analyzer.get_data_type_for_symbol (sym);
+ var object_type = SemanticAnalyzer.get_data_type_for_symbol (sym);
wrapper.add_parameter (new Parameter ("object", object_type));
wrapper.add_parameter (new Parameter ("arguments", data_type ("GLib.Variant", false)));
wrapper.add_parameter (new Parameter ("invocation", data_type ("GLib.DBusMethodInvocation",
false)));
@@ -171,7 +171,7 @@ public class Vala.GDBusServerTransformer : GDBusClientTransformer {
sym.add_method (im);
push_builder (new CodeBuilder.for_subroutine (im));
- var object_type = context.analyzer.get_data_type_for_symbol (sym);
+ var object_type = SemanticAnalyzer.get_data_type_for_symbol (sym);
var object = b.add_temp_declaration (null, expression (@"($object_type)
(((Object[])user_data)[0])"));
b.open_switch (expression ("method_name"), null);
b.add_return ();
@@ -209,7 +209,7 @@ public class Vala.GDBusServerTransformer : GDBusClientTransformer {
sym.add_method (m);
push_builder (new CodeBuilder.for_subroutine (m));
- var object_type = context.analyzer.get_data_type_for_symbol (sym);
+ var object_type = SemanticAnalyzer.get_data_type_for_symbol (sym);
var object = b.add_temp_declaration (null, expression (@"($object_type)
(((Object[])user_data)[0])"));
b.open_switch (expression ("property_name"), null);
b.add_return (expression ("null"));
@@ -246,7 +246,7 @@ public class Vala.GDBusServerTransformer : GDBusClientTransformer {
sym.add_method (m);
push_builder (new CodeBuilder.for_subroutine (m));
- var object_type = context.analyzer.get_data_type_for_symbol (sym);
+ var object_type = SemanticAnalyzer.get_data_type_for_symbol (sym);
var object = b.add_temp_declaration (null, expression (@"($object_type)
(((Object[])user_data)[0])"));
b.open_switch (expression ("property_name"), null);
b.add_return (expression ("false"));
diff --git a/codegen/valagvarianttransformer.vala b/codegen/valagvarianttransformer.vala
index eed7a51..e5b9236 100644
--- a/codegen/valagvarianttransformer.vala
+++ b/codegen/valagvarianttransformer.vala
@@ -222,7 +222,7 @@ public class Vala.GVariantTransformer : CCodeTransformer {
}
Method m;
- var type = context.analyzer.get_data_type_for_symbol (st);
+ var type = SemanticAnalyzer.get_data_type_for_symbol (st);
if (!wrapper_method (data_type ("GLib.Variant"), "gvariant_serialize_struct
"+type.to_string(), out m)) {
m.add_parameter (new Parameter ("st", type, b.source_reference));
push_builder (new CodeBuilder.for_subroutine (m));
@@ -359,7 +359,7 @@ public class Vala.GVariantTransformer : CCodeTransformer {
}
Method m;
- var type = context.analyzer.get_data_type_for_symbol (st);
+ var type = SemanticAnalyzer.get_data_type_for_symbol (st);
type.value_owned = true;
if (!wrapper_method (type, "gvariant_deserialize_struct "+type.to_string(), out m)) {
m.add_parameter (new Parameter ("variant", data_type ("GLib.Variant", false),
b.source_reference));
@@ -441,7 +441,7 @@ public class Vala.GVariantTransformer : CCodeTransformer {
if (en.scope.lookup ("from_string") != null) {
return;
}
- var m = new Method ("from_string", context.analyzer.get_data_type_for_symbol (en),
en.source_reference);
+ var m = new Method ("from_string", SemanticAnalyzer.get_data_type_for_symbol (en),
en.source_reference);
m.add_error_type (data_type ("GLib.DBusError.INVALID_ARGS"));
m.add_parameter (new Parameter ("str", data_type ("string", false), en.source_reference));
en.add_method (m);
diff --git a/vala/valacodetransformer.vala b/vala/valacodetransformer.vala
index 02728fa..6d1b01a 100644
--- a/vala/valacodetransformer.vala
+++ b/vala/valacodetransformer.vala
@@ -100,7 +100,7 @@ public class Vala.CodeTransformer : CodeVisitor {
// only qualified types, will slightly simplify the work of SymbolResolver
public DataType data_type (string s, bool value_owned = true, bool nullable = false) {
- DataType type = context.analyzer.get_data_type_for_symbol ((TypeSymbol) symbol_from_string
(s));
+ DataType type = SemanticAnalyzer.get_data_type_for_symbol ((TypeSymbol) symbol_from_string
(s));
type.value_owned = value_owned;
type.nullable = nullable;
return type;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]