Age | Commit message (Collapse) | Author |
|
Currently, our API uses static inlines for fz_lock and
fz_unlock, the definitions for which depend on whether
we build NDEBUG or not. This isn't ideal as it causes
problems when people link a release binary with a debug
lib (or vice versa).
We really want to continue to use static inlines for the
locking functions as used from MuPDF, as we hit them
hard in the keep/drop functions.
We therefore remove fz_lock/fz_unlock from the public API
entirely. Accordingly, we move the fz_lock/fz_unlock
static inlines into fitz-imp.h (an internal header),
together with the fz_keep_.../fz_drop_... functions.
We then have public fz_lock/fz_unlock functions for any
external callers to use that are free of compilications.
At the same time, to avoid another indirection, we change
from holding the locking functions as a pointer to a
struct to a struct itself.
|
|
Don't mess with conditional compilation with LARGEFILE -- always expose
64-bit file offsets in our public API.
|
|
|
|
Passing a pdf_document to pdf_graft_object to specify the source
document is redundant, as if we need to know the document, it will
be pickled into the object we are copying.
Similarly, repeatedly having to pass the destination document
seems silly when we can just pickle it into the map too (and this
removes the possibility of people using a different destination
document part way through).
This leaves to simplifying the pdf_graft_object call, at the expense
of splitting it into 2 calls - one with a map, and one without.
Also, we can delay the creation of the mapping table until we are
first asked to copy an object that requires deep copying. This
avoids us ever having to manually pass in the source document.
This has knock-on effects in the java and javascript classes, but
with the advantage of being clearer in the end (IMHO).
Conflicts:
include/mupdf/pdf/document.h
|
|
|
|
|
|
|
|
|
|
The generation number is only needed for decryption, and is assumed
to be zero or irrelevant for all other uses.
Store the original object number and generation in the xref slot, so
that we can decrypt them even when the objects have been renumbered,
without needing to pass the original object number around through
the stream loading APIs.
|
|
Add some paranoid checks to pdf_graft_object to prevent user
errors from crashing mupdf.
|
|
This commit adds a page merging tool. The tool demonstrates the
use of object grafting. The object grafting function recursively
goes through the object to add all referenced objects. A map is
maintained to ensure that objects that have already been copied are
not copied again.
|