From 912d9be2d14201e138cdf4963e0998a3f1bc53b1 Mon Sep 17 00:00:00 2001 From: Nitraiolo Date: Sat, 17 Dec 2022 20:12:12 +0100 Subject: [PATCH] Added major version into compile condition of cmdscript --- client/src/cmdscript.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/cmdscript.c b/client/src/cmdscript.c index d326af4d1..16d933d76 100644 --- a/client/src/cmdscript.c +++ b/client/src/cmdscript.c @@ -403,7 +403,7 @@ static int CmdScriptRun(const char *Cmd) { // hook Proxmark3 API PyImport_AppendInittab("_pm3", PyInit__pm3); #endif -#if PY_MINOR_VERSION >= 10 +#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 10 PyConfig py_conf; PyConfig_InitIsolatedConfig(&py_conf); // Despite being isolated we probably want to allow users to use @@ -419,7 +419,7 @@ static int CmdScriptRun(const char *Cmd) { char *argv[128]; argv[0] = filename; int argc = split(arguments, &argv[1]); -#if PY_MINOR_VERSION >= 10 +#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 10 // The following line will implicitly pre-initialize Python PyConfig_SetBytesArgv(&py_conf, argc + 1, argv); // This is required by Proxspace to work with an isolated Python configuration