blob: a1f3f1cdd3292589d1aa98c2fedf7bfa9f5b78ba [file] [log] [blame]
Guido van Rossuma3309961993-07-28 09:05:47 +00001#ifndef Py_MODSUPPORT_H
2#define Py_MODSUPPORT_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6
Guido van Rossumf70e43a1991-02-19 12:39:46 +00007/***********************************************************
Guido van Rossumb6775db1994-08-01 11:34:53 +00008Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
Guido van Rossume5372401993-03-16 12:15:04 +00009Amsterdam, The Netherlands.
Guido van Rossumf70e43a1991-02-19 12:39:46 +000010
11 All Rights Reserved
12
13Permission to use, copy, modify, and distribute this software and its
14documentation for any purpose and without fee is hereby granted,
15provided that the above copyright notice appear in all copies and that
16both that copyright notice and this permission notice appear in
17supporting documentation, and that the names of Stichting Mathematisch
18Centrum or CWI not be used in advertising or publicity pertaining to
19distribution of the software without specific, written prior permission.
20
21STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
22THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
23FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
24FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
25WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
26ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
27OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
28
29******************************************************************/
30
Guido van Rossum85a5fbb1990-10-14 12:07:46 +000031/* Module support interface */
32
Guido van Rossumb6775db1994-08-01 11:34:53 +000033#ifdef HAVE_STDARG_PROTOTYPES
34
35#include <stdarg.h>
36
37extern int getargs PROTO((object *, char *, ...));
38extern object *mkvalue PROTO((char *, ...));
39
40#else
41
42#include <varargs.h>
43
44/* Better to have no prototypes at all for varargs functions in this case */
45extern int getargs();
46extern object *mkvalue();
47
Guido van Rossume5372401993-03-16 12:15:04 +000048#endif
49
Guido van Rossumb6775db1994-08-01 11:34:53 +000050extern int vgetargs PROTO((object *, char *, va_list));
51extern object *vmkvalue PROTO((char *, va_list));
Guido van Rossume5372401993-03-16 12:15:04 +000052
Guido van Rossum85a5fbb1990-10-14 12:07:46 +000053extern object *initmodule PROTO((char *, struct methodlist *));
Guido van Rossumb6775db1994-08-01 11:34:53 +000054extern object *initmodule2 PROTO((char *, struct methodlist *, object *));
Guido van Rossum550fbcc1992-01-27 16:50:21 +000055
Guido van Rossum234f9421993-06-17 12:35:49 +000056/* The following are obsolete -- use getargs directly! */
Guido van Rossum550fbcc1992-01-27 16:50:21 +000057#define getnoarg(v) getargs(v, "")
58#define getintarg(v, a) getargs(v, "i", a)
Guido van Rossum550fbcc1992-01-27 16:50:21 +000059#define getlongarg(v, a) getargs(v, "l", a)
Guido van Rossum550fbcc1992-01-27 16:50:21 +000060#define getstrarg(v, a) getargs(v, "s", a)
Guido van Rossuma3309961993-07-28 09:05:47 +000061
62#ifdef __cplusplus
63}
64#endif
65#endif /* !Py_MODSUPPORT_H */