summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Include/moduleobject.h22
-rw-r--r--Include/objimpl.h33
-rw-r--r--Include/pythonrun.h112
-rw-r--r--Include/pythread.h52
-rw-r--r--Include/rangeobject.h2
-rw-r--r--Include/sliceobject.h12
-rw-r--r--Include/stringobject.h40
-rw-r--r--Include/sysmodule.h22
-rw-r--r--Include/token.h16
-rw-r--r--Include/tupleobject.h28
10 files changed, 166 insertions, 173 deletions
diff --git a/Include/moduleobject.h b/Include/moduleobject.h
index 845b6ffab7..b03306cf2c 100644
--- a/Include/moduleobject.h
+++ b/Include/moduleobject.h
@@ -1,9 +1,3 @@
-#ifndef Py_MODULEOBJECT_H
-#define Py_MODULEOBJECT_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/***********************************************************
Copyright (c) 2000, BeOpen.com.
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
@@ -16,15 +10,21 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
/* Module object interface */
+#ifndef Py_MODULEOBJECT_H
+#define Py_MODULEOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern DL_IMPORT(PyTypeObject) PyModule_Type;
#define PyModule_Check(op) ((op)->ob_type == &PyModule_Type)
-extern DL_IMPORT(PyObject *) PyModule_New Py_PROTO((char *));
-extern DL_IMPORT(PyObject *) PyModule_GetDict Py_PROTO((PyObject *));
-extern DL_IMPORT(char *) PyModule_GetName Py_PROTO((PyObject *));
-extern DL_IMPORT(char *) PyModule_GetFilename Py_PROTO((PyObject *));
-extern DL_IMPORT(void) _PyModule_Clear Py_PROTO((PyObject *));
+extern DL_IMPORT(PyObject *) PyModule_New(char *);
+extern DL_IMPORT(PyObject *) PyModule_GetDict(PyObject *);
+extern DL_IMPORT(char *) PyModule_GetName(PyObject *);
+extern DL_IMPORT(char *) PyModule_GetFilename(PyObject *);
+extern DL_IMPORT(void) _PyModule_Clear(PyObject *);
#ifdef __cplusplus
}
diff --git a/Include/objimpl.h b/Include/objimpl.h
index defdc9cd31..3413b9ac28 100644
--- a/Include/objimpl.h
+++ b/Include/objimpl.h
@@ -1,9 +1,3 @@
-#ifndef Py_OBJIMPL_H
-#define Py_OBJIMPL_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/***********************************************************
Copyright (c) 2000, BeOpen.com.
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
@@ -14,6 +8,12 @@ See the file "Misc/COPYRIGHT" for information on usage and
redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
******************************************************************/
+#ifndef Py_OBJIMPL_H
+#define Py_OBJIMPL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "mymalloc.h"
/*
@@ -137,9 +137,9 @@ extern void PyCore_OBJECT_FREE_FUNC PyCore_OBJECT_FREE_PROTO;
as Python. These wrappers *do not* make sure that allocating 0
bytes returns a non-NULL pointer. Returned pointers must be checked
for NULL explicitly; no action is performed on failure. */
-extern DL_IMPORT(ANY *) PyObject_Malloc Py_PROTO((size_t));
-extern DL_IMPORT(ANY *) PyObject_Realloc Py_PROTO((ANY *, size_t));
-extern DL_IMPORT(void) PyObject_Free Py_PROTO((ANY *));
+extern DL_IMPORT(ANY *) PyObject_Malloc(size_t);
+extern DL_IMPORT(ANY *) PyObject_Realloc(ANY *, size_t);
+extern DL_IMPORT(void) PyObject_Free(ANY *);
/* Macros */
#define PyObject_MALLOC(n) PyCore_OBJECT_MALLOC(n)
@@ -152,11 +152,12 @@ extern DL_IMPORT(void) PyObject_Free Py_PROTO((ANY *));
*/
/* Functions */
-extern DL_IMPORT(PyObject *) PyObject_Init Py_PROTO((PyObject *, PyTypeObject *));
-extern DL_IMPORT(PyVarObject *) PyObject_InitVar Py_PROTO((PyVarObject *, PyTypeObject *, int));
-extern DL_IMPORT(PyObject *) _PyObject_New Py_PROTO((PyTypeObject *));
-extern DL_IMPORT(PyVarObject *) _PyObject_NewVar Py_PROTO((PyTypeObject *, int));
-extern DL_IMPORT(void) _PyObject_Del Py_PROTO((PyObject *));
+extern DL_IMPORT(PyObject *) PyObject_Init(PyObject *, PyTypeObject *);
+extern DL_IMPORT(PyVarObject *) PyObject_InitVar(PyVarObject *,
+ PyTypeObject *, int);
+extern DL_IMPORT(PyObject *) _PyObject_New(PyTypeObject *);
+extern DL_IMPORT(PyVarObject *) _PyObject_NewVar(PyTypeObject *, int);
+extern DL_IMPORT(void) _PyObject_Del(PyObject *);
#define PyObject_New(type, typeobj) \
( (type *) _PyObject_New(typeobj) )
@@ -240,10 +241,10 @@ extern DL_IMPORT(void) _PyObject_Del Py_PROTO((PyObject *));
#else
/* Add the object into the container set */
-extern DL_IMPORT(void) _PyGC_Insert Py_PROTO((PyObject *));
+extern DL_IMPORT(void) _PyGC_Insert(PyObject *);
/* Remove the object from the container set */
-extern DL_IMPORT(void) _PyGC_Remove Py_PROTO((PyObject *));
+extern DL_IMPORT(void) _PyGC_Remove(PyObject *);
#define PyObject_GC_Init(op) _PyGC_Insert((PyObject *)op)
#define PyObject_GC_Fini(op) _PyGC_Remove((PyObject *)op)
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
index bb5b6fd161..22751afd16 100644
--- a/Include/pythonrun.h
+++ b/Include/pythonrun.h
@@ -1,9 +1,3 @@
-#ifndef Py_PYTHONRUN_H
-#define Py_PYTHONRUN_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/***********************************************************
Copyright (c) 2000, BeOpen.com.
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
@@ -16,77 +10,83 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
/* Interfaces to parse and execute pieces of python code */
-DL_IMPORT(void) Py_SetProgramName Py_PROTO((char *));
-DL_IMPORT(char *) Py_GetProgramName Py_PROTO((void));
+#ifndef Py_PYTHONRUN_H
+#define Py_PYTHONRUN_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DL_IMPORT(void) Py_SetProgramName(char *);
+DL_IMPORT(char *) Py_GetProgramName(void);
-DL_IMPORT(void) Py_SetPythonHome Py_PROTO((char *));
-DL_IMPORT(char *) Py_GetPythonHome Py_PROTO((void));
+DL_IMPORT(void) Py_SetPythonHome(char *);
+DL_IMPORT(char *) Py_GetPythonHome(void);
-DL_IMPORT(void) Py_Initialize Py_PROTO((void));
-DL_IMPORT(void) Py_Finalize Py_PROTO((void));
-DL_IMPORT(int) Py_IsInitialized Py_PROTO((void));
-DL_IMPORT(PyThreadState *) Py_NewInterpreter Py_PROTO((void));
-DL_IMPORT(void) Py_EndInterpreter Py_PROTO((PyThreadState *));
+DL_IMPORT(void) Py_Initialize(void);
+DL_IMPORT(void) Py_Finalize(void);
+DL_IMPORT(int) Py_IsInitialized(void);
+DL_IMPORT(PyThreadState *) Py_NewInterpreter(void);
+DL_IMPORT(void) Py_EndInterpreter(PyThreadState *);
-DL_IMPORT(int) PyRun_AnyFile Py_PROTO((FILE *, char *));
+DL_IMPORT(int) PyRun_AnyFile(FILE *, char *);
-DL_IMPORT(int) PyRun_SimpleString Py_PROTO((char *));
-DL_IMPORT(int) PyRun_SimpleFile Py_PROTO((FILE *, char *));
-DL_IMPORT(int) PyRun_InteractiveOne Py_PROTO((FILE *, char *));
-DL_IMPORT(int) PyRun_InteractiveLoop Py_PROTO((FILE *, char *));
+DL_IMPORT(int) PyRun_SimpleString(char *);
+DL_IMPORT(int) PyRun_SimpleFile(FILE *, char *);
+DL_IMPORT(int) PyRun_InteractiveOne(FILE *, char *);
+DL_IMPORT(int) PyRun_InteractiveLoop(FILE *, char *);
-DL_IMPORT(struct _node *) PyParser_SimpleParseString Py_PROTO((char *, int));
-DL_IMPORT(struct _node *) PyParser_SimpleParseFile Py_PROTO((FILE *, char *, int));
+DL_IMPORT(struct _node *) PyParser_SimpleParseString(char *, int);
+DL_IMPORT(struct _node *) PyParser_SimpleParseFile(FILE *, char *, int);
-DL_IMPORT(PyObject *) PyRun_String Py_PROTO((char *, int, PyObject *, PyObject *));
-DL_IMPORT(PyObject *) PyRun_File Py_PROTO((FILE *, char *, int, PyObject *, PyObject *));
+DL_IMPORT(PyObject *) PyRun_String(char *, int, PyObject *, PyObject *);
+DL_IMPORT(PyObject *) PyRun_File(FILE *, char *, int, PyObject *, PyObject *);
-DL_IMPORT(PyObject *) Py_CompileString Py_PROTO((char *, char *, int));
+DL_IMPORT(PyObject *) Py_CompileString(char *, char *, int);
-DL_IMPORT(void) PyErr_Print Py_PROTO((void));
-DL_IMPORT(void) PyErr_PrintEx Py_PROTO((int));
+DL_IMPORT(void) PyErr_Print(void);
+DL_IMPORT(void) PyErr_PrintEx(int);
-DL_IMPORT(int) Py_AtExit Py_PROTO((void (*func) Py_PROTO((void))));
+DL_IMPORT(int) Py_AtExit(void (*func)(void));
-DL_IMPORT(void) Py_Exit Py_PROTO((int));
+DL_IMPORT(void) Py_Exit(int);
-DL_IMPORT(int) Py_FdIsInteractive Py_PROTO((FILE *, char *));
+DL_IMPORT(int) Py_FdIsInteractive(FILE *, char *);
/* In getpath.c */
-DL_IMPORT(char *) Py_GetProgramFullPath Py_PROTO((void));
-DL_IMPORT(char *) Py_GetPrefix Py_PROTO((void));
-DL_IMPORT(char *) Py_GetExecPrefix Py_PROTO((void));
-DL_IMPORT(char *) Py_GetPath Py_PROTO((void));
+DL_IMPORT(char *) Py_GetProgramFullPath(void);
+DL_IMPORT(char *) Py_GetPrefix(void);
+DL_IMPORT(char *) Py_GetExecPrefix(void);
+DL_IMPORT(char *) Py_GetPath(void);
/* In their own files */
-DL_IMPORT(const char *) Py_GetVersion Py_PROTO((void));
-DL_IMPORT(const char *) Py_GetPlatform Py_PROTO((void));
-DL_IMPORT(const char *) Py_GetCopyright Py_PROTO((void));
-DL_IMPORT(const char *) Py_GetCompiler Py_PROTO((void));
-DL_IMPORT(const char *) Py_GetBuildInfo Py_PROTO((void));
+DL_IMPORT(const char *) Py_GetVersion(void);
+DL_IMPORT(const char *) Py_GetPlatform(void);
+DL_IMPORT(const char *) Py_GetCopyright(void);
+DL_IMPORT(const char *) Py_GetCompiler(void);
+DL_IMPORT(const char *) Py_GetBuildInfo(void);
/* Internal -- various one-time initializations */
-DL_IMPORT(PyObject *) _PyBuiltin_Init Py_PROTO((void));
-DL_IMPORT(PyObject *) _PySys_Init Py_PROTO((void));
-DL_IMPORT(void) _PyImport_Init Py_PROTO((void));
-DL_IMPORT(void) init_exceptions Py_PROTO((void));
+DL_IMPORT(PyObject *) _PyBuiltin_Init(void);
+DL_IMPORT(PyObject *) _PySys_Init(void);
+DL_IMPORT(void) _PyImport_Init(void);
+DL_IMPORT(void) init_exceptions(void);
/* Various internal finalizers */
-DL_IMPORT(void) fini_exceptions Py_PROTO((void));
-DL_IMPORT(void) _PyImport_Fini Py_PROTO((void));
-DL_IMPORT(void) PyMethod_Fini Py_PROTO((void));
-DL_IMPORT(void) PyFrame_Fini Py_PROTO((void));
-DL_IMPORT(void) PyCFunction_Fini Py_PROTO((void));
-DL_IMPORT(void) PyTuple_Fini Py_PROTO((void));
-DL_IMPORT(void) PyString_Fini Py_PROTO((void));
-DL_IMPORT(void) PyInt_Fini Py_PROTO((void));
-DL_IMPORT(void) PyFloat_Fini Py_PROTO((void));
-DL_IMPORT(void) PyOS_FiniInterrupts Py_PROTO((void));
+DL_IMPORT(void) fini_exceptions(void);
+DL_IMPORT(void) _PyImport_Fini(void);
+DL_IMPORT(void) PyMethod_Fini(void);
+DL_IMPORT(void) PyFrame_Fini(void);
+DL_IMPORT(void) PyCFunction_Fini(void);
+DL_IMPORT(void) PyTuple_Fini(void);
+DL_IMPORT(void) PyString_Fini(void);
+DL_IMPORT(void) PyInt_Fini(void);
+DL_IMPORT(void) PyFloat_Fini(void);
+DL_IMPORT(void) PyOS_FiniInterrupts(void);
/* Stuff with no proper home (yet) */
-DL_IMPORT(char *) PyOS_Readline Py_PROTO((char *));
-extern DL_IMPORT(int) (*PyOS_InputHook) Py_PROTO((void));
-extern DL_IMPORT(char) *(*PyOS_ReadlineFunctionPointer) Py_PROTO((char *));
+DL_IMPORT(char *) PyOS_Readline(char *);
+extern DL_IMPORT(int) (*PyOS_InputHook)(void);
+extern DL_IMPORT(char) *(*PyOS_ReadlineFunctionPointer)(char *);
#ifdef __cplusplus
}
diff --git a/Include/pythread.h b/Include/pythread.h
index 7d4e0ea5f2..e40eb5759c 100644
--- a/Include/pythread.h
+++ b/Include/pythread.h
@@ -1,6 +1,3 @@
-#ifndef Py_PYTHREAD_H
-#define Py_PYTHREAD_H
-
/***********************************************************
Copyright (c) 2000, BeOpen.com.
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
@@ -11,17 +8,12 @@ See the file "Misc/COPYRIGHT" for information on usage and
redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
******************************************************************/
+#ifndef Py_PYTHREAD_H
+#define Py_PYTHREAD_H
+
#define NO_EXIT_PROG /* don't define PyThread_exit_prog() */
/* (the result is no use of signals on SGI) */
-#ifndef Py_PROTO
-#if defined(__STDC__) || defined(__cplusplus)
-#define Py_PROTO(args) args
-#else
-#define Py_PROTO(args) ()
-#endif
-#endif
-
typedef void *PyThread_type_lock;
typedef void *PyThread_type_sema;
@@ -29,35 +21,35 @@ typedef void *PyThread_type_sema;
extern "C" {
#endif
-DL_IMPORT(void) PyThread_init_thread Py_PROTO((void));
-DL_IMPORT(int) PyThread_start_new_thread Py_PROTO((void (*)(void *), void *));
-DL_IMPORT(void) PyThread_exit_thread Py_PROTO((void));
-DL_IMPORT(void) PyThread__PyThread_exit_thread Py_PROTO((void));
-DL_IMPORT(long) PyThread_get_thread_ident Py_PROTO((void));
+DL_IMPORT(void) PyThread_init_thread(void);
+DL_IMPORT(int) PyThread_start_new_thread(void (*)(void *), void *);
+DL_IMPORT(void) PyThread_exit_thread(void);
+DL_IMPORT(void) PyThread__PyThread_exit_thread(void);
+DL_IMPORT(long) PyThread_get_thread_ident(void);
-DL_IMPORT(PyThread_type_lock) PyThread_allocate_lock Py_PROTO((void));
-DL_IMPORT(void) PyThread_free_lock Py_PROTO((PyThread_type_lock));
-DL_IMPORT(int) PyThread_acquire_lock Py_PROTO((PyThread_type_lock, int));
+DL_IMPORT(PyThread_type_lock) PyThread_allocate_lock(void);
+DL_IMPORT(void) PyThread_free_lock(PyThread_type_lock);
+DL_IMPORT(int) PyThread_acquire_lock(PyThread_type_lock, int);
#define WAIT_LOCK 1
#define NOWAIT_LOCK 0
-DL_IMPORT(void) PyThread_release_lock Py_PROTO((PyThread_type_lock));
+DL_IMPORT(void) PyThread_release_lock(PyThread_type_lock);
-DL_IMPORT(PyThread_type_sema) PyThread_allocate_sema Py_PROTO((int));
-DL_IMPORT(void) PyThread_free_sema Py_PROTO((PyThread_type_sema));
-DL_IMPORT(int) PyThread_down_sema Py_PROTO((PyThread_type_sema, int));
+DL_IMPORT(PyThread_type_sema) PyThread_allocate_sema(int);
+DL_IMPORT(void) PyThread_free_sema(PyThread_type_sema);
+DL_IMPORT(int) PyThread_down_sema(PyThread_type_sema, int);
#define WAIT_SEMA 1
#define NOWAIT_SEMA 0
-DL_IMPORT(void) PyThread_up_sema Py_PROTO((PyThread_type_sema));
+DL_IMPORT(void) PyThread_up_sema(PyThread_type_sema);
#ifndef NO_EXIT_PROG
-DL_IMPORT(void) PyThread_exit_prog Py_PROTO((int));
-DL_IMPORT(void) PyThread__PyThread_exit_prog Py_PROTO((int));
+DL_IMPORT(void) PyThread_exit_prog(int);
+DL_IMPORT(void) PyThread__PyThread_exit_prog(int);
#endif
-DL_IMPORT(int) PyThread_create_key Py_PROTO((void));
-DL_IMPORT(void) PyThread_delete_key Py_PROTO((int));
-DL_IMPORT(int) PyThread_set_key_value Py_PROTO((int, void *));
-DL_IMPORT(void *) PyThread_get_key_value Py_PROTO((int));
+DL_IMPORT(int) PyThread_create_key(void);
+DL_IMPORT(void) PyThread_delete_key(int);
+DL_IMPORT(int) PyThread_set_key_value(int, void *);
+DL_IMPORT(void *) PyThread_get_key_value(int);
#ifdef __cplusplus
}
diff --git a/Include/rangeobject.h b/Include/rangeobject.h
index 77398697f4..a208581b6c 100644
--- a/Include/rangeobject.h
+++ b/Include/rangeobject.h
@@ -22,4 +22,4 @@ extern DL_IMPORT(PyTypeObject) PyRange_Type;
#define PyRange_Check(op) ((op)->ob_type == &PyRange_Type)
-extern DL_IMPORT(PyObject *) PyRange_New Py_PROTO((long, long, long, int));
+extern DL_IMPORT(PyObject *) PyRange_New(long, long, long, int);
diff --git a/Include/sliceobject.h b/Include/sliceobject.h
index d38f7be564..d9d6934984 100644
--- a/Include/sliceobject.h
+++ b/Include/sliceobject.h
@@ -20,18 +20,18 @@ let these be any arbitrary python type.
*/
typedef struct {
- PyObject_HEAD
- PyObject *start, *stop, *step;
+ PyObject_HEAD
+ PyObject *start, *stop, *step;
} PySliceObject;
extern DL_IMPORT(PyTypeObject) PySlice_Type;
#define PySlice_Check(op) ((op)->ob_type == &PySlice_Type)
-DL_IMPORT(PyObject *) PySlice_New Py_PROTO((
- PyObject* start, PyObject* stop, PyObject* step));
-DL_IMPORT(int) PySlice_GetIndices Py_PROTO((
- PySliceObject *r, int length, int *start, int *stop, int *step));
+DL_IMPORT(PyObject *) PySlice_New(PyObject* start, PyObject* stop,
+ PyObject* step);
+DL_IMPORT(int) PySlice_GetIndices(PySliceObject *r, int length,
+ int *start, int *stop, int *step);
#ifdef __cplusplus
}
diff --git a/Include/stringobject.h b/Include/stringobject.h
index d30bc03eef..361cbc0683 100644
--- a/Include/stringobject.h
+++ b/Include/stringobject.h
@@ -1,9 +1,3 @@
-#ifndef Py_STRINGOBJECT_H
-#define Py_STRINGOBJECT_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/***********************************************************
Copyright (c) 2000, BeOpen.com.
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
@@ -16,6 +10,12 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
/* String object interface */
+#ifndef Py_STRINGOBJECT_H
+#define Py_STRINGOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
Type PyStringObject represents a character string. An extra zero byte is
reserved at the end to ensure it is zero-terminated, but a size is
@@ -46,32 +46,32 @@ functions should be applied to nil objects.
#endif
typedef struct {
- PyObject_VAR_HEAD
+ PyObject_VAR_HEAD
#ifdef CACHE_HASH
- long ob_shash;
+ long ob_shash;
#endif
#ifdef INTERN_STRINGS
- PyObject *ob_sinterned;
+ PyObject *ob_sinterned;
#endif
- char ob_sval[1];
+ char ob_sval[1];
} PyStringObject;
extern DL_IMPORT(PyTypeObject) PyString_Type;
#define PyString_Check(op) ((op)->ob_type == &PyString_Type)
-extern DL_IMPORT(PyObject *) PyString_FromStringAndSize Py_PROTO((const char *, int));
-extern DL_IMPORT(PyObject *) PyString_FromString Py_PROTO((const char *));
-extern DL_IMPORT(int) PyString_Size Py_PROTO((PyObject *));
-extern DL_IMPORT(char *) PyString_AsString Py_PROTO((PyObject *));
-extern DL_IMPORT(void) PyString_Concat Py_PROTO((PyObject **, PyObject *));
-extern DL_IMPORT(void) PyString_ConcatAndDel Py_PROTO((PyObject **, PyObject *));
-extern DL_IMPORT(int) _PyString_Resize Py_PROTO((PyObject **, int));
-extern DL_IMPORT(PyObject *) PyString_Format Py_PROTO((PyObject *, PyObject *));
+extern DL_IMPORT(PyObject *) PyString_FromStringAndSize(const char *, int);
+extern DL_IMPORT(PyObject *) PyString_FromString(const char *);
+extern DL_IMPORT(int) PyString_Size(PyObject *);
+extern DL_IMPORT(char *) PyString_AsString(PyObject *);
+extern DL_IMPORT(void) PyString_Concat(PyObject **, PyObject *);
+extern DL_IMPORT(void) PyString_ConcatAndDel(PyObject **, PyObject *);
+extern DL_IMPORT(int) _PyString_Resize(PyObject **, int);
+extern DL_IMPORT(PyObject *) PyString_Format(PyObject *, PyObject *);
#ifdef INTERN_STRINGS
-extern DL_IMPORT(void) PyString_InternInPlace Py_PROTO((PyObject **));
-extern DL_IMPORT(PyObject *) PyString_InternFromString Py_PROTO((const char *));
+extern DL_IMPORT(void) PyString_InternInPlace(PyObject **);
+extern DL_IMPORT(PyObject *) PyString_InternFromString(const char *);
#else
#define PyString_InternInPlace(p)
#define PyString_InternFromString(cp) PyString_FromString(cp)
diff --git a/Include/sysmodule.h b/Include/sysmodule.h
index 2dee530250..e208fc392a 100644
--- a/Include/sysmodule.h
+++ b/Include/sysmodule.h
@@ -1,9 +1,3 @@
-#ifndef Py_SYSMODULE_H
-#define Py_SYSMODULE_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/***********************************************************
Copyright (c) 2000, BeOpen.com.
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
@@ -16,11 +10,17 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
/* System module interface */
-DL_IMPORT(PyObject *) PySys_GetObject Py_PROTO((char *));
-DL_IMPORT(int) PySys_SetObject Py_PROTO((char *, PyObject *));
-DL_IMPORT(FILE *) PySys_GetFile Py_PROTO((char *, FILE *));
-DL_IMPORT(void) PySys_SetArgv Py_PROTO((int, char **));
-DL_IMPORT(void) PySys_SetPath Py_PROTO((char *));
+#ifndef Py_SYSMODULE_H
+#define Py_SYSMODULE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DL_IMPORT(PyObject *) PySys_GetObject(char *);
+DL_IMPORT(int) PySys_SetObject(char *, PyObject *);
+DL_IMPORT(FILE *) PySys_GetFile(char *, FILE *);
+DL_IMPORT(void) PySys_SetArgv(int, char **);
+DL_IMPORT(void) PySys_SetPath(char *);
#ifdef HAVE_STDARG_PROTOTYPES
DL_IMPORT(void) PySys_WriteStdout(const char *format, ...);
diff --git a/Include/token.h b/Include/token.h
index 4b256576af..88ef3fcb6c 100644
--- a/Include/token.h
+++ b/Include/token.h
@@ -1,9 +1,3 @@
-#ifndef Py_TOKEN_H
-#define Py_TOKEN_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/***********************************************************
Copyright (c) 2000, BeOpen.com.
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
@@ -16,6 +10,12 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
/* Token types */
+#ifndef Py_TOKEN_H
+#define Py_TOKEN_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define ENDMARKER 0
#define NAME 1
#define NUMBER 2
@@ -68,8 +68,8 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
extern DL_IMPORT(char *) _PyParser_TokenNames[]; /* Token names */
-extern DL_IMPORT(int) PyToken_OneChar Py_PROTO((int));
-extern DL_IMPORT(int) PyToken_TwoChars Py_PROTO((int, int));
+extern DL_IMPORT(int) PyToken_OneChar(int);
+extern DL_IMPORT(int) PyToken_TwoChars(int, int);
#ifdef __cplusplus
}
diff --git a/Include/tupleobject.h b/Include/tupleobject.h
index 1630efa81a..acfac8b2e9 100644
--- a/Include/tupleobject.h
+++ b/Include/tupleobject.h
@@ -1,9 +1,3 @@
-#ifndef Py_TUPLEOBJECT_H
-#define Py_TUPLEOBJECT_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/***********************************************************
Copyright (c) 2000, BeOpen.com.
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
@@ -16,6 +10,12 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
/* Tuple object interface */
+#ifndef Py_TUPLEOBJECT_H
+#define Py_TUPLEOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
Another generally useful object type is an tuple of object pointers.
This is a mutable type: the tuple items can be changed (but not their
@@ -29,20 +29,20 @@ returned item's reference count.
*/
typedef struct {
- PyObject_VAR_HEAD
- PyObject *ob_item[1];
+ PyObject_VAR_HEAD
+ PyObject *ob_item[1];
} PyTupleObject;
extern DL_IMPORT(PyTypeObject) PyTuple_Type;
#define PyTuple_Check(op) ((op)->ob_type == &PyTuple_Type)
-extern DL_IMPORT(PyObject *) PyTuple_New Py_PROTO((int size));
-extern DL_IMPORT(int) PyTuple_Size Py_PROTO((PyObject *));
-extern DL_IMPORT(PyObject *) PyTuple_GetItem Py_PROTO((PyObject *, int));
-extern DL_IMPORT(int) PyTuple_SetItem Py_PROTO((PyObject *, int, PyObject *));
-extern DL_IMPORT(PyObject *) PyTuple_GetSlice Py_PROTO((PyObject *, int, int));
-extern DL_IMPORT(int) _PyTuple_Resize Py_PROTO((PyObject **, int, int));
+extern DL_IMPORT(PyObject *) PyTuple_New(int size);
+extern DL_IMPORT(int) PyTuple_Size(PyObject *);
+extern DL_IMPORT(PyObject *) PyTuple_GetItem(PyObject *, int);
+extern DL_IMPORT(int) PyTuple_SetItem(PyObject *, int, PyObject *);
+extern DL_IMPORT(PyObject *) PyTuple_GetSlice(PyObject *, int, int);
+extern DL_IMPORT(int) _PyTuple_Resize(PyObject **, int, int);
/* Macro, trading safety for speed */
#define PyTuple_GET_ITEM(op, i) (((PyTupleObject *)(op))->ob_item[i])