diff --git a/util/cairo-script/cairo-script-operators.c b/util/cairo-script/cairo-script-operators.c index 28cc73133..2560c5ca9 100644 --- a/util/cairo-script/cairo-script-operators.c +++ b/util/cairo-script/cairo-script-operators.c @@ -3015,6 +3015,12 @@ _new_sub_path (csi_t *ctx) return _do_cairo_op (ctx, cairo_new_sub_path); } +static csi_status_t +_null (csi_t *ctx) +{ + return _csi_push_ostack_null (ctx); +} + static csi_status_t _mask (csi_t *ctx) { @@ -5536,7 +5542,7 @@ _defs[] = { { "new_path", _new_path }, { "new_sub_path", _new_sub_path }, { "not", _not }, - { "null", NULL }, + { "null", _null }, { "or", _or }, { "paint", _paint }, { "paint_with_alpha", _paint_with_alpha }, diff --git a/util/cairo-script/cairo-script-private.h b/util/cairo-script/cairo-script-private.h index c4b2ea2ff..09d079324 100644 --- a/util/cairo-script/cairo-script-private.h +++ b/util/cairo-script/cairo-script-private.h @@ -873,6 +873,13 @@ _csi_push_ostack_mark (csi_t *ctx) return _csi_stack_push (ctx, &ctx->ostack, &obj); } static inline csi_status_t +_csi_push_ostack_null (csi_t *ctx) +{ + csi_object_t obj; + obj.type = CSI_OBJECT_TYPE_NULL; + return _csi_stack_push (ctx, &ctx->ostack, &obj); +} +static inline csi_status_t _csi_push_ostack_real (csi_t *ctx, csi_real_t v) { csi_object_t obj;