[pypy-svn] r74014 - pypy/branch/cpython-extension/pypy/module/cpyext/include
afa at codespeak.net
afa at codespeak.net
Fri Apr 23 13:35:39 CEST 2010
Author: afa
Date: Fri Apr 23 13:35:37 2010
New Revision: 74014
Modified:
pypy/branch/cpython-extension/pypy/module/cpyext/include/Python.h
pypy/branch/cpython-extension/pypy/module/cpyext/include/stringobject.h
Log:
- Add #include <io.h> on Windows like CPython does
- move declaration of PyOS_snprintf to a place enclosed by "extern C"
Modified: pypy/branch/cpython-extension/pypy/module/cpyext/include/Python.h
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/include/Python.h (original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/include/Python.h Fri Apr 23 13:35:37 2010
@@ -13,6 +13,7 @@
#else
# define MS_WIN32 1
# include <crtdefs.h>
+# include <io.h>
# define Py_DEPRECATED(VERSION_UNUSED)
# ifdef Py_BUILD_CORE
# define PyAPI_DATA(RTYPE) extern __declspec(dllexport) RTYPE
@@ -79,7 +80,6 @@
#include <pypy_macros.h>
-int PyOS_snprintf(char *str, size_t size, const char *format, ...);
#include "patchlevel.h"
#include "object.h"
Modified: pypy/branch/cpython-extension/pypy/module/cpyext/include/stringobject.h
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/include/stringobject.h (original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/include/stringobject.h Fri Apr 23 13:35:37 2010
@@ -7,6 +7,8 @@
extern "C" {
#endif
+int PyOS_snprintf(char *str, size_t size, const char *format, ...);
+
#define PyString_GET_SIZE(op) PyString_Size(op)
#define PyString_AS_STRING(op) PyString_AsString(op)
More information about the Pypy-commit
mailing list