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. --- python/tarfile.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'python/tarfile.cc') 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