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 3939#include "pymacro.h"
4040#include "pymath.h"
4141#include "pymem.h"
42+ #include "pybuffer.h"
4243#include "object.h"
4344#include "objimpl.h"
4445#include "typeslots.h"
5051#include "longobject.h"
5152#include "cpython/longintrepr.h"
5253#include "boolobject.h"
53- #include "buffer.h"
5454#include "floatobject.h"
5555#include "complexobject.h"
5656#include "rangeobject.h"
Original file line number Diff line number Diff line change 22# error "this header file must not be included directly"
33#endif
44
5- #include "buffer.h" // for Py_buffer, included after PyObject has been defined
6-
75PyAPI_FUNC (void ) _Py_NewReference (PyObject * op );
86
97#ifdef Py_TRACE_REFS
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ extern "C" {
1717 *
1818 */
1919
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+
2024typedef struct {
2125 void * buf ;
2226 PyObject * obj ; /* owned reference */
Original file line number Diff line number Diff line change @@ -1439,7 +1439,6 @@ PYTHON_HEADERS= \
14391439 $(srcdir)/Include/abstract.h \
14401440 $(srcdir)/Include/bltinmodule.h \
14411441 $(srcdir)/Include/boolobject.h \
1442- $(srcdir)/Include/buffer.h \
14431442 $(srcdir)/Include/bytearrayobject.h \
14441443 $(srcdir)/Include/bytesobject.h \
14451444 $(srcdir)/Include/ceval.h \
@@ -1472,6 +1471,7 @@ PYTHON_HEADERS= \
14721471 $(srcdir)/Include/osdefs.h \
14731472 $(srcdir)/Include/osmodule.h \
14741473 $(srcdir)/Include/patchlevel.h \
1474+ $(srcdir)/Include/pybuffer.h \
14751475 $(srcdir)/Include/pycapsule.h \
14761476 $(srcdir)/Include/pydtrace.h \
14771477 $(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 263263 <ClInclude Include =" ..\Include\osmodule.h" />
264264 <ClInclude Include =" ..\Include\patchlevel.h" />
265265 <ClInclude Include =" ..\Include\py_curses.h" />
266+ <ClInclude Include =" ..\Include\pybuffer.h" />
266267 <ClInclude Include =" ..\Include\pycapsule.h" />
267268 <ClInclude Include =" ..\Include\pyerrors.h" />
268269 <ClInclude Include =" ..\Include\pyexpat.h" />
Original file line number Diff line number Diff line change 147147 <ClInclude Include =" ..\Include\py_curses.h" >
148148 <Filter >Include</Filter >
149149 </ClInclude >
150+ <ClInclude Include =" ..\Include\pybuffer.h" >
151+ <Filter >Include</Filter >
152+ </ClInclude >
150153 <ClInclude Include =" ..\Include\pycapsule.h" >
151154 <Filter >Include</Filter >
152155 </ClInclude >
You can’t perform that action at this time.
0 commit comments