#include "pymacro.h"
#include "pymath.h"
#include "pymem.h"
+#include "pybuffer.h"
#include "object.h"
#include "objimpl.h"
#include "typeslots.h"
#include "longobject.h"
#include "cpython/longintrepr.h"
#include "boolobject.h"
-#include "buffer.h"
#include "floatobject.h"
#include "complexobject.h"
#include "rangeobject.h"
# error "this header file must not be included directly"
#endif
-#include "buffer.h" // for Py_buffer, included after PyObject has been defined
-
PyAPI_FUNC(void) _Py_NewReference(PyObject *op);
#ifdef Py_TRACE_REFS
*
*/
+// Forward declaration to be able to include pybuffer.h before object.h:
+// pybuffer.h uses PyObject and object.h uses Py_buffer.
+typedef struct _object PyObject;
+
typedef struct {
void *buf;
PyObject *obj; /* owned reference */
$(srcdir)/Include/abstract.h \
$(srcdir)/Include/bltinmodule.h \
$(srcdir)/Include/boolobject.h \
- $(srcdir)/Include/buffer.h \
$(srcdir)/Include/bytearrayobject.h \
$(srcdir)/Include/bytesobject.h \
$(srcdir)/Include/ceval.h \
$(srcdir)/Include/osdefs.h \
$(srcdir)/Include/osmodule.h \
$(srcdir)/Include/patchlevel.h \
+ $(srcdir)/Include/pybuffer.h \
$(srcdir)/Include/pycapsule.h \
$(srcdir)/Include/pydtrace.h \
$(srcdir)/Include/pyerrors.h \
--- /dev/null
+Rename ``Include/buffer.h`` header file to ``Include/pybuffer.h`` to avoid
+conflits with projects having an existing ``buffer.h`` header file. Patch by
+Victor Stinner.
<ClInclude Include="..\Include\osmodule.h" />
<ClInclude Include="..\Include\patchlevel.h" />
<ClInclude Include="..\Include\py_curses.h" />
+ <ClInclude Include="..\Include\pybuffer.h" />
<ClInclude Include="..\Include\pycapsule.h" />
<ClInclude Include="..\Include\pyerrors.h" />
<ClInclude Include="..\Include\pyexpat.h" />
<ClInclude Include="..\Include\py_curses.h">
<Filter>Include</Filter>
</ClInclude>
+ <ClInclude Include="..\Include\pybuffer.h">
+ <Filter>Include</Filter>
+ </ClInclude>
<ClInclude Include="..\Include\pycapsule.h">
<Filter>Include</Filter>
</ClInclude>