From: Rafael Garcia-Suarez Date: Wed, 25 Jun 2003 19:27:42 +0000 (+0000) Subject: Enhance some macro robustness. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4a36906c901082f7d1273bc52cc5f404d69033f5;p=p5sagit%2Fp5-mst-13.2.git Enhance some macro robustness. p4raw-id: //depot/perl@19852 --- diff --git a/opcode.h b/opcode.h index 9c1537b..159d74d 100644 --- a/opcode.h +++ b/opcode.h @@ -21,10 +21,10 @@ START_EXTERN_C -#define OP_NAME(o) (o->op_type == OP_CUSTOM ? custom_op_name(o) : \ - PL_op_name[o->op_type]) -#define OP_DESC(o) (o->op_type == OP_CUSTOM ? custom_op_desc(o) : \ - PL_op_desc[o->op_type]) +#define OP_NAME(o) ((o)->op_type == OP_CUSTOM ? custom_op_name(o) : \ + PL_op_name[(o)->op_type]) +#define OP_DESC(o) ((o)->op_type == OP_CUSTOM ? custom_op_desc(o) : \ + PL_op_desc[(o)->op_type]) #ifndef DOINIT EXT char *PL_op_name[]; diff --git a/opcode.pl b/opcode.pl index e5f6d3e..5a3beed 100755 --- a/opcode.pl +++ b/opcode.pl @@ -90,10 +90,10 @@ print <op_type == OP_CUSTOM ? custom_op_name(o) : \\ - PL_op_name[o->op_type]) -#define OP_DESC(o) (o->op_type == OP_CUSTOM ? custom_op_desc(o) : \\ - PL_op_desc[o->op_type]) +#define OP_NAME(o) ((o)->op_type == OP_CUSTOM ? custom_op_name(o) : \\ + PL_op_name[(o)->op_type]) +#define OP_DESC(o) ((o)->op_type == OP_CUSTOM ? custom_op_desc(o) : \\ + PL_op_desc[(o)->op_type]) #ifndef DOINIT EXT char *PL_op_name[];