summaryrefslogtreecommitdiff
path: root/source/fitz/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/context.c')
-rw-r--r--source/fitz/context.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/source/fitz/context.c b/source/fitz/context.c
index 67fef05b..77b6d18a 100644
--- a/source/fitz/context.c
+++ b/source/fitz/context.c
@@ -5,37 +5,6 @@
#include <stdio.h>
#include <time.h>
-struct fz_id_context_s
-{
- int refs;
- int id;
-};
-
-static void
-fz_drop_id_context(fz_context *ctx)
-{
- if (!ctx)
- return;
- if (fz_drop_imp(ctx, ctx->id, &ctx->id->refs))
- fz_free(ctx, ctx->id);
-}
-
-static void
-fz_new_id_context(fz_context *ctx)
-{
- ctx->id = fz_malloc_struct(ctx, fz_id_context);
- ctx->id->refs = 1;
- ctx->id->id = 0;
-}
-
-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);
-}
-
struct fz_style_context_s
{
int refs;
@@ -165,7 +134,6 @@ fz_drop_context(fz_context *ctx)
fz_drop_colorspace_context(ctx);
fz_drop_cmm_context(ctx);
fz_drop_font_context(ctx);
- fz_drop_id_context(ctx);
fz_drop_output_context(ctx);
if (ctx->warn)
@@ -263,7 +231,6 @@ fz_new_context_imp(const fz_alloc_context *alloc, const fz_locks_context *locks,
fz_new_cmm_context(ctx);
fz_new_colorspace_context(ctx);
fz_new_font_context(ctx);
- fz_new_id_context(ctx);
fz_new_document_handler_context(ctx);
fz_new_style_context(ctx);
fz_new_tuning_context(ctx);
@@ -318,8 +285,6 @@ fz_clone_context_internal(fz_context *ctx)
new_ctx->font = fz_keep_font_context(new_ctx);
new_ctx->style = ctx->style;
new_ctx->style = fz_keep_style_context(new_ctx);
- new_ctx->id = ctx->id;
- new_ctx->id = fz_keep_id_context(new_ctx);
new_ctx->tuning = ctx->tuning;
new_ctx->tuning = fz_keep_tuning_context(new_ctx);
memcpy(new_ctx->seed48, ctx->seed48, sizeof ctx->seed48);
@@ -329,19 +294,6 @@ fz_clone_context_internal(fz_context *ctx)
return new_ctx;
}
-int
-fz_gen_id(fz_context *ctx)
-{
- int id;
- fz_lock(ctx, FZ_LOCK_ALLOC);
- /* We'll never wrap around in normal use, but if we do, then avoid 0. */
- do
- id = ++ctx->id->id;
- while (id == 0);
- fz_unlock(ctx, FZ_LOCK_ALLOC);
- return id;
-}
-
void fz_set_user_context(fz_context *ctx, void *user)
{
if (ctx != NULL)