[poppler] Branch 'xpdf303merge' - 3 commits - poppler/Gfx.cc regtest/backends
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Sun Sep 18 07:33:48 PDT 2011
poppler/Gfx.cc | 1 +
regtest/backends/__init__.py | 12 +++++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
New commits:
commit 6721916c92d720947b3285c85fdbe6610c6bf013
Merge: 8456a6e... e23f6b9...
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Sun Sep 18 16:31:10 2011 +0200
Merge branch 'master' into xpdf303merge
Conflicts:
poppler/Gfx.cc
diff --cc poppler/Gfx.cc
index 72256d4,92c66a3..ae08ce3
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@@ -4808,14 -4800,17 +4808,15 @@@ void Gfx::opBeginMarkedContent(Object a
char* name1 = args[1].getName();
Object markedContent;
if ( res->lookupMarkedContentNF( name1, &markedContent ) ) {
- if ( markedContent.isRef() ) {
- bool visible = contentConfig->optContentIsVisible( &markedContent );
- MarkedContentStack *mc = mcStack;
- mc->ocSuppressed = !(visible);
- }
- markedContent.free();
+ bool visible = contentConfig->optContentIsVisible(&markedContent);
+ MarkedContentStack *mc = mcStack;
+ mc->ocSuppressed = !(visible);
} else {
- error(getPos(), "DID NOT find %s", name1);
+ error(errSyntaxError, getPos(), "DID NOT find {0:s}", name1);
}
++ markedContent.free();
} else {
- error(getPos(), "insufficient arguments for Marked Content");
+ error(errSyntaxError, getPos(), "insufficient arguments for Marked Content");
}
}
commit e23f6b9cade804136bd4bb58182f4fe0b072fbf2
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Sun Sep 18 16:27:50 2011 +0200
regtest: Do not create checksums for crashed, failed and stderr files
diff --git a/regtest/backends/__init__.py b/regtest/backends/__init__.py
index de8b3ec..f54be80 100644
--- a/regtest/backends/__init__.py
+++ b/regtest/backends/__init__.py
@@ -38,12 +38,19 @@ class Backend:
def get_name(self):
return self._name
+ def __should_have_checksum(self, entry):
+ if not entry.startswith(self._name):
+ return False
+
+ name, ext = os.path.splitext(entry)
+ return ext not in ('.md5', '.crashed', '.failed', '.stderr');
+
def create_checksums(self, refs_path, delete_refs = False):
path = os.path.join(refs_path, self._name)
md5_file = open(path + '.md5', 'w')
for entry in os.listdir(refs_path):
- if not entry.startswith(self._name) or entry.endswith('.md5'):
+ if not self.__should_have_checksum(entry):
continue
ref_path = os.path.join(refs_path, entry)
f = open(ref_path, 'rb')
@@ -69,6 +76,9 @@ class Backend:
print("%s found in md5 ref file but missing in output dir %s" % (basename, out_path))
continue
+ if not self.__should_have_checksum(basename):
+ continue
+
result_path = os.path.join(out_path, basename)
f = open(result_path, 'rb')
matched = md5sum == md5(f.read()).hexdigest()
commit 110b8be1d9f2694b42bd12dcb6af02bfca9866dd
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Sun Sep 18 16:26:58 2011 +0200
Fix memory leak
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 94f5e55..92c66a3 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -4804,7 +4804,8 @@ void Gfx::opBeginMarkedContent(Object args[], int numArgs) {
bool visible = contentConfig->optContentIsVisible( &markedContent );
MarkedContentStack *mc = mcStack;
mc->ocSuppressed = !(visible);
- }
+ }
+ markedContent.free();
} else {
error(getPos(), "DID NOT find %s", name1);
}
More information about the poppler
mailing list