From 22d8199e2d047dc6b258241cf33e67d77aa33ca6 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 23 Jul 2009 20:38:27 +0200 Subject: python/configuration: Hack-in unicode character support in parse_commandline(). --- python/configuration.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'python/configuration.cc') diff --git a/python/configuration.cc b/python/configuration.cc index e7e31cc8..11231a28 100644 --- a/python/configuration.cc +++ b/python/configuration.cc @@ -361,7 +361,11 @@ PyObject *ParseCommandLine(PyObject *Self,PyObject *Args) for (int I = 0; I != Length; I++) { char *Type = 0; + #if PY_MAJOR_VERSION >= 3 + if (PyArg_ParseTuple(PySequence_GetItem(POList,I),"Czs|s", + #else if (PyArg_ParseTuple(PySequence_GetItem(POList,I),"czs|s", + #endif &OList[I].ShortOpt,&OList[I].LongOpt, &OList[I].ConfName,&Type) == 0) { -- cgit v1.2.3