X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hv.h;h=f47a77b98b427f02bde2ce8badef1972fbd04c4f;hb=c067b4bea65bd7b97b0ae4f7b058dd94b44a4c48;hp=fc5bcdeb9b5ca68bfe8f3e42006717fcbcffbf0a;hpb=6f51351dc430b1cdbea64b49a24a0fc68a028a36;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hv.h b/hv.h index fc5bcde..f47a77b 100644 --- a/hv.h +++ b/hv.h @@ -8,10 +8,6 @@ * */ -/* typedefs to eliminate some typing */ -typedef struct he HE; -typedef struct hek HEK; - /* entry in hash value chain */ struct he { /* Keep hent_next first in this structure, because sv_free_arenas take @@ -86,7 +82,7 @@ typedef struct { /* The use of a temporary pointer and the casting games * is needed to serve the dual purposes of * (a) the hashed data being interpreted as "unsigned char" (new since 5.8, - * a "char" can be either signed or signed, depending on the compiler) + * a "char" can be either signed or unsigned, depending on the compiler) * (b) catering for old code that uses a "char" * * The "hash seed" feature was added in Perl 5.8.1 to perturb the results @@ -156,7 +152,8 @@ Null HV pointer. =head1 Hash Manipulation Functions =for apidoc Am|char*|HvNAME|HV* stash -Returns the package name of a stash. See C, C. +Returns the package name of a stash, or NULL if C isn't a stash. +See C, C. =for apidoc Am|void*|HeKEY|HE* he Returns the actual pointer stored in the key slot of the hash entry. The @@ -208,7 +205,7 @@ C. #define Nullhv Null(HV*) -#define HvARRAY(hv) (*(HE***)&((hv)->sv_u.svu_array)) +#define HvARRAY(hv) ((hv)->sv_u.svu_hash) #define HvFILL(hv) ((XPVHV*) SvANY(hv))->xhv_fill #define HvMAX(hv) ((XPVHV*) SvANY(hv))->xhv_max /* This quite intentionally does no flag checking first. That's your