[svn:parrot] r38711 - trunk/src

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


Author: NotFound
Date: Tue May 12 13:33:31 2009
New Revision: 38711
URL: https://trac.parrot.org/parrot/changeset/38711

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 10:35:10 2009	(r38710)
+++ trunk/src/packfile.c	Tue May 12 13:33:31 2009	(r38711)
@@ -2769,13 +2769,11 @@
 
     Parrot_io_printf(interp, "\n  mappings => [\n");
     for (i = 0; i < debug->num_mappings; i++) {
-        char * const filename = Parrot_str_to_cstring(interp,
-            PF_CONST(debug->code, debug->mappings[i]->filename)->u.string);;
         Parrot_io_printf(interp, "    #%d\n    [\n", i);
         Parrot_io_printf(interp, "        OFFSET => %d,\n",
                    debug->mappings[i]->offset);
-        Parrot_io_printf(interp, "        FILENAME => %s\n", filename);
-        Parrot_str_free_cstring(filename);
+        Parrot_io_printf(interp, "        FILENAME => %Ss\n",
+                PF_CONST(debug->code, debug->mappings[i]->filename)->u.string);
         Parrot_io_printf(interp, "    ],\n");
     }
 


More information about the parrot-commits mailing list