diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-09-03 12:08:23 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-09-03 12:08:23 +0000 |
commit | 113b9ccf36972dcace0731b141e2be76cf4d465d (patch) | |
tree | 62f4bf368ed29ca53a660352cd4ff37e5d88f119 | |
parent | 65016084af09f85fdd5829e6f87016680cf5024b (diff) | |
download | perl-113b9ccf36972dcace0731b141e2be76cf4d465d.tar.gz |
Avoid lvalue casts, from Enache.
p4raw-id: //depot/perl@21018
-rw-r--r-- | ext/ByteLoader/bytecode.h | 2 | ||||
-rw-r--r-- | op.h | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/ext/ByteLoader/bytecode.h b/ext/ByteLoader/bytecode.h index d26448239a..667de7d979 100644 --- a/ext/ByteLoader/bytecode.h +++ b/ext/ByteLoader/bytecode.h @@ -32,7 +32,7 @@ typedef char *pvindex; BGET_U32(arg); \ if (arg) { \ New(666, bstate->bs_pv.xpv_pv, arg, char); \ - bl_read(bstate->bs_fdata, (void*)bstate->bs_pv.xpv_pv, arg, 1);\ + bl_read(bstate->bs_fdata, bstate->bs_pv.xpv_pv, arg, 1); \ bstate->bs_pv.xpv_len = arg; \ bstate->bs_pv.xpv_cur = arg - 1; \ } else { \ @@ -485,14 +485,13 @@ struct loop { #if defined(PL_OP_SLAB_ALLOC) #define NewOp(m,var,c,type) \ - STMT_START { \ - var = (type *) Perl_Slab_Alloc(aTHX_ m,c*sizeof(type));\ - } STMT_END + (var = (type *) Perl_Slab_Alloc(aTHX_ m,c*sizeof(type))) #define NewOpSz(m,var,size) \ - STMT_START { var = (OP *) Perl_Slab_Alloc(aTHX_ m,size); } STMT_END + (var = (OP *) Perl_Slab_Alloc(aTHX_ m,size)) #define FreeOp(p) Perl_Slab_Free(aTHX_ p) #else #define NewOp(m, var, c, type) Newz(m, var, c, type) -#define NewOpSz(m, var, size) Newz(m, (char*)var, size, char) +#define NewOpSz(m, var, size) \ + (var = (OP*)safemalloc(size), memzero(var, size)) #define FreeOp(p) Safefree(p) #endif |