]> arthur.barton.de Git - bup.git/commitdiff
_helpers: remove argv mangling on python 3.9
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 18 Nov 2020 20:29:31 +0000 (21:29 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sun, 22 Nov 2020 21:09:50 +0000 (15:09 -0600)
Since python 3.9 exports the argv as wchar_t now, we
can no longer attempt to mangle it. Remove this code
on python 3.9 so it builds again.

This fixes Debian's FTBFS https://bugs.debian.org/972763, and this
part of our Cirrus test builds on MacOS.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c

index f47de73a07d0e4a2734f88caa13bb0fc392f6280..5f07d446c703444d42edda0376209b3195cfc4e0 100644 (file)
@@ -353,7 +353,7 @@ static PyObject *bup_cat_bytes(PyObject *self, PyObject *args)
 
 
 // Probably we should use autoconf or something and set HAVE_PY_GETARGCARGV...
-#if __WIN32__ || __CYGWIN__
+#if __WIN32__ || __CYGWIN__ || PY_VERSION_HEX >= 0x03090000
 
 // There's no 'ps' on win32 anyway, and Py_GetArgcArgv() isn't available.
 static void unpythonize_argv(void) { }