summaryrefslogtreecommitdiff
path: root/python/configuration.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2013-10-08 17:59:31 +0200
committerJulian Andres Klode <jak@debian.org>2013-10-08 17:59:31 +0200
commit222a1e27d5a50e255dfacf5378225b9ec78dd124 (patch)
tree319f45df456d6a279763cbfdded8effa5bfd791e /python/configuration.cc
parent7aedf6d986f15d31d9597c139d91c761baf98f73 (diff)
downloadpython-apt-222a1e27d5a50e255dfacf5378225b9ec78dd124.tar.gz
apt_pkg: Support paths supplied as bytes objects (See: #680971)
We should be done now. DO NOT MERGE
Diffstat (limited to 'python/configuration.cc')
-rw-r--r--python/configuration.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/configuration.cc b/python/configuration.cc
index 37374625..c57bc79c 100644
--- a/python/configuration.cc
+++ b/python/configuration.cc
@@ -351,8 +351,8 @@ char *doc_LoadConfig =
"options in the configuration object.";
PyObject *LoadConfig(PyObject *Self,PyObject *Args)
{
- char *Name = 0;
- if (PyArg_ParseTuple(Args,"Os",&Self,&Name) == 0)
+ PyApt_Filename Name;
+ if (PyArg_ParseTuple(Args,"OO&",&Self,PyApt_Filename::Converter, &Name) == 0)
return 0;
if (PyConfiguration_Check(Self)== 0)
{
@@ -373,8 +373,8 @@ char *doc_LoadConfigISC =
"configuration files.";
PyObject *LoadConfigISC(PyObject *Self,PyObject *Args)
{
- char *Name = 0;
- if (PyArg_ParseTuple(Args,"Os",&Self,&Name) == 0)
+ PyApt_Filename Name;
+ if (PyArg_ParseTuple(Args,"OO&",&Self,PyApt_Filename::Converter, &Name) == 0)
return 0;
if (PyConfiguration_Check(Self)== 0)
{
@@ -394,8 +394,8 @@ char *doc_LoadConfigDir =
"correct order.";
PyObject *LoadConfigDir(PyObject *Self,PyObject *Args)
{
- char *Name = 0;
- if (PyArg_ParseTuple(Args,"Os",&Self,&Name) == 0)
+ PyApt_Filename Name;
+ if (PyArg_ParseTuple(Args,"OO&",&Self,PyApt_Filename::Converter, &Name) == 0)
return 0;
if (PyConfiguration_Check(Self)== 0)
{