[svn:parrot] r48409 - branches/dynop_mapping/src
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Wed Aug 11 04:22:02 UTC 2010
Author: plobsing
Date: Wed Aug 11 04:22:01 2010
New Revision: 48409
URL: https://trac.parrot.org/parrot/changeset/48409
Log:
C++-ify
Modified:
branches/dynop_mapping/src/embed.c
branches/dynop_mapping/src/packfile.c
branches/dynop_mapping/src/pbc_dump.c
branches/dynop_mapping/src/pbc_merge.c
Modified: branches/dynop_mapping/src/embed.c
==============================================================================
--- branches/dynop_mapping/src/embed.c Wed Aug 11 03:42:13 2010 (r48408)
+++ branches/dynop_mapping/src/embed.c Wed Aug 11 04:22:01 2010 (r48409)
@@ -1079,7 +1079,7 @@
{
ASSERT_ARGS(Parrot_run_native)
PackFile * const pf = PackFile_new(interp, 0);
- static const opcode_t program_code[2] = {
+ static opcode_t program_code[2] = {
0, /* enternative */
1 /* end */
};
Modified: branches/dynop_mapping/src/packfile.c
==============================================================================
--- branches/dynop_mapping/src/packfile.c Wed Aug 11 03:42:13 2010 (r48408)
+++ branches/dynop_mapping/src/packfile.c Wed Aug 11 04:22:01 2010 (r48409)
@@ -73,7 +73,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-static opcode_t * byte_code_unpack(PARROT_INTERP,
+static const opcode_t * byte_code_unpack(PARROT_INTERP,
ARGMOD(PackFile_Segment *self),
ARGIN(const opcode_t *cursor))
__attribute__nonnull__(1)
@@ -2748,7 +2748,7 @@
/*
-=item C<static opcode_t * byte_code_unpack(PARROT_INTERP, PackFile_Segment
+=item C<static const opcode_t * byte_code_unpack(PARROT_INTERP, PackFile_Segment
*self, const opcode_t *cursor)>
Unpacks a bytecode segment into the passed C<PackFile_ByteCode>.
@@ -2759,7 +2759,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-static opcode_t *
+static const opcode_t *
byte_code_unpack(PARROT_INTERP, ARGMOD(PackFile_Segment *self), ARGIN(const opcode_t *cursor))
{
ASSERT_ARGS(byte_code_unpack)
@@ -2796,16 +2796,17 @@
entry->lib = PARROT_CORE_OPLIB_INIT(interp, 1);
}
else {
- const PMC *lib_pmc = Parrot_load_lib(interp,
+ PMC *lib_pmc = Parrot_load_lib(interp,
Parrot_str_new(interp, lib_name, 0),
NULL);
+ typedef op_lib_t *(*oplib_init_t)(PARROT_INTERP, long init);
void *oplib_init;
- op_lib_t *(*oplib_init_f)(PARROT_INTERP, long init);
+ oplib_init_t oplib_init_f;
if (!VTABLE_get_bool(interp, lib_pmc))
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
"Could not load oplib `%s'", lib_name);
GETATTR_ParrotLibrary_oplib_init(interp, lib_pmc, oplib_init);
- oplib_init_f = D2FPTR(oplib_init);
+ oplib_init_f = (oplib_init_t)D2FPTR(oplib_init);
entry->lib = oplib_init_f(interp, 1);
}
Modified: branches/dynop_mapping/src/pbc_dump.c
==============================================================================
--- branches/dynop_mapping/src/pbc_dump.c Wed Aug 11 03:42:13 2010 (r48408)
+++ branches/dynop_mapping/src/pbc_dump.c Wed Aug 11 04:22:01 2010 (r48409)
@@ -159,9 +159,9 @@
const PackFile_Segment *debug = PackFile_find_segment(interp,
self->dir, debug_name, 1);
- const opcode_t * pc = self->data;
- const opcode_t * debug_ops = debug->data;
- const op_info_t ** const op_info = interp->code->op_info_table;
+ opcode_t * pc = self->data;
+ opcode_t * debug_ops = debug->data;
+ op_info_t ** const op_info = interp->code->op_info_table;
while (pc < self->data + self->size) {
/* n can't be const; the ADD_OP_VAR_PART macro increments it */
Modified: branches/dynop_mapping/src/pbc_merge.c
==============================================================================
--- branches/dynop_mapping/src/pbc_merge.c Wed Aug 11 03:42:13 2010 (r48408)
+++ branches/dynop_mapping/src/pbc_merge.c Wed Aug 11 04:22:01 2010 (r48409)
@@ -692,7 +692,7 @@
pbc_fixup_bytecode(PARROT_INTERP, ARGMOD(pbc_merge_input **inputs),
int num_inputs, ARGMOD(PackFile_ByteCode *bc))
{
- ASSERT_ARGS(pbc_merge_ctpointers)
+ ASSERT_ARGS(pbc_fixup_bytecode)
int cur_arg;
opcode_t *op_ptr;
opcode_t *ops = bc->base.data;
More information about the parrot-commits
mailing list