[svn:parrot] r38764 - trunk/src

petdance at svn.parrot.org petdance at svn.parrot.org
Thu May 14 03:55:23 UTC 2009


Author: petdance
Date: Thu May 14 03:55:22 2009
New Revision: 38764
URL: https://trac.parrot.org/parrot/changeset/38764

Log:
simplify calculation a lot

Modified:
   trunk/src/packfile.c

Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c	Thu May 14 02:16:03 2009	(r38763)
+++ trunk/src/packfile.c	Thu May 14 03:55:22 2009	(r38764)
@@ -2633,19 +2633,8 @@
 {
     ASSERT_ARGS(pf_debug_packed_size)
     PackFile_Debug * const debug = (PackFile_Debug *)self;
-    int                    size = 0;
-    int i;
-
-    /* Size of mappings count. */
-    size += 1;
-
-    /* Size of entries in mappings list. */
-    for (i = 0; i < debug->num_mappings; i++) {
-        /* Bytecode offset and filename */
-        size += 2;
-    }
 
-    return size;
+    return (debug->num_mappings*2) + 1;
 }
 
 


More information about the parrot-commits mailing list