From 5d1e60c1337bf5b93044957089ab03a3f3eaf334 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 24 Jan 2018 20:04:03 +0100 Subject: Rename confusing fz_stream close callback to drop. --- include/mupdf/fitz/stream.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/mupdf/fitz/stream.h b/include/mupdf/fitz/stream.h index 790a0a83..33606cc8 100644 --- a/include/mupdf/fitz/stream.h +++ b/include/mupdf/fitz/stream.h @@ -227,14 +227,14 @@ int fz_stream_meta(fz_context *ctx, fz_stream *stm, int key, int size, void *ptr typedef int (fz_stream_next_fn)(fz_context *ctx, fz_stream *stm, size_t max); /* - fz_stream_close_fn: A function type for use when implementing + fz_stream_drop_fn: A function type for use when implementing fz_streams. The supplied function of this type is called - when the stream is closed, to release the stream specific + when the stream is dropped, to release the stream specific state information. state: The stream state to release. */ -typedef void (fz_stream_close_fn)(fz_context *ctx, void *state); +typedef void (fz_stream_drop_fn)(fz_context *ctx, void *state); /* fz_stream_seek_fn: A function type for use when implementing @@ -267,7 +267,7 @@ struct fz_stream_s unsigned char *rp, *wp; void *state; fz_stream_next_fn *next; - fz_stream_close_fn *close; + fz_stream_drop_fn *drop; fz_stream_seek_fn *seek; fz_stream_meta_fn *meta; }; @@ -282,10 +282,10 @@ struct fz_stream_s data. Return the number of bytes read, or EOF when there is no more data. - close: Should clean up and free the internal state. May not + drop: Should clean up and free the internal state. May not throw exceptions. */ -fz_stream *fz_new_stream(fz_context *ctx, void *state, fz_stream_next_fn *next, fz_stream_close_fn *close); +fz_stream *fz_new_stream(fz_context *ctx, void *state, fz_stream_next_fn *next, fz_stream_drop_fn *drop); fz_stream *fz_keep_stream(fz_context *ctx, fz_stream *stm); -- cgit v1.2.3