blob: 69378cdbfc2501d35e753b56e3d98f7353839a02 [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 *, ...));
Guido van Rossumc5d92e11994-09-28 15:44:39 +000038extern int newgetargs PROTO((object *, char *, ...));
Guido van Rossumb6775db1994-08-01 11:34:53 +000039extern object *mkvalue PROTO((char *, ...));
40
41#else
42
43#include <varargs.h>
44
45/* Better to have no prototypes at all for varargs functions in this case */
46extern int getargs();
47extern object *mkvalue();
48
Guido van Rossume5372401993-03-16 12:15:04 +000049#endif
50
Guido van Rossumb6775db1994-08-01 11:34:53 +000051extern int vgetargs PROTO((object *, char *, va_list));
52extern object *vmkvalue PROTO((char *, va_list));
Guido van Rossume5372401993-03-16 12:15:04 +000053
Guido van Rossum85a5fbb1990-10-14 12:07:46 +000054extern object *initmodule PROTO((char *, struct methodlist *));
Guido van Rossumb6775db1994-08-01 11:34:53 +000055extern object *initmodule2 PROTO((char *, struct methodlist *, object *));
Guido van Rossum550fbcc1992-01-27 16:50:21 +000056
Guido van Rossum234f9421993-06-17 12:35:49 +000057/* The following are obsolete -- use getargs directly! */
Guido van Rossum550fbcc1992-01-27 16:50:21 +000058#define getnoarg(v) getargs(v, "")
59#define getintarg(v, a) getargs(v, "i", a)
Guido van Rossum550fbcc1992-01-27 16:50:21 +000060#define getlongarg(v, a) getargs(v, "l", a)
Guido van Rossum550fbcc1992-01-27 16:50:21 +000061#define getstrarg(v, a) getargs(v, "s", a)
Guido van Rossuma3309961993-07-28 09:05:47 +000062
63#ifdef __cplusplus
64}
65#endif
66#endif /* !Py_MODSUPPORT_H */