[gjs] function.c: Use a better toString



commit 05096d9234db2c9432af9038b8996412fa86f510
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Aug 24 15:59:26 2011 -0400

    function.c: Use a better toString
    
    It can be handy to know the actual symbol that you're calling, so improve the
    current toString by sticking the symbol name in there in place of the less
    useful "native code".
    
    https://bugzilla.gnome.org/show_bug.cgi?id=657279

 gi/function.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gi/function.c b/gi/function.c
index 9b02d00..ef644da 100644
--- a/gi/function.c
+++ b/gi/function.c
@@ -1081,8 +1081,9 @@ function_to_string (JSContext *context,
         string = "function () {\n}";
         free = FALSE;
     } else {
-        string = g_strdup_printf("function %s(){\n\t[native code]\n}",
-                                 g_base_info_get_name ((GIBaseInfo *) priv->info));
+        string = g_strdup_printf("function %s(){\n\t/* proxy for native symbol %s(); */\n}",
+                                 g_base_info_get_name ((GIBaseInfo *) priv->info),
+                                 g_function_info_get_symbol (priv->info));
         free = TRUE;
     }
 



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