summaryrefslogtreecommitdiff
path: root/hv.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-10-29 08:59:33 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-10-29 21:50:24 -0700
commitbc56db2a697ebe59892fabdcfa5aa910ed4f2885 (patch)
tree46baa9108d034489f57815f9bc213b728fdd938c /hv.h
parent0c3bb3c2ad1fe4246d916a548cabaaa2590e7414 (diff)
downloadperl-bc56db2a697ebe59892fabdcfa5aa910ed4f2885.tar.gz
Add HvENAME
Add HvENAME as an alias for HvENAME_get and make it public. This is now the preferred name for use in isa caches.
Diffstat (limited to 'hv.h')
-rw-r--r--hv.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/hv.h b/hv.h
index 655be9ae38..81786a61ab 100644
--- a/hv.h
+++ b/hv.h
@@ -179,6 +179,14 @@ Null HV pointer.
Returns the package name of a stash, or NULL if C<stash> isn't a stash.
See C<SvSTASH>, C<CvSTASH>.
+=for apidoc Am|char*|HvENAME|HV* stash
+Returns the effective name of a stash, or NULL if there is none. The
+effective name represents a location in the symbol table where this stash
+resides. It is updated automatically when packages are aliased or deleted.
+A stash that is no longer in the symbol table has no effective name. This
+name is preferable to C<HvNAME> for use in MRO linearisations and isa
+caches.
+
=for apidoc Am|void*|HeKEY|HE* he
Returns the actual pointer stored in the key slot of the hash entry. The
pointer may be either C<char*> or C<SV*>, depending on the value of
@@ -254,6 +262,7 @@ C<SV*>.
#define HvRITER_get(hv) (SvOOK(hv) ? HvAUX(hv)->xhv_riter : -1)
#define HvEITER_get(hv) (SvOOK(hv) ? HvAUX(hv)->xhv_eiter : NULL)
#define HvNAME(hv) HvNAME_get(hv)
+#define HvENAME(hv) HvENAME_get(hv)
/* Checking that hv is a valid package stash is the
caller's responsibility */