After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657279 - function.c: Use a better toString
function.c: Use a better toString
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-24 19:59 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2011-08-25 18:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
function.c: Use a better toString (1.16 KB, patch)
2011-08-24 19:59 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
function.c: Use a better toString (1.19 KB, patch)
2011-08-25 17:39 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2011-08-24 19:59:52 UTC
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".
Comment 1 Jasper St. Pierre (not reading bugmail) 2011-08-24 19:59:54 UTC
Created attachment 194656 [details] [review]
function.c: Use a better toString
Comment 2 Colin Walters 2011-08-25 17:26:23 UTC
Review of attachment 194656 [details] [review]:

::: gi/function.c
@@ +1084,3 @@
+        string = g_strdup_printf("function %s(){\n\t[%s]\n}",
+                                 g_base_info_get_name ((GIBaseInfo *) priv->info),
+                                 g_function_info_get_symbol (priv->info));

I'd prefer to keep the term "native" in there somewhere, or just a hint that it's Not JavaScript in some way.

How about:  

function foo() { /* proxy for native symbol someclass_foo(); */ }
Comment 3 Jasper St. Pierre (not reading bugmail) 2011-08-25 17:39:47 UTC
Created attachment 194725 [details] [review]
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".



This better?
Comment 4 Colin Walters 2011-08-25 17:40:57 UTC
Review of attachment 194725 [details] [review]:

Cool by me.
Comment 5 Jasper St. Pierre (not reading bugmail) 2011-08-25 18:00:57 UTC
Attachment 194725 [details] pushed as 05096d9 - function.c: Use a better toString