From ca337316984db69ef8c629fa7228a5d8e486f363 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Thu, 21 Aug 2003 04:30:54 +0000 Subject: Byteloader patching from Enache continues; PADOFFSET handling was wrong. p4raw-id: //depot/perl@20792 --- ext/ByteLoader/bytecode.h | 2 ++ ext/ByteLoader/byterun.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'ext/ByteLoader') diff --git a/ext/ByteLoader/bytecode.h b/ext/ByteLoader/bytecode.h index 8ca9382fa6..c0093a5b62 100644 --- a/ext/ByteLoader/bytecode.h +++ b/ext/ByteLoader/bytecode.h @@ -20,6 +20,8 @@ typedef char *pvindex; BGET_FREAD(&arg, sizeof(U32), 1) #define BGET_UV(arg) \ BGET_FREAD(&arg, sizeof(UV), 1) +#define BGET_PADOFFSET(arg) \ + BGET_FREAD(&arg, sizeof(PADOFFSET), 1) #define BGET_I32(arg) BGET_U32(arg) #define BGET_IV(arg) BGET_UV(arg) diff --git a/ext/ByteLoader/byterun.c b/ext/ByteLoader/byterun.c index 0a8afc627a..abf8fecefd 100644 --- a/ext/ByteLoader/byterun.c +++ b/ext/ByteLoader/byterun.c @@ -738,7 +738,7 @@ byterun(pTHX_ register struct byteloader_state *bstate) case INSN_OP_TARG: /* 97 */ { PADOFFSET arg; - BGET_U32(arg); + BGET_PADOFFSET(arg); PL_op->op_targ = arg; break; } @@ -823,7 +823,7 @@ byterun(pTHX_ register struct byteloader_state *bstate) case INSN_OP_PMREPLROOTPO: /* 109 */ { PADOFFSET arg; - BGET_U32(arg); + BGET_PADOFFSET(arg); cPMOP->op_pmreplroot = (OP*)arg; break; } @@ -881,7 +881,7 @@ byterun(pTHX_ register struct byteloader_state *bstate) case INSN_OP_PADIX: /* 117 */ { PADOFFSET arg; - BGET_U32(arg); + BGET_PADOFFSET(arg); cPADOP->op_padix = arg; break; } -- cgit v1.2.1