diff options
author | Raph Levien <raph.levien@artifex.com> | 2007-03-05 21:09:35 +0000 |
---|---|---|
committer | Raph Levien <raph.levien@artifex.com> | 2007-03-05 21:09:35 +0000 |
commit | 5cc141ded366b695234f5cfe96b03df4ea9dad3a (patch) | |
tree | 975c51ff1f01f7d1089917e3c7ac07bb253fa859 /gs/src/gxclpath.c | |
parent | ce2f5a7ea2f4f1adc06533549d31b593391c5fe2 (diff) |
Non-backwards compatible change: use consistent reference count allocation
discipline for color spaces. Previously, color spaces were allocated on
stack, on the heap, as sub-structures within other color space structures,
and were very commonly copied. Reference counting was used for the "params"
block of some, but not all, color spaces, but there were correctness
problems with that logic.
In addition, a number of "const" qualifiers have been removed, because
the action of bumping the reference count on an object is not consistent
with the C semantics of const.
This change is required to resolve problems with enhancement 688924. It
should also help with memory leaks.
Other clients, such as the PCL interpreter, will require changes to be
compatible. For simple device colorspaces, the change to gs_setcmykcolor()
(gscolor1.c) is representative of the code change required.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@7765 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/src/gxclpath.c')
-rw-r--r-- | gs/src/gxclpath.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gs/src/gxclpath.c b/gs/src/gxclpath.c index 84c5fa11d..3e3601632 100644 --- a/gs/src/gxclpath.c +++ b/gs/src/gxclpath.c @@ -527,8 +527,7 @@ cmd_write_unknown(gx_device_clist_writer * cldev, gx_clist_state * pcls, const gs_color_space *pcs = cldev->color_space.space; int hival = pcs->params.indexed.hival; uint num_values = (hival + 1) * - gs_color_space_num_components( - (const gs_color_space *)&pcs->params.indexed.base_space); + gs_color_space_num_components(pcs->base_space); bool use_proc = cldev->color_space.byte1 & 4; const void *map_data; uint map_size; |