From 6ee3e43ca37620febd255390b2c29a2ceda35f93 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 12 Apr 2018 13:50:07 +0200 Subject: Purge unused function: pdf_new_obj_from_str. --- include/mupdf/pdf/object.h | 2 -- source/pdf/pdf-object.c | 24 ------------------------ 2 files changed, 26 deletions(-) diff --git a/include/mupdf/pdf/object.h b/include/mupdf/pdf/object.h index d2945199..b41b3134 100644 --- a/include/mupdf/pdf/object.h +++ b/include/mupdf/pdf/object.h @@ -31,8 +31,6 @@ pdf_obj *pdf_copy_array(fz_context *ctx, pdf_obj *array); pdf_obj *pdf_copy_dict(fz_context *ctx, pdf_obj *dict); pdf_obj *pdf_deep_copy_obj(fz_context *ctx, pdf_obj *obj); -pdf_obj *pdf_new_obj_from_str(fz_context *ctx, pdf_document *doc, const char *src); - pdf_obj *pdf_keep_obj(fz_context *ctx, pdf_obj *obj); void pdf_drop_obj(fz_context *ctx, pdf_obj *obj); diff --git a/source/pdf/pdf-object.c b/source/pdf/pdf-object.c index 0efd667e..286097f7 100644 --- a/source/pdf/pdf-object.c +++ b/source/pdf/pdf-object.c @@ -1730,30 +1730,6 @@ int pdf_obj_parent_num(fz_context *ctx, pdf_obj *obj) } } -pdf_obj *pdf_new_obj_from_str(fz_context *ctx, pdf_document *doc, const char *src) -{ - pdf_obj *result = NULL; - pdf_lexbuf lexbuf; - fz_stream *stream = fz_open_memory(ctx, (unsigned char *)src, strlen(src)); - - pdf_lexbuf_init(ctx, &lexbuf, PDF_LEXBUF_SMALL); - fz_try(ctx) - { - result = pdf_parse_stm_obj(ctx, doc, stream, &lexbuf); - } - fz_always(ctx) - { - pdf_lexbuf_fin(ctx, &lexbuf); - fz_drop_stream(ctx, stream); - } - fz_catch(ctx) - { - fz_rethrow(ctx); - } - - return result; -} - /* Pretty printing objects */ struct fmt -- cgit v1.2.3