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 * xav_array; /* pointer to malloced string */
27 int 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 */
37 #define AVf_REAL 1 /* free old entries */
39 #define Nullav Null(AV*)
41 #define AvARRAY(av) ((SV**)((XPVAV*) SvANY(av))->xav_array)
42 #define AvALLOC(av) ((XPVAV*) SvANY(av))->xav_alloc
43 #define AvMAX(av) ((XPVAV*) SvANY(av))->xav_max
44 #define AvFILL(av) ((XPVAV*) SvANY(av))->xav_fill
45 #define AvARYLEN(av) ((XPVAV*) SvANY(av))->xav_arylen
46 #define AvFLAGS(av) ((XPVAV*) SvANY(av))->xav_flags
48 #define AvREAL(av) (((XPVAV*) SvANY(av))->xav_flags & AVf_REAL)
49 #define AvREAL_on(av) (((XPVAV*) SvANY(av))->xav_flags |= AVf_REAL)
50 #define AvREAL_off(av) (((XPVAV*) SvANY(av))->xav_flags &= ~AVf_REAL)