summaryrefslogtreecommitdiff
path: root/codegen/valagsignalmodule.vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2017-12-06 17:14:34 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2017-12-06 17:39:50 +0100
commit3fe3f8b7e7e5a1c6e3adf5ad0fa6ace2719b6339 (patch)
treeb9f71d2a9f85935187b07fc4b5dc0a08785ab330 /codegen/valagsignalmodule.vala
parent84c858484059742d577abf9a78f2d6e99ced9477 (diff)
downloadvala-3fe3f8b7e7e5a1c6e3adf5ad0fa6ace2719b6339.tar.gz
Use type-check to determine a GenericType
Diffstat (limited to 'codegen/valagsignalmodule.vala')
-rw-r--r--codegen/valagsignalmodule.vala10
1 files changed, 5 insertions, 5 deletions
diff --git a/codegen/valagsignalmodule.vala b/codegen/valagsignalmodule.vala
index 5e3424531..15a18cb7b 100644
--- a/codegen/valagsignalmodule.vala
+++ b/codegen/valagsignalmodule.vala
@@ -50,7 +50,7 @@ public class Vala.GSignalModule : GObjectModule {
}
private string? get_value_type_name_from_type_reference (DataType t) {
- if (t is PointerType || t.type_parameter != null) {
+ if (t is PointerType || t is GenericType) {
return "gpointer";
} else if (t is VoidType) {
return "void";
@@ -281,7 +281,7 @@ public class Vala.GSignalModule : GObjectModule {
} else {
get_value_function = "g_value_get_pointer";
}
- } else if (p.variable_type is PointerType || p.variable_type.type_parameter != null) {
+ } else if (p.variable_type is PointerType || p.variable_type is GenericType) {
get_value_function = "g_value_get_pointer";
} else if (p.variable_type is ErrorType) {
get_value_function = "g_value_get_pointer";
@@ -315,7 +315,7 @@ public class Vala.GSignalModule : GObjectModule {
} else {
set_fc = new CCodeFunctionCall (new CCodeIdentifier ("g_value_set_pointer"));
}
- } else if (return_type.type_parameter != null) {
+ } else if (return_type is GenericType) {
set_fc = new CCodeFunctionCall (new CCodeIdentifier ("g_value_set_pointer"));
} else if (return_type is ErrorType) {
set_fc = new CCodeFunctionCall (new CCodeIdentifier ("g_value_set_pointer"));
@@ -400,7 +400,7 @@ public class Vala.GSignalModule : GObjectModule {
csignew.add_argument (marshal_arg);
var params = sig.get_parameters ();
- if (sig.return_type is PointerType || sig.return_type.type_parameter != null) {
+ if (sig.return_type is PointerType || sig.return_type is GenericType) {
csignew.add_argument (new CCodeConstant ("G_TYPE_POINTER"));
} else if (sig.return_type is ErrorType) {
csignew.add_argument (new CCodeConstant ("G_TYPE_POINTER"));
@@ -431,7 +431,7 @@ public class Vala.GSignalModule : GObjectModule {
for (var i = 0; i < ((ArrayType) param.variable_type).rank; i++) {
csignew.add_argument (new CCodeConstant ("G_TYPE_INT"));
}
- } else if (param.variable_type is PointerType || param.variable_type.type_parameter != null || param.direction != ParameterDirection.IN) {
+ } else if (param.variable_type is PointerType || param.variable_type is GenericType || param.direction != ParameterDirection.IN) {
csignew.add_argument (new CCodeConstant ("G_TYPE_POINTER"));
} else if (param.variable_type is ErrorType) {
csignew.add_argument (new CCodeConstant ("G_TYPE_POINTER"));