diff options
Diffstat (limited to 'fitz/stm_buffer.c')
-rw-r--r-- | fitz/stm_buffer.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fitz/stm_buffer.c b/fitz/stm_buffer.c index d70118e1..4be0165a 100644 --- a/fitz/stm_buffer.c +++ b/fitz/stm_buffer.c @@ -1,4 +1,4 @@ -#include "fitz.h" +#include "fitz-internal.h" fz_buffer * fz_new_buffer(fz_context *ctx, int size) @@ -70,3 +70,11 @@ fz_trim_buffer(fz_context *ctx, fz_buffer *buf) if (buf->cap > buf->len+1) fz_resize_buffer(ctx, buf, buf->len); } + +int +fz_buffer_storage(fz_context *ctx, fz_buffer *buf, unsigned char **datap) +{ + if (datap) + *datap = (buf ? buf->data : NULL); + return (buf ? buf->len : 0); +} |