From 2bea21b2b86275d8a0bf70b7ff881e0e73735c67 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 18 May 2022 07:36:00 -0400 Subject: [PATCH 1/2] BLD: Define an error function on Cygwin. This function is defined on Windows, not Cygwin. Should maybe request that upstream. --- src/_tkagg.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/_tkagg.cpp b/src/_tkagg.cpp index a2c99b50486b..f5cb33500b0d 100644 --- a/src/_tkagg.cpp +++ b/src/_tkagg.cpp @@ -24,6 +24,9 @@ * also. */ #define WIN32_DLL +static inline PyObject *PyErr_SetFromWindowsErr(int ierr) { + return PyErr_SetString(PyExc_OSError, "Call to EnumProcessModules failed"); +} #endif #ifdef WIN32_DLL From 89249134fef32302328e50776072229a00633b6e Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 18 May 2022 12:40:16 -0400 Subject: [PATCH 2/2] BUG: Fix the returned value for PyErr_SetFromWindowsErr I didn't notice that PyErr_SetString returned void. This should return something normal. --- src/_tkagg.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_tkagg.cpp b/src/_tkagg.cpp index f5cb33500b0d..d31700c3ee65 100644 --- a/src/_tkagg.cpp +++ b/src/_tkagg.cpp @@ -25,7 +25,8 @@ */ #define WIN32_DLL static inline PyObject *PyErr_SetFromWindowsErr(int ierr) { - return PyErr_SetString(PyExc_OSError, "Call to EnumProcessModules failed"); + PyErr_SetString(PyExc_OSError, "Call to EnumProcessModules failed"); + return NULL; } #endif pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy