3 * Copyright (c) 1991-1994, Larry Wall
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
21 char * xhv_array; /* pointer to malloced string */
22 STRLEN xhv_fill; /* how full xhv_array currently is */
23 STRLEN xhv_max; /* subscript of last element of xhv_array */
24 I32 xhv_keys; /* how many elements in the array */
25 double xnv_nv; /* numeric value, if any */
26 MAGIC* xmg_magic; /* magic for scalar array */
27 HV* xmg_stash; /* class package */
29 I32 xhv_riter; /* current root of iterator */
30 HE *xhv_eiter; /* current entry of iterator */
31 PMOP *xhv_pmroot; /* list of pm's for this package */
32 char *xhv_name; /* name, if a symbol table */
35 #define Nullhv Null(HV*)
36 #define HvARRAY(hv) ((HE**)((XPVHV*) SvANY(hv))->xhv_array)
37 #define HvFILL(hv) ((XPVHV*) SvANY(hv))->xhv_fill
38 #define HvMAX(hv) ((XPVHV*) SvANY(hv))->xhv_max
39 #define HvKEYS(hv) ((XPVHV*) SvANY(hv))->xhv_keys
40 #define HvRITER(hv) ((XPVHV*) SvANY(hv))->xhv_riter
41 #define HvEITER(hv) ((XPVHV*) SvANY(hv))->xhv_eiter
42 #define HvPMROOT(hv) ((XPVHV*) SvANY(hv))->xhv_pmroot
43 #define HvNAME(hv) ((XPVHV*) SvANY(hv))->xhv_name
48 /* #define HV_AMAGICmb(hv) (SvFLAGS(hv) & (SVpgv_badAM | SVpgv_AM)) */
50 #define HV_AMAGIC(hv) (SvFLAGS(hv) & SVpgv_AM)
51 #define HV_AMAGIC_on(hv) (SvFLAGS(hv) |= SVpgv_AM)
52 #define HV_AMAGIC_off(hv) (SvFLAGS(hv) &= ~SVpgv_AM)
55 #define HV_AMAGICbad(hv) (SvFLAGS(hv) & SVpgv_badAM)
56 #define HV_badAMAGIC_on(hv) (SvFLAGS(hv) |= SVpgv_badAM)
57 #define HV_badAMAGIC_off(hv) (SvFLAGS(hv) &= ~SVpgv_badAM)