diff options
author | Ben Morrow <ben@morrow.me.uk> | 2010-08-31 07:10:20 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-09-07 12:10:19 +0200 |
commit | 8dff4fc578385a16edd29a881d85a0aa5f09595a (patch) | |
tree | 631c8a7c8744e44cc7ed9c1acda586ddd965fafd /hv.h | |
parent | 134bbc579801d70bf58eb3e84c78e4c2c244899e (diff) | |
download | perl-8dff4fc578385a16edd29a881d85a0aa5f09595a.tar.gz |
API functions for accessing the runtime hinthash.
Add hinthash_fetch(sv|pv[ns]) as a replacement for refcounted_he_fetch,
which is not API (and should not be). Also add caller_cx, as the correct
XS equivalent to caller(). Lots of modules seem to have copies of this,
so a proper API function will be more maintainable in future.
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -450,6 +450,13 @@ C<SV*>. between threads (because it hangs from OPs, which are shared), hence the alternate definition and mutex. */ +#define cop_hints_fetchsv(cop, keysv, hash) \ + Perl_cop_hints_fetchpvn(aTHX_ (cop), SvPV_nolen(keysv), SvCUR(keysv), \ + (SvUTF8(keysv) ? HVhek_UTF8 : 0), (hash)) + +#define cop_hints_fetchpvs(cop, key) \ + Perl_cop_hints_fetchpvn(aTHX_ (cop), STR_WITH_LEN(key), 0, 0) + struct refcounted_he; #ifdef PERL_CORE |