Skip to content

Commit

Permalink
Use explicit const_cast to pacify c++ compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
bacek committed Jan 31, 2011
1 parent 91d348b commit 6176f08
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pmc/imageiothaw.pmc
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ Retrieve a float as the next item from the image.
PackFile *pf = PARROT_IMAGEIOTHAW(SELF)->pf;
const opcode_t *curs = PARROT_IMAGEIOTHAW(SELF)->curs;
FLOATVAL f = PF_fetch_number(pf, &curs);
PARROT_IMAGEIOTHAW(SELF)->curs = (opcode_t *)curs;
DECL_CONST_CAST;
PARROT_IMAGEIOTHAW(SELF)->curs = PARROT_const_cast(opcode_t *, curs);
BYTECODE_SHIFT_OK(INTERP, SELF);
return f;
}
Expand Down Expand Up @@ -290,7 +291,8 @@ Retrieve a string as the next item from the image.
PackFile *pf = PARROT_IMAGEIOTHAW(SELF)->pf;
const opcode_t *curs = PARROT_IMAGEIOTHAW(SELF)->curs;
STRING *s = PF_fetch_string(INTERP, pf, &curs);
PARROT_IMAGEIOTHAW(SELF)->curs = (opcode_t *)curs;
DECL_CONST_CAST;
PARROT_IMAGEIOTHAW(SELF)->curs = PARROT_const_cast(opcode_t *, curs);
BYTECODE_SHIFT_OK(INTERP, SELF);
return s;
}
Expand Down

0 comments on commit 6176f08

Please sign in to comment.