summaryrefslogtreecommitdiffstats
path: root/Modules/_winapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_winapi.c')
-rw-r--r--Modules/_winapi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/_winapi.c b/Modules/_winapi.c
index 51c4d5f..0274874 100644
--- a/Modules/_winapi.c
+++ b/Modules/_winapi.c
@@ -1001,6 +1001,12 @@ PyDoc_STRVAR(GetVersion_doc,
\n\
Return the version number of the current operating system.");
+/* Disable deprecation warnings about GetVersionEx as the result is
+ being passed straight through to the caller, who is responsible for
+ using it correctly. */
+#pragma warning(push)
+#pragma warning(disable:4996)
+
static PyObject *
winapi_GetVersion(PyObject* self, PyObject* args)
{
@@ -1010,6 +1016,8 @@ winapi_GetVersion(PyObject* self, PyObject* args)
return PyLong_FromUnsignedLong(GetVersion());
}
+#pragma warning(pop)
+
static PyObject *
winapi_OpenProcess(PyObject *self, PyObject *args)
{