[vala/wip/class-posix: 2/3] 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: 2/3] codegen: Add "pointer_type" for general profile usage
- Date: Mon, 14 Jan 2019 07:48:05 +0000 (UTC)
commit e0268c86a19b36938f09abff4e44e3ce2d2e871b
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]