File tree Expand file tree Collapse file tree 7 files changed +13
-4
lines changed Expand file tree Collapse file tree 7 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 39
39
#include "pymacro.h"
40
40
#include "pymath.h"
41
41
#include "pymem.h"
42
+ #include "pybuffer.h"
42
43
#include "object.h"
43
44
#include "objimpl.h"
44
45
#include "typeslots.h"
50
51
#include "longobject.h"
51
52
#include "cpython/longintrepr.h"
52
53
#include "boolobject.h"
53
- #include "buffer.h"
54
54
#include "floatobject.h"
55
55
#include "complexobject.h"
56
56
#include "rangeobject.h"
Original file line number Diff line number Diff line change 2
2
# error "this header file must not be included directly"
3
3
#endif
4
4
5
- #include "buffer.h" // for Py_buffer, included after PyObject has been defined
6
-
7
5
PyAPI_FUNC (void ) _Py_NewReference (PyObject * op );
8
6
9
7
#ifdef Py_TRACE_REFS
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ extern "C" {
17
17
*
18
18
*/
19
19
20
+ // Forward declaration to be able to include pybuffer.h before object.h:
21
+ // pybuffer.h uses PyObject and object.h uses Py_buffer.
22
+ typedef struct _object PyObject ;
23
+
20
24
typedef struct {
21
25
void * buf ;
22
26
PyObject * obj ; /* owned reference */
Original file line number Diff line number Diff line change @@ -1439,7 +1439,6 @@ PYTHON_HEADERS= \
1439
1439
$(srcdir)/Include/abstract.h \
1440
1440
$(srcdir)/Include/bltinmodule.h \
1441
1441
$(srcdir)/Include/boolobject.h \
1442
- $(srcdir)/Include/buffer.h \
1443
1442
$(srcdir)/Include/bytearrayobject.h \
1444
1443
$(srcdir)/Include/bytesobject.h \
1445
1444
$(srcdir)/Include/ceval.h \
@@ -1472,6 +1471,7 @@ PYTHON_HEADERS= \
1472
1471
$(srcdir)/Include/osdefs.h \
1473
1472
$(srcdir)/Include/osmodule.h \
1474
1473
$(srcdir)/Include/patchlevel.h \
1474
+ $(srcdir)/Include/pybuffer.h \
1475
1475
$(srcdir)/Include/pycapsule.h \
1476
1476
$(srcdir)/Include/pydtrace.h \
1477
1477
$(srcdir)/Include/pyerrors.h \
Original file line number Diff line number Diff line change
1
+ Rename ``Include/buffer.h `` header file to ``Include/pybuffer.h `` to avoid
2
+ conflits with projects having an existing ``buffer.h `` header file. Patch by
3
+ Victor Stinner.
Original file line number Diff line number Diff line change 263
263
<ClInclude Include =" ..\Include\osmodule.h" />
264
264
<ClInclude Include =" ..\Include\patchlevel.h" />
265
265
<ClInclude Include =" ..\Include\py_curses.h" />
266
+ <ClInclude Include =" ..\Include\pybuffer.h" />
266
267
<ClInclude Include =" ..\Include\pycapsule.h" />
267
268
<ClInclude Include =" ..\Include\pyerrors.h" />
268
269
<ClInclude Include =" ..\Include\pyexpat.h" />
Original file line number Diff line number Diff line change 147
147
<ClInclude Include =" ..\Include\py_curses.h" >
148
148
<Filter >Include</Filter >
149
149
</ClInclude >
150
+ <ClInclude Include =" ..\Include\pybuffer.h" >
151
+ <Filter >Include</Filter >
152
+ </ClInclude >
150
153
<ClInclude Include =" ..\Include\pycapsule.h" >
151
154
<Filter >Include</Filter >
152
155
</ClInclude >
You can’t perform that action at this time.
0 commit comments