diff options
Diffstat (limited to 'base/gscscie.c')
-rw-r--r-- | base/gscscie.c | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/base/gscscie.c b/base/gscscie.c index 3bc94aed..d39f0244 100644 --- a/base/gscscie.c +++ b/base/gscscie.c @@ -148,59 +148,63 @@ gx_install_CIE(gs_color_space * pcs, gs_gstate * pgs) /* Free params for a CIE color space */ static void -gx_final_CIEDEFG(const gs_color_space * pcs) +gx_final_CIEDEFG(gs_color_space * pcs) { - gs_color_space *pcs_noconst = (gs_color_space *)pcs; - if (pcs->icc_equivalent != NULL) { - rc_decrement(pcs_noconst->icc_equivalent, "gx_final_CIEDEFG"); + rc_decrement(pcs->icc_equivalent, "gx_final_CIEDEFG"); + pcs->icc_equivalent = NULL; } if (pcs->cmm_icc_profile_data != NULL) { - gsicc_adjust_profile_rc(pcs_noconst->cmm_icc_profile_data, -1, "gx_final_CIEDEFG"); + gsicc_adjust_profile_rc(pcs->cmm_icc_profile_data, -1, "gx_final_CIEDEFG"); + pcs->cmm_icc_profile_data = NULL; } - rc_decrement(pcs_noconst->params.defg, "gx_final_CIEDEFG"); + rc_decrement(pcs->params.defg, "gx_final_CIEDEFG"); + pcs->params.defg = NULL; } static void -gx_final_CIEDEF(const gs_color_space * pcs) +gx_final_CIEDEF(gs_color_space * pcs) { - gs_color_space *pcs_noconst = (gs_color_space *)pcs; - if (pcs->icc_equivalent != NULL) { - rc_decrement(pcs_noconst->icc_equivalent,"gx_final_CIEDEF"); + rc_decrement(pcs->icc_equivalent,"gx_final_CIEDEF"); + pcs->icc_equivalent = NULL; } if (pcs->cmm_icc_profile_data != NULL) { - gsicc_adjust_profile_rc(pcs_noconst->cmm_icc_profile_data, -1, "gx_final_CIEDEF"); + gsicc_adjust_profile_rc(pcs->cmm_icc_profile_data, -1, "gx_final_CIEDEF"); + pcs->cmm_icc_profile_data = NULL; } - rc_decrement(pcs_noconst->params.def, "gx_final_CIEDEF"); + rc_decrement(pcs->params.def, "gx_final_CIEDEF"); + pcs->params.def = NULL; } static void -gx_final_CIEABC(const gs_color_space * pcs) +gx_final_CIEABC(gs_color_space * pcs) { - gs_color_space *pcs_noconst = (gs_color_space *)pcs; - if (pcs->icc_equivalent != NULL) { - rc_decrement(pcs_noconst->icc_equivalent,"gx_final_CIEABC"); + rc_decrement(pcs->icc_equivalent,"gx_final_CIEABC"); + pcs->icc_equivalent = NULL; } if (pcs->cmm_icc_profile_data != NULL) { - gsicc_adjust_profile_rc(pcs_noconst->cmm_icc_profile_data, -1, "gx_final_CIEABC"); + gsicc_adjust_profile_rc(pcs->cmm_icc_profile_data, -1, "gx_final_CIEABC"); + pcs->cmm_icc_profile_data = NULL; } - rc_decrement(pcs_noconst->params.abc, "gx_final_CIEABC"); + rc_decrement(pcs->params.abc, "gx_final_CIEABC"); + pcs->params.abc = NULL; } static void -gx_final_CIEA(const gs_color_space * pcs) +gx_final_CIEA(gs_color_space * pcs) { - gs_color_space *pcs_noconst = (gs_color_space *)pcs; - if (pcs->icc_equivalent != NULL) { - rc_decrement(pcs_noconst->icc_equivalent,"gx_final_CIEA"); + rc_decrement(pcs->icc_equivalent,"gx_final_CIEA"); + pcs->icc_equivalent = NULL; } if (pcs->cmm_icc_profile_data != NULL) { - gsicc_adjust_profile_rc(pcs_noconst->cmm_icc_profile_data, -1, "gx_final_CIEA"); + gsicc_adjust_profile_rc(pcs->cmm_icc_profile_data, -1, "gx_final_CIEA"); + pcs->cmm_icc_profile_data = NULL; } - rc_decrement(pcs_noconst->params.a, "gx_adjust_cspace_CIEA"); + rc_decrement(pcs->params.a, "gx_adjust_cspace_CIEA"); + pcs->params.a = NULL; } /* ---------------- Procedures ---------------- */ |