Guido van Rossum | f70e43a | 1991-02-19 12:39:46 +0000 | [diff] [blame] | 1 | /*********************************************************** |
Guido van Rossum | 5113f5f | 1992-04-05 14:20:22 +0000 | [diff] [blame] | 2 | Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The |
Guido van Rossum | f70e43a | 1991-02-19 12:39:46 +0000 | [diff] [blame] | 3 | Netherlands. |
| 4 | |
| 5 | All Rights Reserved |
| 6 | |
| 7 | Permission to use, copy, modify, and distribute this software and its |
| 8 | documentation for any purpose and without fee is hereby granted, |
| 9 | provided that the above copyright notice appear in all copies and that |
| 10 | both that copyright notice and this permission notice appear in |
| 11 | supporting documentation, and that the names of Stichting Mathematisch |
| 12 | Centrum or CWI not be used in advertising or publicity pertaining to |
| 13 | distribution of the software without specific, written prior permission. |
| 14 | |
| 15 | STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO |
| 16 | THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND |
| 17 | FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE |
| 18 | FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 19 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 20 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
| 21 | OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 22 | |
| 23 | ******************************************************************/ |
| 24 | |
Guido van Rossum | 85a5fbb | 1990-10-14 12:07:46 +0000 | [diff] [blame] | 25 | /* Module support interface */ |
| 26 | |
Guido van Rossum | 85a5fbb | 1990-10-14 12:07:46 +0000 | [diff] [blame] | 27 | extern object *initmodule PROTO((char *, struct methodlist *)); |
Guido van Rossum | 550fbcc | 1992-01-27 16:50:21 +0000 | [diff] [blame] | 28 | extern int getargs PROTO((object *, char *, ...)); |
Guido van Rossum | 5a8f824 | 1992-04-13 15:54:59 +0000 | [diff] [blame] | 29 | extern object *mkvalue PROTO((char *, ...)); |
Guido van Rossum | 550fbcc | 1992-01-27 16:50:21 +0000 | [diff] [blame] | 30 | |
| 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) |