summaryrefslogtreecommitdiff
path: root/xps/xpspage.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-09-13 00:40:03 +0100
committerRobin Watts <robin@peeves.(none)>2012-09-18 05:28:21 -0700
commit6777c88fab2afc3e6558fda1dfb51110088ede61 (patch)
treeab0ee337b8e03be4a595703c7177e76ac206e037 /xps/xpspage.c
parent1fa1eca3be2955e1ed1f8433c18d06417ea85f4c (diff)
downloadghostpdl-6777c88fab2afc3e6558fda1dfb51110088ede61.tar.gz
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.
Diffstat (limited to 'xps/xpspage.c')
-rw-r--r--xps/xpspage.c2
1 files changed, 1 insertions, 1 deletions
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, '/');