From 222a1e27d5a50e255dfacf5378225b9ec78dd124 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 8 Oct 2013 17:59:31 +0200 Subject: apt_pkg: Support paths supplied as bytes objects (See: #680971) We should be done now. DO NOT MERGE --- python/configuration.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'python/configuration.cc') 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) { -- cgit v1.2.3