[svn:parrot] r45484 - trunk/src/pmc

chromatic at svn.parrot.org chromatic at svn.parrot.org
Fri Apr 9 06:09:30 UTC 2010


Author: chromatic
Date: Fri Apr  9 06:09:30 2010
New Revision: 45484
URL: https://trac.parrot.org/parrot/changeset/45484

Log:
[PMC] Fixed a compiler warning in Packfile PMC's set_string_native VTABLE.

Modified:
   trunk/src/pmc/packfile.pmc

Modified: trunk/src/pmc/packfile.pmc
==============================================================================
--- trunk/src/pmc/packfile.pmc	Fri Apr  9 05:47:24 2010	(r45483)
+++ trunk/src/pmc/packfile.pmc	Fri Apr  9 06:09:30 2010	(r45484)
@@ -168,17 +168,21 @@
 =cut
 
 Implementation note: taken from the bottom end of Parrot_pbc_read().
+
 */
+
     VTABLE void set_string_native(STRING *str) {
-        PackFile  * const pf  = PackFile_new(interp, 0);
-        opcode_t  * const ptr = (opcode_t *)Parrot_string_cstring(interp, str);
-        const int length      = Parrot_str_byte_length(interp, str);
         Parrot_Packfile_attributes * const attrs = PARROT_PACKFILE(SELF);
+        PackFile                   * const pf    = PackFile_new(interp, 0);
+        const opcode_t             * const ptr   =
+                (const opcode_t *)Parrot_string_cstring(interp, str);
+
+        const int length = Parrot_str_byte_length(interp, str);
 
         if (!PackFile_unpack(interp, pf, ptr, length)) {
             PackFile_destroy(interp, pf);
-            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_PACKFILE,
-                                        "Can't unpack packfile.");
+            Parrot_ex_throw_from_c_args(interp, NULL,
+                EXCEPTION_MALFORMED_PACKFILE, "Can't unpack packfile.");
         }
 
         /* Disable GC during copy data into internal structures. */


More information about the parrot-commits mailing list