In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/64afbd292eada08042044fb6bc5a8dabf803ec53?hp=1935dcd61ef34854d3c3c455914b77c486e676b8>
- Log ----------------------------------------------------------------- commit 64afbd292eada08042044fb6bc5a8dabf803ec53 Author: David Mitchell <[email protected]> Date: Tue Jan 24 11:48:00 2017 +0000 perldelta entries for op_class() and op_dump() Entries for cd6e487 and 1e85b65 M pod/perldelta.pod commit e8f6c72afeb9caf7f6f125ba8c68f4aca5cb67a5 Author: David Mitchell <[email protected]> Date: Tue Jan 24 11:38:30 2017 +0000 OP_CLASS() docs - mention op_class() too M op.h ----------------------------------------------------------------------- Summary of changes: op.h | 5 ++++- pod/perldelta.pod | 13 ++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/op.h b/op.h index 4e3012fc8a..97dea42769 100644 --- a/op.h +++ b/op.h @@ -927,7 +927,10 @@ Return a short description of the provided OP. =for apidoc Am|U32|OP_CLASS|OP *o Return the class of the provided OP: that is, which of the *OP structures it uses. For core ops this currently gets the information out -of C<PL_opargs>, which does not always accurately reflect the type used. +of C<PL_opargs>, which does not always accurately reflect the type used; +in v5.26 onwards, see also the function C<L</op_class>> which can do a better +job of determining the used type. + For custom ops the type is returned from the registration, and it is up to the registree to ensure it is accurate. The value returned will be one of the C<OA_>* constants from F<op.h>. diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 3b3419540d..765d572880 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -326,7 +326,18 @@ well. =item * -XXX +The C<op_class()> API function has been added. This is like the existing +C<OP_CLASS()> macro, but can more accurately determine what struct an op +has been allocated as. For example C<OP_CLASS()> might return +C<OA_BASEOP_OR_UNOP> indicating that ops of this type are usually +allocated as an C<OP> or C<UNOP>; while <op_class()> will return +C<OPclass_BASEOP> or C<OPclass_UNOP> as appropriate. + +=item * + +The output format of the C<op_dump()> function (as used by C<perl -Dx>) +has changed: it now displays an "ASCII-art" tree structure, and shows more +low-level details about each op, such as its address and class. =back -- Perl5 Master Repository
