diff options
Diffstat (limited to 'pdf/pdf_misc.c')
-rw-r--r-- | pdf/pdf_misc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pdf/pdf_misc.c b/pdf/pdf_misc.c index 11c5dde5..e027baec 100644 --- a/pdf/pdf_misc.c +++ b/pdf/pdf_misc.c @@ -149,7 +149,7 @@ int pdfi_setrenderingintent(pdf_context *ctx, pdf_name *n) int pdfi_string_from_name(pdf_context *ctx, pdf_name *n, char **str, int *len) { - if (n->type != PDF_NAME) + if (pdfi_type_of(n) != PDF_NAME) return gs_note_error(gs_error_typecheck); *str = NULL; @@ -166,6 +166,13 @@ int pdfi_string_from_name(pdf_context *ctx, pdf_name *n, char **str, int *len) return 0; } +int pdfi_free_string_from_name(pdf_context *ctx, char *str) +{ + if (str != NULL) + gs_free_object(ctx->memory, str, "pdfi_free_string_from_name"); + return 0; +} + void normalize_rectangle(double *d) { double d1[4]; |