static fz_id_context * fz_keep_id_context(fz_context *ctx) { if (!ctx) return NULL; return fz_keep_imp(ctx, ctx->id, &ctx->id->refs); }
fz_output_context * fz_keep_output_context(fz_context *ctx) { if (!ctx) return NULL; return fz_keep_imp(ctx, ctx->output, &ctx->output->refs); }
fz_text * fz_keep_text(fz_context *ctx, const fz_text *textc) { fz_text *text = (fz_text *)textc; /* Explicit cast away of const */ return fz_keep_imp(ctx, text, &text->refs); }
fz_colorspace_context * fz_keep_colorspace_context(fz_context *ctx) { if (!ctx) return NULL; return fz_keep_imp(ctx, ctx->colorspace, &ctx->colorspace->ctx_refs); }
static void * fz_keep_image_key(fz_context *ctx, void *key_) { fz_image_key *key = (fz_image_key *)key_; return fz_keep_imp(ctx, key, &key->refs); }
static fz_style_context *fz_keep_style_context(fz_context *ctx) { if (!ctx) return NULL; return fz_keep_imp(ctx, ctx->style, &ctx->style->refs); }
void *fz_keep_storable(fz_context *ctx, const fz_storable *sc) { fz_storable *s = (fz_storable *)sc; return fz_keep_imp(ctx, s, &s->refs); }
static fz_tuning_context *fz_keep_tuning_context(fz_context *ctx) { if (!ctx) return NULL; return fz_keep_imp(ctx, ctx->tuning, &ctx->tuning->refs); }
fz_stream * fz_keep_stream(fz_context *ctx, fz_stream *stm) { return fz_keep_imp(ctx, stm, &stm->refs); }
fz_outline * fz_keep_outline(fz_context *ctx, fz_outline *outline) { return fz_keep_imp(ctx, outline, &outline->refs); }
fz_device * fz_keep_device(fz_context *ctx, fz_device *dev) { return fz_keep_imp(ctx, dev, &dev->refs); }
fz_text * fz_keep_text(fz_context *ctx, fz_text *text) { return fz_keep_imp(ctx, text, &text->refs); }