[vala/tintou/javascriptcore-class] SQUASH fix callbacks



commit 2bf473d35374e404e8ae9c164379b98fc58a7127
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Jan 22 21:15:14 2020 +0100

    SQUASH fix callbacks

 vapi/javascriptcoregtk-4.0.vapi              | 8 ++++----
 vapi/metadata/JavaScriptCore-4.0-custom.vala | 4 ++--
 vapi/metadata/JavaScriptCore-4.0.metadata    | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/vapi/javascriptcoregtk-4.0.vapi b/vapi/javascriptcoregtk-4.0.vapi
index 31fc13173..423024869 100644
--- a/vapi/javascriptcoregtk-4.0.vapi
+++ b/vapi/javascriptcoregtk-4.0.vapi
@@ -218,9 +218,9 @@ namespace JSC {
                [CCode (has_construct_function = false)]
                protected Class ();
                [CCode (cname = "jsc_class_add_constructor_variadic")]
-               public JSC.Value add_constructor (string? name, [CCode (delegate_target_pos = 2.33333, 
destroy_notify_pos = 2.66667, type = "GCallback")] JSC.ClassConstructorCb callback, GLib.Type return_type);
+               public JSC.Value add_constructor (string? name, [CCode (delegate_target_pos = 2.33333, 
destroy_notify_pos = 2.66667, type = "GCallback")] owned JSC.ClassConstructorCb callback, GLib.Type 
return_type);
                [CCode (cname = "jsc_class_add_method_variadic")]
-               public void add_method (string name, [CCode (delegate_target_pos = 2.33333, 
destroy_notify_pos = 2.66667, type = "GCallback")] JSC.ClassMethodCb callback, GLib.Type return_type);
+               public void add_method (string name, [CCode (delegate_target_pos = 2.33333, 
destroy_notify_pos = 2.66667, type = "GCallback")] owned JSC.ClassMethodCb callback, GLib.Type return_type);
                public void add_property (string name, GLib.Type property_type, [CCode (scope = "async")] 
GLib.Callback? getter, GLib.Callback? setter, void* user_data, GLib.DestroyNotify? destroy_notify);
                public unowned string get_name ();
                public unowned JSC.Class get_parent ();
@@ -395,8 +395,8 @@ namespace JSC {
        public delegate JSC.Value? ClassGetPropertyFunction (JSC.Class jsc_class, JSC.Context context, void* 
instance, string name);
        [CCode (cheader_filename = "jsc/jsc.h", has_target = false)]
        public delegate bool ClassHasPropertyFunction (JSC.Class jsc_class, JSC.Context context, void* 
instance, string name);
-       [CCode (cheader_filename = "jsc/jsc.h", instance_pos = 0.9, type_cname = "GCallback")]
-       public delegate T ClassMethodCb<T> (GLib.GenericArray<JSC.Value> values);
+       [CCode (cheader_filename = "jsc/jsc.h", instance_pos = 2.9, type_cname = "GCallback")]
+       public delegate T ClassMethodCb<T> (JSC.Class instance, GLib.GenericArray<JSC.Value> values);
        [CCode (cheader_filename = "jsc/jsc.h", has_target = false)]
        public delegate bool ClassSetPropertyFunction (JSC.Class jsc_class, JSC.Context context, void* 
instance, string name, JSC.Value value);
        [CCode (cheader_filename = "jsc/jsc.h", instance_pos = 2.9)]
diff --git a/vapi/metadata/JavaScriptCore-4.0-custom.vala b/vapi/metadata/JavaScriptCore-4.0-custom.vala
index 42798b1f9..164c7e059 100644
--- a/vapi/metadata/JavaScriptCore-4.0-custom.vala
+++ b/vapi/metadata/JavaScriptCore-4.0-custom.vala
@@ -161,6 +161,6 @@ namespace JS {
 namespace JSC {
        [CCode (type_cname = "GCallback", instance_pos = 1.9)]
        public delegate T ClassConstructorCb<T> (GLib.GenericArray<JSC.Value> values);
-       [CCode (type_cname = "GCallback", instance_pos = 0.9)]
-       public delegate T ClassMethodCb<T> (GLib.GenericArray<JSC.Value> values);
+       [CCode (type_cname = "GCallback", instance_pos = 2.9)]
+       public delegate T ClassMethodCb<T> (JSC.Class instance, GLib.GenericArray<JSC.Value> values);
 }
diff --git a/vapi/metadata/JavaScriptCore-4.0.metadata b/vapi/metadata/JavaScriptCore-4.0.metadata
index d0ac3010c..5e5b14f90 100644
--- a/vapi/metadata/JavaScriptCore-4.0.metadata
+++ b/vapi/metadata/JavaScriptCore-4.0.metadata
@@ -7,11 +7,11 @@ Class
   .add_constructor skip
   .add_constructorv skip
   .add_constructor_variadic name="add_constructor"
-  .add_constructor_variadic.callback closure=2 destroy=3 type="JSC.ClassConstructorCb"
+  .add_constructor_variadic.callback type="owned JSC.ClassConstructorCb"
   .add_method skip
   .add_methodv skip
   .add_method_variadic name="add_method"
-  .add_method_variadic.callback closure=2 destroy=3 type="JSC.ClassMethodCb"
+  .add_method_variadic.callback type="owned JSC.ClassMethodCb"
 Value
   .new_function_variadic.callback closure=-1 destroy=-1 owned=false
   .new_functionv.callback closure=-1 destroy=-1 owned=false


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]