diff options
author | Yves Orton <demerphq@gmail.com> | 2016-10-19 22:44:45 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2016-10-19 22:44:45 +0200 |
commit | 2155384086267a57ee889c698fad3a1380105303 (patch) | |
tree | bce77c9b06c2c056829e99d5074425965c8b3fd5 /perl.h | |
parent | 04a83e5bd7a0783edd6a771c965154e14a103644 (diff) | |
download | perl-2155384086267a57ee889c698fad3a1380105303.tar.gz |
Add a way to have functions with a trailing depth argument under debugging
In the regex engine it can be useful in debugging mode to
maintain a depth counter, but in normal mode this argument
would be unused. This allows us to define functions in embed.fnc
with a "W" flag which use _pDEPTH and _aDEPTH defines which
effectively define/pass through a U32 depth parameter to the
macro wrappers. These defines are similar to the existing
aTHX and pTHX parameters.
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -11,6 +11,16 @@ #ifndef H_PERL #define H_PERL 1 +/* this is used for functions which take a depth trailing + * argument under debugging */ +#ifdef DEBUGGING +#define _pDEPTH ,U32 depth +#define _aDEPTH ,depth +#else +#define _pDEPTH +#define _aDEPTH +#endif + #ifdef PERL_FOR_X2P /* * This file is being used for x2p stuff. @@ -7328,6 +7338,7 @@ INFNAN_NV_U8_DECL PL_nan; #endif /* DOUBLE_HAS_NAN */ + /* (KEEP THIS LAST IN perl.h!) |