diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2010-12-03 20:14:31 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2010-12-03 20:14:31 +0000 |
commit | 4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9 (patch) | |
tree | c8f1fef715f8d158e58f17cab14af65455de1d77 /Include/modsupport.h | |
parent | c4df7845143f9afe0d20f4421a41904f3cbb991a (diff) | |
download | cpython-git-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.tar.gz |
Merge branches/pep-0384.
Diffstat (limited to 'Include/modsupport.h')
-rw-r--r-- | Include/modsupport.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Include/modsupport.h b/Include/modsupport.h index 57886df890..bf6478f4c2 100644 --- a/Include/modsupport.h +++ b/Include/modsupport.h @@ -31,7 +31,9 @@ PyAPI_FUNC(int) PyArg_ValidateKeywordArguments(PyObject *); PyAPI_FUNC(int) PyArg_UnpackTuple(PyObject *, const char *, Py_ssize_t, Py_ssize_t, ...); PyAPI_FUNC(PyObject *) Py_BuildValue(const char *, ...); PyAPI_FUNC(PyObject *) _Py_BuildValue_SizeT(const char *, ...); +#ifndef Py_LIMITED_API PyAPI_FUNC(int) _PyArg_NoKeywords(const char *funcname, PyObject *kw); +#endif PyAPI_FUNC(int) PyArg_VaParse(PyObject *, const char *, va_list); PyAPI_FUNC(int) PyArg_VaParseTupleAndKeywords(PyObject *, PyObject *, @@ -92,6 +94,12 @@ PyAPI_FUNC(int) PyModule_AddStringConstant(PyObject *, const char *, const char 9-Jan-1995 GvR Initial version (incompatible with older API) */ +/* The PYTHON_ABI_VERSION is introduced in PEP 384. For the lifetime of + Python 3, it will stay at the value of 3; changes to the limited API + must be performed in a strictly backwards-compatible manner. */ +#define PYTHON_ABI_VERSION 3 +#define PYTHON_ABI_STRING "3" + #ifdef Py_TRACE_REFS /* When we are tracing reference counts, rename PyModule_Create2 so modules compiled with incompatible settings will generate a @@ -102,10 +110,17 @@ PyAPI_FUNC(int) PyModule_AddStringConstant(PyObject *, const char *, const char PyAPI_FUNC(PyObject *) PyModule_Create2(struct PyModuleDef*, int apiver); +#ifdef Py_LIMITED_API +#define PyModule_Create(module) \ + PyModule_Create2(module, PYTHON_ABI_VERSION) +#else #define PyModule_Create(module) \ PyModule_Create2(module, PYTHON_API_VERSION) +#endif +#ifndef Py_LIMITED_API PyAPI_DATA(char *) _Py_PackageContext; +#endif #ifdef __cplusplus } |