develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r36097 - trunk/compilers/pirc/src

From:
infinoid
Date:
January 28, 2009 08:42
Subject:
[svn:parrot] r36097 - trunk/compilers/pirc/src
Message ID:
20090128164158.27249CB9AE@x12.develooper.com
Author: infinoid
Date: Wed Jan 28 08:41:57 2009
New Revision: 36097

Modified:
   trunk/compilers/pirc/src/bcgen.c

Log:
[pirc] Fix a 64-bitness issue (opcode_t does change size).

Modified: trunk/compilers/pirc/src/bcgen.c
==============================================================================
--- trunk/compilers/pirc/src/bcgen.c	(original)
+++ trunk/compilers/pirc/src/bcgen.c	Wed Jan 28 08:41:57 2009
@@ -416,9 +416,9 @@
 */
 void
 create_codesegment(bytecode * const bc, int codesize) {
-    /* allocate enough space. XXX I *think* bytes is /always/ codesize * 4. */
+    /* allocate enough space. */
     bc->interp->code->base.data = (opcode_t *)mem_sys_realloc(bc->interp->code->base.data,
-                                                              codesize * 4);
+                                                              codesize * sizeof (opcode_t));
     /* store the size of the code-segment */
     bc->interp->code->base.size = codesize;
 



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About