Commit e004eec1 authored by Julian Andres Klode's avatar Julian Andres Klode

Build with cleaner headers

parent 36d43248
......@@ -21,6 +21,7 @@
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/algorithms.h>
#include <apt-pkg/update.h>
#include <Python.h>
#include "progress.h"
......
......@@ -172,7 +172,7 @@ class PyPkgManager : public pkgDPkgPM {
}
/* Call through to Python */
virtual bool Install(PkgIterator Pkg,string File) {
virtual bool Install(PkgIterator Pkg,std::string File) {
return res(PyObject_CallMethod(pyinst, "install", "(NN)",
GetPyPkg(Pkg),
CppPyString(File)));
......@@ -196,7 +196,7 @@ class PyPkgManager : public pkgDPkgPM {
public:
/* Those call the protected functions from the parent class */
bool callInstall(PkgIterator Pkg,string File) { return pkgDPkgPM::Install(Pkg, File); }
bool callInstall(PkgIterator Pkg,std::string File) { return pkgDPkgPM::Install(Pkg, File); }
bool callRemove(PkgIterator Pkg, bool Purge) { return pkgDPkgPM::Remove(Pkg, Purge); }
bool callGo(int StatusFd=-1) { return pkgDPkgPM::Go(StatusFd); }
void callReset() { return pkgDPkgPM::Reset(); }
......
......@@ -165,7 +165,7 @@ static PyObject *PkgSrcRecordsGetFiles(PyObject *Self,void*) {
return 0;
PyObject *List = PyList_New(0);
vector<pkgSrcRecords::File> f;
std::vector<pkgSrcRecords::File> f;
if(!Struct.Last->Files(f))
return NULL; // error
......@@ -192,7 +192,7 @@ static PyObject *PkgSrcRecordsGetBuildDepends(PyObject *Self,void*) {
PyObject *LastDep = 0;
PyObject *OrGroup = 0;
vector<pkgSrcRecords::Parser::BuildDepRec> bd;
std::vector<pkgSrcRecords::Parser::BuildDepRec> bd;
if(!Struct.Last->BuildDepends(bd, false /* arch-only*/))
return NULL; // error
......
......@@ -94,7 +94,7 @@ static PyObject *PkgSourceListGetList(PyObject *Self,void*)
{
pkgSourceList *list = GetCpp<pkgSourceList*>(Self);
PyObject *List = PyList_New(0);
for (vector<metaIndex *>::const_iterator I = list->begin();
for (std::vector<metaIndex *>::const_iterator I = list->begin();
I != list->end(); I++)
{
CppPyObject<metaIndex*> *Obj;
......
......@@ -52,7 +52,10 @@ files = ['apt_pkgmodule.cc', 'acquire.cc', 'cache.cc', 'cdrom.cc',
'cachegroup.cc', 'orderlist.cc']
files = sorted(['python/' + fname for fname in files], key=lambda s: s[:-3])
apt_pkg = Extension("apt_pkg", files, libraries=["apt-pkg"],
extra_compile_args=['-std=c++11', '-Wno-write-strings'])
extra_compile_args=['-std=c++11', '-Wno-write-strings',
'-DAPT_8_CLEANER_HEADERS',
'-DAPT_9_CLEANER_HEADERS',
'-DAPT_10_CLEANER_HEADERS'])
# The apt_inst module
files = ["python/apt_instmodule.cc", "python/generic.cc",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment