1 /* $RCSfile: array.h,v $$Revision: 4.1 $$Date: 92/08/07 17:18:24 $
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 17:18:24 lwall
12 * Revision 4.0.1.2 92/06/08 11:45:57 lwall
13 * patch20: removed implicit int declarations on funcions
15 * Revision 4.0.1.1 91/06/07 10:19:20 lwall
16 * patch4: new copyright notice
18 * Revision 4.0 91/03/20 01:03:44 lwall
24 char * xpv_pv; /* pointer to malloced string */
25 STRLEN xpv_cur; /* length of xp_pv as a C string */
26 STRLEN xpv_len; /* allocated size */
27 STRLEN xof_off; /* ptr is incremented by offset */
28 double xnv_nv; /* numeric value, if any */
29 MAGIC* xmg_magic; /* magic for scalar array */
30 HV* xmg_stash; /* class package */
32 MAGIC* xav_magic; /* magic for elements */
42 #define AVf_REAL 1 /* free old entries */
44 #define Nullav Null(AV*)
46 #define AvMAGIC(av) ((XPVAV*) SvANY(av))->xav_magic
47 #define AvARRAY(av) ((XPVAV*) SvANY(av))->xav_array
48 #define AvALLOC(av) ((XPVAV*) SvANY(av))->xav_alloc
49 #define AvMAX(av) ((XPVAV*) SvANY(av))->xav_max
50 #define AvFILL(av) ((XPVAV*) SvANY(av))->xav_fill
51 #define AvARYLEN(av) ((XPVAV*) SvANY(av))->xav_arylen
52 #define AvFLAGS(av) ((XPVAV*) SvANY(av))->xav_flags
54 #define AvREAL(av) (((XPVAV*) SvANY(av))->xav_flags & AVf_REAL)
55 #define AvREAL_on(av) (((XPVAV*) SvANY(av))->xav_flags |= AVf_REAL)
56 #define AvREAL_off(av) (((XPVAV*) SvANY(av))->xav_flags &= ~AVf_REAL)