perl 5.0 alpha 6
[p5sagit/p5-mst-13.2.git] / mg.h
1 /* $RCSfile: arg.h,v $$Revision: 4.1 $$Date: 92/08/07 17:18:16 $
2  *
3  *    Copyright (c) 1993, Larry Wall
4  *
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.
7  *
8  * $Log:        arg.h,v $
9  */
10
11 struct mgvtbl {
12     int         (*svt_get)      P((SV *sv, MAGIC* mg));
13     int         (*svt_set)      P((SV *sv, MAGIC* mg));
14     U32         (*svt_len)      P((SV *sv, MAGIC* mg));
15     int         (*svt_clear)    P((SV *sv, MAGIC* mg));
16     int         (*svt_free)     P((SV *sv, MAGIC* mg));
17 };
18
19 struct magic {
20     MAGIC*      mg_moremagic;
21     MGVTBL*     mg_virtual;     /* pointer to magic functions */
22     U16         mg_private;
23     char        mg_type;
24     U8          mg_flags;
25     SV*         mg_obj;
26     char*       mg_ptr;
27     I32         mg_len;
28 };
29
30 #define MGf_TAINTEDDIR 1
31 #define MgTAINTEDDIR(mg) (mg->mg_flags & MGf_TAINTEDDIR)
32 #define MgTAINTEDDIR_on(mg) (mg->mg_flags |= MGf_TAINTEDDIR)