Branch: refs/heads/zefram/cmpchain
Home: https://github.com/Perl/perl5
Commit: c741e12cc05a0d6b9716660881814c508ef97afb
https://github.com/Perl/perl5/commit/c741e12cc05a0d6b9716660881814c508ef97afb
Author: Yves Orton <[email protected]>
Date: 2020-02-08 (Sat, 08 Feb 2020)
Changed paths:
M embed.fnc
M op.c
M proto.h
Log Message:
-----------
op.c: change Optype to I32 for cmpchain functions
Optype appears to be almost completely unused, and on Win32 builds
we saw strange build errors after applying the cmpchain patches.
The only relevant changes were in perly.y
perly.y(1063) : warning C4244: 'function' : conversion from 'I32' to
'Optype', possible loss of data
perly.y(1065) : warning C4244: 'function' : conversion from 'I32' to
'Optype', possible loss of data
perly.y(1079) : warning C4244: 'function' : conversion from 'I32' to
'Optype', possible loss of data
perly.y(1081) : warning C4244: 'function' : conversion from 'I32' to
'Optype', possible loss of data
Reviewing the code I noticed that functions like Perl_newBINOP() have
an I32 type argument, and functions like OpTYPE_set() coerce such
arguments into type OPCODE:
#define OpTYPE_set(o,type) \
STMT_START { \
o->op_type = (OPCODE)type; \
o->op_ppaddr = PL_ppaddr[type]; \
} STMT_END
this patch changes the signature to the new cmpchain functions so that
they do they same, and added OPCODE casts to places that set o->op_type