[gjs] object: Move private callbacks to the private scope



commit ac77aa2faf39aa6782157bd0745192702ed10408
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Thu May 13 18:30:06 2021 +0200

    object: Move private callbacks to the private scope

 gi/object.cpp | 2 +-
 gi/object.h   | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index 17e40674..fe2691aa 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1107,7 +1107,7 @@ bool ObjectPrototype::props_to_g_parameters(JSContext* context,
     return true;
 }
 
-static void wrapped_gobj_dispose_notify(
+void ObjectInstance::wrapped_gobj_dispose_notify(
     void* data, GObject* where_the_object_was GJS_USED_VERBOSE_LIFECYCLE) {
     auto *priv = static_cast<ObjectInstance *>(data);
     priv->gobj_dispose_notify();
diff --git a/gi/object.h b/gi/object.h
index af9766d1..18f02d5e 100644
--- a/gi/object.h
+++ b/gi/object.h
@@ -488,13 +488,14 @@ class ObjectInstance : public GIWrapperInstance<ObjectBase, ObjectPrototype,
                         GType expected_type) const;
 
     /* Notification callbacks */
+    void gobj_dispose_notify(void);
+    static void wrapped_gobj_dispose_notify(void* data, GObject*);
+    static void wrapped_gobj_toggle_notify(void* instance, GObject* gobj,
+                                           gboolean is_last_ref);
 
  public:
-    void gobj_dispose_notify(void);
     static void context_dispose_notify(void* data,
                                        GObject* where_the_object_was);
-    static void wrapped_gobj_toggle_notify(void* instance, GObject* gobj,
-                                           gboolean is_last_ref);
 };
 
 GJS_JSAPI_RETURN_CONVENTION


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