summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-09-03 12:08:23 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-09-03 12:08:23 +0000
commit113b9ccf36972dcace0731b141e2be76cf4d465d (patch)
tree62f4bf368ed29ca53a660352cd4ff37e5d88f119
parent65016084af09f85fdd5829e6f87016680cf5024b (diff)
downloadperl-113b9ccf36972dcace0731b141e2be76cf4d465d.tar.gz
Avoid lvalue casts, from Enache.
p4raw-id: //depot/perl@21018
-rw-r--r--ext/ByteLoader/bytecode.h2
-rw-r--r--op.h9
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 { \
diff --git a/op.h b/op.h
index ed38438318..539393dd1f 100644
--- a/op.h
+++ b/op.h
@@ -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