diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-07-23 20:38:27 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-07-23 20:38:27 +0200 |
| commit | 22d8199e2d047dc6b258241cf33e67d77aa33ca6 (patch) | |
| tree | dafa8613fde30c81554dfcfa11a7ff271ba03e9c /python/configuration.cc | |
| parent | 1195d1d5b3b9c22d1756ba13780cb553c3d4d168 (diff) | |
| download | python-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.cc | 4 |
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) { |
