[svn:parrot] r48725 - in trunk: compilers/imcc src
nwellnhof at svn.parrot.org
nwellnhof at svn.parrot.org
Mon Aug 30 15:21:21 UTC 2010
Author: nwellnhof
Date: Mon Aug 30 15:21:20 2010
New Revision: 48725
URL: https://trac.parrot.org/parrot/changeset/48725
Log:
Fix old size in realloc
Modified:
trunk/compilers/imcc/pbc.c
trunk/src/pbc_merge.c
Modified: trunk/compilers/imcc/pbc.c
==============================================================================
--- trunk/compilers/imcc/pbc.c Mon Aug 30 07:23:21 2010 (r48724)
+++ trunk/compilers/imcc/pbc.c Mon Aug 30 15:21:20 2010 (r48725)
@@ -739,11 +739,11 @@
/* op not yet mapped */
bc->op_count++;
bc->op_func_table =
- mem_gc_realloc_n_typed_zeroed(interp, bc->op_func_table, bc->op_count, bc->op_count,
+ mem_gc_realloc_n_typed_zeroed(interp, bc->op_func_table, bc->op_count, bc->op_count - 1,
op_func_t);
bc->op_func_table[bc->op_count - 1] = op_func;
bc->op_info_table =
- mem_gc_realloc_n_typed_zeroed(interp, bc->op_info_table, bc->op_count, bc->op_count,
+ mem_gc_realloc_n_typed_zeroed(interp, bc->op_info_table, bc->op_count, bc->op_count - 1,
op_info_t *);
bc->op_info_table[bc->op_count - 1] = info;
Modified: trunk/src/pbc_merge.c
==============================================================================
--- trunk/src/pbc_merge.c Mon Aug 30 07:23:21 2010 (r48724)
+++ trunk/src/pbc_merge.c Mon Aug 30 15:21:20 2010 (r48725)
@@ -648,11 +648,11 @@
/* op not yet mapped */
bc->op_count++;
bc->op_func_table =
- mem_gc_realloc_n_typed_zeroed(interp, bc->op_func_table, bc->op_count, bc->op_count,
+ mem_gc_realloc_n_typed_zeroed(interp, bc->op_func_table, bc->op_count, bc->op_count - 1,
op_func_t);
bc->op_func_table[bc->op_count - 1] = op_func;
bc->op_info_table =
- mem_gc_realloc_n_typed_zeroed(interp, bc->op_info_table, bc->op_count, bc->op_count,
+ mem_gc_realloc_n_typed_zeroed(interp, bc->op_info_table, bc->op_count, bc->op_count - 1,
op_info_t *);
bc->op_info_table[bc->op_count - 1] = info;
More information about the parrot-commits
mailing list