[gjs: 2/10] object: Use is_custom_js_class() for readability



commit f3a94631116bc1c64bbf4aec8036f9ac3290741a
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun Dec 23 15:13:44 2018 -0700

    object: Use is_custom_js_class() for readability
    
    This expresses the intention more clearly than checking if info() is
    null.

 gi/object.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index 3a82bb38..6a0e566d 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -935,7 +935,7 @@ bool ObjectPrototype::new_enumerate_impl(JSContext* cx, JS::HandleObject obj,
 
     g_free(interfaces);
 
-    if (info()) {
+    if (!is_custom_js_class()) {
         // Methods
         int n_methods = g_object_info_get_n_methods(info());
         for (int i = 0; i < n_methods; i++) {


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