# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* === Object Protocol ================================================== */
#ifdef PY_SSIZE_T_CLEAN
PyAPI_FUNC(int) _Py_convert_optional_to_ssize_t(PyObject *, void *);
/* Same as PyNumber_Index but can return an instance of a subclass of int. */
-PyAPI_FUNC(PyObject *) _PyNumber_Index(PyObject *o);
-
-#ifdef __cplusplus
-}
-#endif
+PyAPI_FUNC(PyObject *) _PyNumber_Index(PyObject *o);
\ No newline at end of file
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *);
PyAPI_DATA(int) _PyEval_SetProfile(PyThreadState *tstate, Py_tracefunc func, PyObject *arg);
PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *);
PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *);
PyAPI_FUNC(int) _PyEval_SliceIndexNotNone(PyObject *, Py_ssize_t *);
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
typedef struct _dictkeysobject PyDictKeysObject;
/* The ma_values pointer is NULL for a combined table
PyAPI_FUNC(PyObject *) _PyDictView_New(PyObject *, PyTypeObject *);
PyAPI_FUNC(PyObject *) _PyDictView_Intersect(PyObject* self, PyObject *other);
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *);
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
PyAPI_FUNC(PyObject *) PyFile_OpenCode(const char *utf8path);
PyAPI_FUNC(PyObject *) PyFile_OpenCodeObject(PyObject *path);
PyAPI_FUNC(int) PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction hook, void *userData);
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
typedef struct {
int b_type; /* what kind of block this is */
int b_handler; /* where to jump to find handler */
PyAPI_FUNC(void) _PyFrame_DebugMallocStats(FILE *out);
PyAPI_FUNC(PyFrameObject *) PyFrame_GetBack(PyFrameObject *frame);
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
PyMODINIT_FUNC PyInit__imp(void);
PyAPI_FUNC(int) _PyImport_IsInitialized(PyInterpreterState *);
collection of frozen modules: */
PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules;
-
-#ifdef __cplusplus
-}
-#endif
#ifndef Py_PYCORECONFIG_H
#define Py_PYCORECONFIG_H
#ifndef Py_LIMITED_API
-#ifdef __cplusplus
-extern "C" {
-#endif
/* --- PyStatus ----------------------------------------------- */
PyWideStringList *list,
Py_ssize_t length, wchar_t **items);
-#ifdef __cplusplus
-}
-#endif
#endif /* !Py_LIMITED_API */
#endif /* !Py_PYCORECONFIG_H */
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Interpreter ID Object */
PyAPI_DATA(PyTypeObject) _PyInterpreterID_Type;
PyAPI_FUNC(PyObject *) _PyInterpreterID_New(int64_t);
PyAPI_FUNC(PyObject *) _PyInterpreterState_GetIDObject(PyInterpreterState *);
PyAPI_FUNC(PyInterpreterState *) _PyInterpreterID_LookUp(PyObject *);
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
typedef struct {
PyObject_VAR_HEAD
/* Vector of pointers to list elements. list[0] is ob_item[0], etc. */
#define PyList_SET_ITEM(op, i, v) (_PyList_CAST(op)->ob_item[i] = (v))
#define PyList_GET_SIZE(op) Py_SIZE(_PyList_CAST(op))
#define _PyList_ITEMS(op) (_PyList_CAST(op)->ob_item)
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
PyAPI_FUNC(void) _Py_NewReference(PyObject *op);
#ifdef Py_TRACE_REFS
* unconditionally */
#define Py_TRASHCAN_SAFE_BEGIN(op) Py_TRASHCAN_BEGIN_CONDITION(op, 1)
#define Py_TRASHCAN_SAFE_END(op) Py_TRASHCAN_END
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#define _PyObject_SIZE(typeobj) ( (typeobj)->tp_basicsize )
/* _PyObject_VAR_SIZE returns the number of bytes (as size_t) allocated for a
#define PyType_SUPPORTS_WEAKREFS(t) ((t)->tp_weaklistoffset > 0)
PyAPI_FUNC(PyObject **) PyObject_GET_WEAKREFS_LISTPTR(PyObject *op);
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Error objects */
/* PyException_HEAD defines the initial segment of every exception class. */
...);
#define Py_FatalError(message) _Py_FatalErrorFunc(__func__, message)
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Only used by applications that embed the interpreter and need to
* override the standard encoding determination mechanism
*/
PyAPI_FUNC(char *) _Py_SetLocaleFromEnv(int category);
PyAPI_FUNC(PyThreadState *) _Py_NewInterpreter(int isolated_subinterpreter);
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
PyAPI_FUNC(void *) PyMem_RawMalloc(size_t size);
PyAPI_FUNC(void *) PyMem_RawCalloc(size_t nelem, size_t elsize);
PyAPI_FUNC(void *) PyMem_RawRealloc(void *ptr, size_t new_size);
The function does nothing if Python is not compiled is debug mode. */
PyAPI_FUNC(void) PyMem_SetupDebugHooks(void);
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include "cpython/initconfig.h"
PyAPI_FUNC(int) _PyInterpreterState_RequiresIDRef(PyInterpreterState *);
PyAPI_FUNC(int) _PyCrossInterpreterData_RegisterClass(PyTypeObject *, crossinterpdatafunc);
PyAPI_FUNC(crossinterpdatafunc) _PyCrossInterpreterData_Lookup(PyObject *);
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
PyAPI_FUNC(PyObject *) _PySys_GetObjectId(_Py_Identifier *key);
PyAPI_FUNC(int) _PySys_SetObjectId(_Py_Identifier *key, PyObject *);
const char *argFormat,
...);
PyAPI_FUNC(int) PySys_AddAuditHook(Py_AuditHookFunction, void*);
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
typedef struct _traceback {
PyObject_HEAD
struct _traceback *tb_next;
PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int);
PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int);
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
typedef struct {
PyObject_VAR_HEAD
/* ob_item contains space for 'ob_size' elements.
#define PyTuple_SET_ITEM(op, i, v) (_PyTuple_CAST(op)->ob_item[i] = v)
PyAPI_FUNC(void) _PyTuple_DebugMallocStats(FILE *out);
-
-#ifdef __cplusplus
-}
-#endif
# error "this header file must not be included directly"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Py_UNICODE was the native Unicode storage format (code unit) used by
Python and represents a single Unicode element in the Unicode type.
With PEP 393, Py_UNICODE is deprecated and replaced with a
PyAPI_FUNC(int) _PyUnicode_EQ(PyObject *, PyObject *);
PyAPI_FUNC(Py_ssize_t) _PyUnicode_ScanIdentifier(PyObject *);
-
-#ifdef __cplusplus
-}
-#endif
--- /dev/null
+Remove superfluous "extern C" declarations from ``Include/cpython/*.h``.