[vala/wip/class-posix: 1/2] codegen: Add "pointer_type" for general profile usage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/class-posix: 1/2] codegen: Add "pointer_type" for general profile usage
- Date: Sat, 12 Jan 2019 17:09:25 +0000 (UTC)
commit abaf8e6480071ec0596af4d19a1f08e160bc560f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Jan 12 18:03:40 2019 +0100
codegen: Add "pointer_type" for general profile usage
codegen/valaccodebasemodule.vala | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 5e5b7e153..8e65f7d6f 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -324,6 +324,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
public Class gtk_widget_type;
public DataType delegate_target_type;
public DelegateType delegate_target_destroy_type;
+ public DataType pointer_type;
Delegate destroy_notify;
Class gerror;
@@ -505,12 +506,15 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
}
dbus_proxy_type = (TypeSymbol) glib_ns.scope.lookup ("DBusProxy");
+ pointer_type = new StructValueType ((Struct) glib_ns.scope.lookup ("pointer"));
- delegate_target_type = new StructValueType ((Struct) glib_ns.scope.lookup
("pointer"));
+ delegate_target_type = pointer_type.copy ();
destroy_notify = (Delegate) glib_ns.scope.lookup ("DestroyNotify");
delegate_target_destroy_type = new DelegateType (destroy_notify);
} else {
- delegate_target_type = new PointerType (new VoidType ());
+ pointer_type = new PointerType (new VoidType ());
+
+ delegate_target_type = pointer_type.copy ();
destroy_notify = new Delegate ("ValaDestroyNotify", new VoidType ());
destroy_notify.add_parameter (new Parameter ("data", new PointerType (new VoidType
())));
destroy_notify.has_target = false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]