[svn:parrot] r38713 - trunk/src

NotFound at svn.parrot.org NotFound at svn.parrot.org
Tue May 12 13:58:55 UTC 2009


Author: NotFound
Date: Tue May 12 13:58:54 2009
New Revision: 38713
URL: https://trac.parrot.org/parrot/changeset/38713

Log:
[cage] avoid a string to cstring conversion

Modified:
   trunk/src/packfile.c

Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c	Tue May 12 13:57:34 2009	(r38712)
+++ trunk/src/packfile.c	Tue May 12 13:58:54 2009	(r38713)
@@ -4341,17 +4341,15 @@
     /* Dump keys. */
     Parrot_io_printf(interp, "\n  keys => [\n");
     for (i = 0; i < self->num_keys; i++) {
-        char * const key_name = Parrot_str_to_cstring(interp,
-                PF_CONST(self->code, self->keys[i]->name)->u.string);
         Parrot_io_printf(interp, "    #%d\n    [\n", i);
-        Parrot_io_printf(interp, "        NAME => %s\n", key_name);
+        Parrot_io_printf(interp, "        NAME => %Ss\n",
+                PF_CONST(self->code, self->keys[i]->name)->u.string);
         Parrot_io_printf(interp, "        TYPE => %s\n",
                 self->keys[i]->type == PF_ANNOTATION_KEY_TYPE_INT ? "integer" :
                 self->keys[i]->type == PF_ANNOTATION_KEY_TYPE_STR ? "string" :
                 self->keys[i]->type == PF_ANNOTATION_KEY_TYPE_NUM ? "number" :
                 "PMC");
         Parrot_io_printf(interp, "    ],\n");
-        Parrot_str_free_cstring(key_name);
     }
 
     Parrot_io_printf(interp, "  ],\n");


More information about the parrot-commits mailing list