summaryrefslogtreecommitdiff
path: root/pdf/pdf_colour.h
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2022-03-12 11:08:24 +0000
committerRobin Watts <Robin.Watts@artifex.com>2022-05-05 14:48:01 +0100
commitfcee1191204091e61ca78e241ca002a939eee085 (patch)
treeb45430327c3261c64cb9c9320b3cb60a814e7b0f /pdf/pdf_colour.h
parent9c276b0fc4c99342cc72e0028b8662e7b81a0549 (diff)
downloadghostpdl-fcee1191204091e61ca78e241ca002a939eee085.tar.gz
pdfi: Introduce pdfi_type_of.
All code now reads pdf obj types using pdfi_type_of rather than directly accessing obj->type. This will help us in the next optimisation step.
Diffstat (limited to 'pdf/pdf_colour.h')
-rw-r--r--pdf/pdf_colour.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/pdf/pdf_colour.h b/pdf/pdf_colour.h
index 263c3d9d9..b279c2f8b 100644
--- a/pdf/pdf_colour.h
+++ b/pdf/pdf_colour.h
@@ -27,7 +27,7 @@ static inline void pdfi_set_colourspace_name(pdf_context *ctx, gs_color_space *p
{
if (pcs->interpreter_data != NULL) {
pdf_obj *o = (pdf_obj *)(pcs->interpreter_data);
- if (o != NULL && o->type == PDF_NAME) {
+ if (o != NULL && pdfi_type_of(o) == PDF_NAME) {
pdfi_countdown(o);
pcs->interpreter_data = NULL;
}
@@ -53,7 +53,7 @@ static inline int check_same_current_space(pdf_context *ctx, pdf_name *n)
{
pdf_obj *o = (pdf_obj *)(ctx->pgs->color[0].color_space->interpreter_data);
- if (o == NULL || o->type != PDF_NAME)
+ if (o == NULL || pdfi_type_of(o) != PDF_NAME)
return 0;
if (pdfi_name_cmp(n, (pdf_name *)o) == 0) {