1 /* $RCSfile: hash.h,v $$Revision: 4.1 $$Date: 92/08/07 18:21:52 $
3 * Copyright (c) 1991, 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.
9 * Revision 4.1 92/08/07 18:21:52 lwall
11 * Revision 4.0.1.2 91/11/05 17:24:31 lwall
12 * patch11: random cleanup
14 * Revision 4.0.1.1 91/06/07 11:10:33 lwall
15 * patch4: new copyright notice
17 * Revision 4.0 91/03/20 01:22:38 lwall
22 #define FILLPCT 80 /* don't make greater than 99 */
23 #define DBM_CACHE_MAX 63 /* cache 64 entries for dbm file */
24 /* (resident array acts as a write-thru cache)*/
26 #define COEFFSIZE (16 * 8) /* size of coeff array */
39 char * xpv_pv; /* pointer to malloced string */
40 STRLEN xpv_cur; /* length of xp_pv as a C string */
41 STRLEN xpv_len; /* allocated size */
42 STRLEN xof_off; /* ptr is incremented by offset */
43 double xnv_nv; /* numeric value, if any */
44 MAGIC* xmg_magic; /* magic for scalar array */
45 HV* xmg_stash; /* class package */
47 MAGIC* xhv_magic; /* magic for elements */
50 I32 xhv_max; /* subscript of last element of xhv_array */
51 I32 xhv_dosplit; /* how full to get before splitting */
52 I32 xhv_fill; /* how full xhv_array currently is */
53 I32 xhv_riter; /* current root of iterator */
54 HE *xhv_eiter; /* current entry of iterator */
55 PMOP *xhv_pmroot; /* list of pm's for this package */
56 char *xhv_name; /* name, if a symbol table */
68 unsigned char xhv_coeffsize; /* is 0 for symbol tables */
71 #define Nullhv Null(HV*)
72 #define HvMAGIC(hv) ((XPVHV*) SvANY(hv))->xhv_magic
73 #define HvARRAY(hv) ((XPVHV*) SvANY(hv))->xhv_array
74 #define HvMAX(hv) ((XPVHV*) SvANY(hv))->xhv_max
75 #define HvDOSPLIT(hv) ((XPVHV*) SvANY(hv))->xhv_dosplit
76 #define HvFILL(hv) ((XPVHV*) SvANY(hv))->xhv_fill
77 #define HvRITER(hv) ((XPVHV*) SvANY(hv))->xhv_riter
78 #define HvEITER(hv) ((XPVHV*) SvANY(hv))->xhv_eiter
79 #define HvPMROOT(hv) ((XPVHV*) SvANY(hv))->xhv_pmroot
80 #define HvNAME(hv) ((XPVHV*) SvANY(hv))->xhv_name
81 #define HvDBM(hv) ((XPVHV*) SvANY(hv))->xhv_dbm
82 #define HvCOEFFSIZE(hv) ((XPVHV*) SvANY(hv))->xhv_coeffsize