From: Avery Pennarun Date: Wed, 16 Feb 2011 03:09:29 +0000 (-0800) Subject: _helpers.c: don'g unpythonize_argv() on win32. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3bdfc4620ec45e10024bcb0367abc985ea1be3a7;p=packages%2Fb%2Fbup.git _helpers.c: don'g unpythonize_argv() on win32. Py_GetArgcArgv() doesn't exist on win32 platforms. Which isn't so bad, since neither does the 'ps' command, really. Reported by Aneurin Price. Signed-off-by: Avery Pennarun --- diff --git a/lib/bup/_helpers.c b/lib/bup/_helpers.c index 594ff0f..b8390a6 100644 --- a/lib/bup/_helpers.c +++ b/lib/bup/_helpers.c @@ -10,6 +10,13 @@ static int istty = 0; +#ifdef __WIN32__ + +// There's no 'ps' on win32 anyway, and Py_GetArgcArgv() isn't available. +static void unpythonize_argv(void) { } + +#else // not __WIN32__ + // For some reason this isn't declared in Python.h extern void Py_GetArgcArgv(int *argc, char ***argv); @@ -50,6 +57,8 @@ static void unpythonize_argv(void) } } +#endif // not __WIN32__ + static PyObject *selftest(PyObject *self, PyObject *args) {