summaryrefslogtreecommitdiff
path: root/python/configuration.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-07-23 20:38:27 +0200
committerJulian Andres Klode <jak@debian.org>2009-07-23 20:38:27 +0200
commit22d8199e2d047dc6b258241cf33e67d77aa33ca6 (patch)
treedafa8613fde30c81554dfcfa11a7ff271ba03e9c /python/configuration.cc
parent1195d1d5b3b9c22d1756ba13780cb553c3d4d168 (diff)
downloadpython-apt-22d8199e2d047dc6b258241cf33e67d77aa33ca6.tar.gz
python/configuration: Hack-in unicode character support in parse_commandline().
Diffstat (limited to 'python/configuration.cc')
-rw-r--r--python/configuration.cc4
1 files changed, 4 insertions, 0 deletions
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)
{