]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport patch (also pointed out in SF #607253):
authorNeal Norwitz <nnorwitz@gmail.com>
Fri, 4 Oct 2002 12:35:17 +0000 (12:35 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Fri, 4 Oct 2002 12:35:17 +0000 (12:35 +0000)
date: 2002/03/30 08:57:12;  author: loewis;
Patch #536908: Add missing #include guards/extern "C".

Include/cStringIO.h
Include/descrobject.h
Include/iterobject.h

index cb8f337f6e36e642d3c96247c2891f5232c12c4f..fa3fcd70a6b88d34acb19e6a518891d407ccaacd 100644 (file)
@@ -1,5 +1,8 @@
 #ifndef CSTRINGIO_INCLUDED
 #define CSTRINGIO_INCLUDED
+#ifdef __cplusplus
+extern "C" {
+#endif
 /*
 
   cStringIO.h,v 1.4 1997/12/07 14:27:00 jim Exp
@@ -128,4 +131,7 @@ xxxPyCObject_Import(char *module_name, char *name)
 #define PycString_IMPORT \
   PycStringIO=(struct PycStringIO_CAPI*)xxxPyCObject_Import("cStringIO", "cStringIO_CAPI")
 
+#ifdef __cplusplus
+}
+#endif
 #endif /* CSTRINGIO_INCLUDED */
index 918dd5a0420de413978319c047af1788edceedf6..6482e56a4dbde6f00d060eb19663edc1e62024fd 100644 (file)
@@ -1,4 +1,9 @@
 /* Descriptors */
+#ifndef Py_DESCROBJECT_H
+#define Py_DESCROBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 typedef PyObject *(*getter)(PyObject *, void *);
 typedef int (*setter)(PyObject *, PyObject *, void *);
@@ -78,3 +83,8 @@ extern DL_IMPORT(PyObject *) PyWrapper_New(PyObject *, PyObject *);
 
 
 extern DL_IMPORT(PyTypeObject) PyProperty_Type;
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_DESCROBJECT_H */
+
index bc189910f9747e3617bb570bad0640a4107b1cf6..8abe678e4c6962ff70283bade8ed00b753b84df8 100644 (file)
@@ -1,4 +1,9 @@
+#ifndef Py_ITEROBJECT_H
+#define Py_ITEROBJECT_H
 /* Iterators (the basic kind, over a sequence) */
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 extern DL_IMPORT(PyTypeObject) PySeqIter_Type;
 
@@ -11,3 +16,8 @@ extern DL_IMPORT(PyTypeObject) PyCallIter_Type;
 #define PyCallIter_Check(op) ((op)->ob_type == &PyCallIter_Type)
 
 extern DL_IMPORT(PyObject *) PyCallIter_New(PyObject *, PyObject *);
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ITEROBJECT_H */
+