From dcf7f92994bf3b7bf08ecf1ac9c19c985a1d0f45 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 14 Oct 2014 21:20:06 +0200 Subject: python/tarfile.cc: use long long in Process() for APT >= 4.14 The pkgDirStream::Process() signature has changed in apt and is using a long long now for Size and Pos. --- po/python-apt.pot | 2 +- python/tarfile.cc | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/po/python-apt.pot b/po/python-apt.pot index 969590aa..7ff9675e 100644 --- a/po/python-apt.pot +++ b/po/python-apt.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-03 10:25+0200\n" +"POT-Creation-Date: 2014-10-14 21:31+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/python/tarfile.cc b/python/tarfile.cc index 7f65a5c7..adc8e819 100644 --- a/python/tarfile.cc +++ b/python/tarfile.cc @@ -52,9 +52,13 @@ public: virtual bool DoItem(Item &Itm,int &Fd); virtual bool FinishedFile(Item &Itm,int Fd); +#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 14) + virtual bool Process(Item &Itm,const unsigned char *Data, + unsigned long long Size,unsigned long long Pos); +#else virtual bool Process(Item &Itm,const unsigned char *Data, unsigned long Size,unsigned long Pos); - +#endif PyDirStream(PyObject *callback, const char *member=0) : callback(callback), py_data(0), member(member), error(false), copy(0), copy_size(0) { @@ -84,8 +88,13 @@ bool PyDirStream::DoItem(Item &Itm, int &Fd) return true; } +#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 14) +bool PyDirStream::Process(Item &Itm,const unsigned char *Data, + unsigned long long Size,unsigned long long Pos) +#else bool PyDirStream::Process(Item &Itm,const unsigned char *Data, unsigned long Size,unsigned long Pos) +#endif { memcpy(copy + Pos, Data,Size); return true; -- cgit v1.2.3