[vala/wip/transform: 97/142] Report error for unsupported GVariant (de)serialization
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/transform: 97/142] Report error for unsupported GVariant (de)serialization
- Date: Sat, 21 Jan 2017 13:22:59 +0000 (UTC)
commit f9a88ae4445eaf4ca45c973cff870c960037e840
Author: Rico Tzschichholz <ricotz t-online de>
Date: Mon Oct 22 13:16:39 2012 +0200
Report error for unsupported GVariant (de)serialization
codegen/valagvarianttransformer.vala | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valagvarianttransformer.vala b/codegen/valagvarianttransformer.vala
index ce025c1..9b40155 100644
--- a/codegen/valagvarianttransformer.vala
+++ b/codegen/valagvarianttransformer.vala
@@ -520,6 +520,10 @@ public class Vala.GVariantTransformer : CCodeTransformer {
result = deserialize_hash_table ((ObjectType) type, expr.inner);
}
+ if (result == null) {
+ Report.error (type.source_reference, "GVariant deserialization of type `%s' is not
supported".printf (type.to_string ()));
+ }
+
context.analyzer.replaced_nodes.add (expr.inner);
expr.inner = result;
b.check (this);
@@ -559,6 +563,10 @@ public class Vala.GVariantTransformer : CCodeTransformer {
result = serialize_hash_table ((ObjectType) type, expr);
}
+ if (result == null) {
+ Report.error (type.source_reference, "GVariant serialization of type `%s' is not
supported".printf (type.to_string ()));
+ }
+
result.target_type = target_type;
context.analyzer.replaced_nodes.add (expr);
old_parent_node.replace_expression (expr, result);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]