From 30572f1f9c6d38b01d5ad567614fac708f74e3bd Mon Sep 17 00:00:00 2001
From: Kovid Goyal <kovid@kovidgoyal.net>
Date: Thu, 25 Jul 2019 09:39:37 +0530
Subject: [PATCH 16/71] More ancient linux compiler support
---
src/calibre/utils/podofo/utils.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/calibre/utils/podofo/utils.cpp b/src/calibre/utils/podofo/utils.cpp
index 8e1a982f1c..da1272014e 100644
--- a/src/calibre/utils/podofo/utils.cpp
+++ b/src/calibre/utils/podofo/utils.cpp
@@ -15,7 +15,9 @@ pdf::podofo_set_exception(const PdfError &err) {
if (msg == NULL) msg = err.what();
std::stringstream stream;
stream << msg << "\n";
- for (const PdfErrorInfo &info : err.GetCallstack()) {
+ const TDequeErrorInfo &s = err.GetCallstack();
+ for (TDequeErrorInfo::const_iterator it = s.begin(); it != s.end(); it++) {
+ const PdfErrorInfo &info = (*it);
stream << "File: " << info.GetFilename() << "Line: " << info.GetLine() << " " << info.GetInformation() << "\n";
}
PyErr_SetString(Error, stream.str().c_str());