File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -664,6 +664,7 @@ void (SET_HASHVALUE)(SEXP x, int v);
664664
665665/* Bytecode access macros */
666666#define BCODE_CODE (x ) CAR(x)
667+ #define BCODE_PTR (x ) ((BCODE *) DATAPTR(x))
667668//#define BCODE_CONSTS(x) CDR(x)
668669#define BCODE_EXPR (x ) TAG(x)
669670#define isByteCode (x ) (TYPEOF(x)==BCODESXP)
Original file line number Diff line number Diff line change @@ -5606,7 +5606,7 @@ static struct { void *addr; int argc; char *instname; } opinfo[OPCOUNT];
56065606#define GETOP () (*pc++).i
56075607#define SKIP_OP () (pc++)
56085608
5609- #define BCCODE (e ) (BCODE *) DATAPTR (BCODE_CODE(e))
5609+ #define BCCODE (e ) BCODE_PTR (BCODE_CODE(e))
56105610#else
56115611typedef int BCODE ;
56125612
@@ -8718,15 +8718,15 @@ attribute_hidden SEXP R_bcEncode(SEXP bytes)
87188718 v = ipc [0 ];
87198719 if (v < R_bcMinVersion || v > R_bcVersion ) {
87208720 code = allocVector (INTSXP , m * 2 );
8721- pc = ( BCODE * ) DATAPTR (code );
8721+ pc = BCODE_PTR (code );
87228722 pc [0 ].i = v ;
87238723 pc [1 ].v = opinfo [BCMISMATCH_OP ].addr ;
87248724 return code ;
87258725 }
87268726 else {
87278727 code = allocVector (INTSXP , m * n );
87288728 memset (INTEGER (code ), 0 , m * n * sizeof (int ));
8729- pc = ( BCODE * ) DATAPTR (code );
8729+ pc = BCODE_PTR (code );
87308730
87318731 for (i = 0 ; i < n ; i ++ ) pc [i ].i = ipc [i ];
87328732
@@ -8771,7 +8771,7 @@ attribute_hidden SEXP R_bcDecode(SEXP code) {
87718771 int m = (sizeof (BCODE ) + sizeof (int ) - 1 ) / sizeof (int );
87728772
87738773 n = LENGTH (code ) / m ;
8774- pc = ( BCODE * ) DATAPTR (code );
8774+ pc = BCODE_PTR (code );
87758775
87768776 bytes = allocVector (INTSXP , n );
87778777 ipc = INTEGER (bytes );
You can’t perform that action at this time.
0 commit comments