blob: 28821d9ef78be6e5d98c55995df22032c6242917 [file] [log] [blame]
Guido van Rossumf70e43a1991-02-19 12:39:46 +00001/***********************************************************
Guido van Rossum5113f5f1992-04-05 14:20:22 +00002Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The
Guido van Rossumf70e43a1991-02-19 12:39:46 +00003Netherlands.
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the names of Stichting Mathematisch
12Centrum or CWI not be used in advertising or publicity pertaining to
13distribution of the software without specific, written prior permission.
14
15STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
16THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
18FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22
23******************************************************************/
24
Guido van Rossum85a5fbb1990-10-14 12:07:46 +000025/* Module support interface */
26
Guido van Rossum85a5fbb1990-10-14 12:07:46 +000027extern object *initmodule PROTO((char *, struct methodlist *));
Guido van Rossum550fbcc1992-01-27 16:50:21 +000028extern int getargs PROTO((object *, char *, ...));
Guido van Rossum5a8f8241992-04-13 15:54:59 +000029extern object *mkvalue PROTO((char *, ...));
Guido van Rossum550fbcc1992-01-27 16:50:21 +000030
31#define getnoarg(v) getargs(v, "")
32#define getintarg(v, a) getargs(v, "i", a)
33#define getintintarg(v, a, b) getargs(v, "(ii)", a, b)
34#define getintintintarg(v, a, b, c) getargs(v, "(iii)", a, b, c)
35#define getlongarg(v, a) getargs(v, "l", a)
36#define getlonglongarg(v, a, b) getargs(v, "(ll)", a, b)
37#define getlonglongobjectarg(v, a, b, c) getargs(v, "(llO)", a, b, c)
38#define getStrarg(v, a) getargs(v, "S", a)
39#define getstrarg(v, a) getargs(v, "s", a)
40#define getstrstrarg(v, a, b) getargs(v, "(ss)", a, b)
41#define getStrStrarg(v, a, b) getargs(v, "(SS)", a, b)
42#define getstrstrintarg(v, a, b, c) getargs(v, "(ssi)", a, b, c)
43#define getStrintarg(v, a, b) getargs(v, "(Si)", a, b)
44#define getstrintarg(v, a, b) getargs(v, "(si)", a, b)
45#define getintstrarg(v, a, b) getargs(v, "(is)", a, b)
46#define getpointarg(v, a) getargs(v, "(ii)", a, (a)+1)
47#define get3pointarg(v, a) getargs(v, "((ii)(ii)(ii))", \
48 a, a+1, a+2, a+3, a+4, a+5)
49#define getrectarg(v, a) getargs(v, "((ii)(ii))", a, a+1, a+2, a+3)
50#define getrectintarg(v, a) getargs(v, "(((ii)(ii))i)", a, a+1, a+2, a+3, a+4)
51#define getpointintarg(v, a) getargs(v, "((ii)i)", a, a+1, a+2)
52#define getpointstrarg(v, a, b) getargs(v, "((ii)s)", a, a+1, b)
53#define getrectpointarg(v, a) getargs(v, "(((ii)(ii))(ii))", \
54 a, a+1, a+2, a+3, a+4, a+5)
55#define getdoublearg(v, a) getargs(v, "d", a)
56#define get2doublearg(v, a, b) getargs(v, "(dd)", a, b)