瀏覽代碼

deploy-stub: forward compat with Python 4.0

rdb 5 年之前
父節點
當前提交
a94914fd86
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      pandatool/src/deploy-stub/deploy-stub.c

+ 2 - 2
pandatool/src/deploy-stub/deploy-stub.c

@@ -25,7 +25,7 @@
 #if PY_MAJOR_VERSION >= 3
 #  include <locale.h>
 
-#  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]);