mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
api version checking
This commit is contained in:
parent
6da5bfad0f
commit
970a0a20b8
2 changed files with 32 additions and 17 deletions
|
@ -51,9 +51,22 @@ extern object *mkvalue();
|
|||
extern int vgetargs PROTO((object *, char *, va_list));
|
||||
extern object *vmkvalue PROTO((char *, va_list));
|
||||
|
||||
extern object *initmodule PROTO((char *, struct methodlist *));
|
||||
extern object *initmodule3 PROTO((char *, struct methodlist *,
|
||||
char *, object *));
|
||||
#define PYTHON_API_VERSION 1001
|
||||
/* The API version is maintained (independently from the Python version)
|
||||
so we can detect mismatches between the interpreter and dynamically
|
||||
loaded modules.
|
||||
|
||||
Please add a line or two to the top of this log for each API
|
||||
version change:
|
||||
|
||||
9-Jan-1995 GvR Initial version (incompatible with older API)
|
||||
*/
|
||||
|
||||
extern object *initmodule4 PROTO((char *, struct methodlist *,
|
||||
char *, object *, int));
|
||||
#define initmodule(name, methods) \
|
||||
initmodule4(name, methods, (char *)NULL, (object *)NULL, \
|
||||
PYTHON_API_VERSION)
|
||||
|
||||
/* The following are obsolete -- use getargs directly! */
|
||||
#define getnoarg(v) getargs(v, "")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue