[gs-cvs] rev 7080 - trunk/gs/src
alexcher at ghostscript.com
alexcher at ghostscript.com
Wed Oct 4 04:09:22 PDT 2006
Author: alexcher
Date: 2006-10-04 04:09:21 -0700 (Wed, 04 Oct 2006)
New Revision: 7080
Modified:
trunk/gs/src/gxfill.c
trunk/gs/src/gzspotan.c
trunk/gs/src/gzspotan.h
Log:
Use open_device procedure to identify the type of the device instead of the
standard gs_object_type() because gs_cpath_accum_device is allocaded on
the stack i.e. has no block header with a descriptor but has dev->memory set
like a heap-allocated device. Bug 688874.
DIFFERENCES:
None
Modified: trunk/gs/src/gxfill.c
===================================================================
--- trunk/gs/src/gxfill.c 2006-10-03 18:08:37 UTC (rev 7079)
+++ trunk/gs/src/gxfill.c 2006-10-04 11:09:21 UTC (rev 7080)
@@ -169,8 +169,12 @@
private inline bool
is_spotan_device(gx_device * dev)
{
- return dev->memory != NULL &&
- gs_object_type(dev->memory, dev) == &st_device_spot_analyzer;
+ /* Use open_device procedure to identify the type of the device
+ * instead of the standard gs_object_type() because gs_cpath_accum_device
+ * is allocaded on the stack i.e. has no block header with a descriptor
+ * but has dev->memory set like a heap-allocated device.
+ */
+ return dev->procs.open_device == san_open;
}
/* Forward declarations */
Modified: trunk/gs/src/gzspotan.c
===================================================================
--- trunk/gs/src/gzspotan.c 2006-10-03 18:08:37 UTC (rev 7079)
+++ trunk/gs/src/gzspotan.c 2006-10-04 11:09:21 UTC (rev 7080)
@@ -39,7 +39,6 @@
private_st_san_trap();
private_st_san_trap_contact();
-private dev_proc_open_device(san_open);
private dev_proc_close_device(san_close);
private dev_proc_get_clipping_box(san_get_clipping_box);
@@ -273,7 +272,7 @@
}
};
-private int
+int
san_open(register gx_device * dev)
{
gx_device_spot_analyzer * const padev = (gx_device_spot_analyzer *)dev;
Modified: trunk/gs/src/gzspotan.h
===================================================================
--- trunk/gs/src/gzspotan.h 2006-10-03 18:08:37 UTC (rev 7079)
+++ trunk/gs/src/gzspotan.h 2006-10-04 11:09:21 UTC (rev 7080)
@@ -136,4 +136,10 @@
bool overall_hints, void *client_data,
int (*handler)(void *client_data, gx_san_sect *ss));
+/* -------------- Other external symbols ------------------------ */
+
+/* is_spotan_device() in gxfill.c uses san_open */
+/* to identify the spot analyzer device */
+dev_proc_open_device(san_open);
+
#endif /* gzspotan_INCLUDED */
More information about the gs-cvs
mailing list