From 6777c88fab2afc3e6558fda1dfb51110088ede61 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 13 Sep 2012 00:40:03 +0100 Subject: Introduce GS_THREADSAFE define and modify printing calls. Lots of debugging/error information is printed using eprintf and dlprintf etc. These functions do not take a gs_memory_t * and are not safe for use within code that runs under multiple instances created by gsapi. Introduce new versions (dmprintf, dmlprintf etc) that DO take a gs_memory_ *, and move as much of ghostscript/ghostpdl's usage over to these as possible. I have not touched the contrib directory, and some locations in the code do not easily have a gs_memory_t to hand, so I have left them be. If the GS_THREADSAFE define is made during building, then the functions that don't take an explicit memory handle are #defined away to nothing. If the GS_THREADSAFE define is made, we disable the gsapi check that checks for a single init. --- xps/xpspage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xps/xpspage.c') diff --git a/xps/xpspage.c b/xps/xpspage.c index 84945a727..bfd1d7393 100644 --- a/xps/xpspage.c +++ b/xps/xpspage.c @@ -123,7 +123,7 @@ xps_parse_fixed_page(xps_context_t *ctx, xps_part_t *part) char *s; int code; - if_debug1('|', "doc: parsing page %s\n", part->name); + if_debug1m('|', ctx->memory, "doc: parsing page %s\n", part->name); xps_strlcpy(base_uri, part->name, sizeof base_uri); s = strrchr(base_uri, '/'); -- cgit v1.2.1