summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/document.h
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2017-03-21 15:53:01 -0400
committerRobin Watts <Robin.Watts@artifex.com>2017-03-22 18:29:42 -0400
commit546e1fce1b1556f56860a46f326094b997a3237c (patch)
tree1bdf70ae60a0a84daa1a6e37e3cc04d612e38b49 /include/mupdf/fitz/document.h
parentad65190db33e7024b71cd21a6ea1483940f0bf92 (diff)
downloadmupdf-546e1fce1b1556f56860a46f326094b997a3237c.tar.xz
Update fz_new_page.
Move this into the same style as fz_new_document and fz_new_image.
Diffstat (limited to 'include/mupdf/fitz/document.h')
-rw-r--r--include/mupdf/fitz/document.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/mupdf/fitz/document.h b/include/mupdf/fitz/document.h
index 3769a795..ae96dc5c 100644
--- a/include/mupdf/fitz/document.h
+++ b/include/mupdf/fitz/document.h
@@ -392,9 +392,12 @@ fz_page *fz_load_page(fz_context *ctx, fz_document *doc, int number);
fz_link *fz_load_links(fz_context *ctx, fz_page *page);
/*
- fz_new_page: Create and initialize a page struct.
+ fz_new_page_of_size: Create and initialize a page struct.
*/
-void *fz_new_page(fz_context *ctx, int size);
+fz_page *fz_new_page_of_size(fz_context *ctx, int size);
+
+#define fz_new_page(CTX,TYPE) \
+ ((TYPE *)Memento_label(fz_new_page_of_size(CTX,sizeof(TYPE)),#TYPE))
/*
fz_bound_page: Determine the size of a page at 72 dpi.