From a94914fd861c697e2e969f5c9a075a96bc56d607 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 12 Sep 2020 14:59:53 +0200 Subject: [PATCH] deploy-stub: forward compat with Python 4.0 --- pandatool/src/deploy-stub/deploy-stub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandatool/src/deploy-stub/deploy-stub.c b/pandatool/src/deploy-stub/deploy-stub.c index d986d4638a..b19ce4b25a 100644 --- a/pandatool/src/deploy-stub/deploy-stub.c +++ b/pandatool/src/deploy-stub/deploy-stub.c @@ -25,7 +25,7 @@ #if PY_MAJOR_VERSION >= 3 # include -# if PY_MINOR_VERSION < 5 +# if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 5 # define Py_DecodeLocale _Py_char2wchar # endif #endif @@ -550,7 +550,7 @@ int Py_FrozenMain(int argc, char **argv) error: if (argv_copy2) { for (i = 0; i < argc; i++) { -#if PY_MINOR_VERSION >= 4 +#if PY_MAJOR_VERSION > 3 || PY_MINOR_VERSION >= 4 PyMem_RawFree(argv_copy2[i]); #else PyMem_Free(argv_copy2[i]);