summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-annot.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-12-28 15:18:21 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-01-05 14:47:37 +0100
commitd5394cbcf3a98dcabc49264172d4ce6618535d91 (patch)
tree9cf89de9fa95ddc14ffdb78d2dd8ff25d7d480cd /source/pdf/pdf-annot.c
parentcc4bd1b4f82a67f70c7ccad4da874d6e7451eeae (diff)
downloadmupdf-d5394cbcf3a98dcabc49264172d4ce6618535d91.tar.xz
Remove fz_page argument from fz_annot function calls.
Diffstat (limited to 'source/pdf/pdf-annot.c')
-rw-r--r--source/pdf/pdf-annot.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/pdf/pdf-annot.c b/source/pdf/pdf-annot.c
index 3718c20a..bfdfe306 100644
--- a/source/pdf/pdf-annot.c
+++ b/source/pdf/pdf-annot.c
@@ -503,9 +503,14 @@ pdf_load_annots(fz_context *ctx, pdf_document *doc, pdf_page *page, pdf_obj *ann
for (i = 0; i < len; i++)
{
obj = pdf_array_get(ctx, annots, i);
- annot = fz_malloc_struct(ctx, pdf_annot);
- annot->obj = pdf_keep_obj(ctx, obj);
+
+ annot = fz_new_annot(ctx, sizeof(pdf_annot));
+ annot->super.bound_annot = (fz_annot_bound_fn*)pdf_bound_annot;
+ annot->super.run_annot = (fz_annot_run_fn*)pdf_run_annot;
+ annot->super.next_annot = (fz_annot_next_fn*)pdf_next_annot;
+
annot->page = page;
+ annot->obj = pdf_keep_obj(ctx, obj);
annot->next = NULL;
*itr = annot;
@@ -613,13 +618,13 @@ pdf_first_annot(fz_context *ctx, pdf_page *page)
}
pdf_annot *
-pdf_next_annot(fz_context *ctx, pdf_page *page, pdf_annot *annot)
+pdf_next_annot(fz_context *ctx, pdf_annot *annot)
{
return annot ? annot->next : NULL;
}
fz_rect *
-pdf_bound_annot(fz_context *ctx, pdf_page *page, pdf_annot *annot, fz_rect *rect)
+pdf_bound_annot(fz_context *ctx, pdf_annot *annot, fz_rect *rect)
{
if (rect == NULL)
return NULL;