Skip to content

Commit 522cf1f

Browse files
committed
Patch #536908: Add missing #include guards/extern "C".
1 parent df4d137 commit 522cf1f

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

Include/cStringIO.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#ifndef CSTRINGIO_INCLUDED
22
#define CSTRINGIO_INCLUDED
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
36
/*
47
58
cStringIO.h,v 1.4 1997/12/07 14:27:00 jim Exp
@@ -128,4 +131,7 @@ xxxPyCObject_Import(char *module_name, char *name)
128131
#define PycString_IMPORT \
129132
PycStringIO=(struct PycStringIO_CAPI*)xxxPyCObject_Import("cStringIO", "cStringIO_CAPI")
130133

134+
#ifdef __cplusplus
135+
}
136+
#endif
131137
#endif /* CSTRINGIO_INCLUDED */

Include/descrobject.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/* Descriptors */
2+
#ifndef Py_DESCROBJECT_H
3+
#define Py_DESCROBJECT_H
4+
#ifdef __cplusplus
5+
extern "C" {
6+
#endif
27

38
typedef PyObject *(*getter)(PyObject *, void *);
49
typedef int (*setter)(PyObject *, PyObject *, void *);
@@ -78,3 +83,8 @@ extern DL_IMPORT(PyObject *) PyWrapper_New(PyObject *, PyObject *);
7883

7984

8085
extern DL_IMPORT(PyTypeObject) PyProperty_Type;
86+
#ifdef __cplusplus
87+
}
88+
#endif
89+
#endif /* !Py_DESCROBJECT_H */
90+

Include/iterobject.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
#ifndef Py_ITEROBJECT_H
2+
#define Py_ITEROBJECT_H
13
/* Iterators (the basic kind, over a sequence) */
4+
#ifdef __cplusplus
5+
extern "C" {
6+
#endif
27

38
extern DL_IMPORT(PyTypeObject) PySeqIter_Type;
49

@@ -11,3 +16,8 @@ extern DL_IMPORT(PyTypeObject) PyCallIter_Type;
1116
#define PyCallIter_Check(op) ((op)->ob_type == &PyCallIter_Type)
1217

1318
extern DL_IMPORT(PyObject *) PyCallIter_New(PyObject *, PyObject *);
19+
#ifdef __cplusplus
20+
}
21+
#endif
22+
#endif /* !Py_ITEROBJECT_H */
23+

0 commit comments

Comments
 (0)