From 66f6937c175736ee091aeac923e39bcffee7ce17 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 9 Aug 2011 14:59:19 +0200 Subject: [PATCH] Clarified stream version prescription and made internal stream data instances static. --- libisofs/libisofs.h | 8 +++++--- libisofs/stream.c | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libisofs/libisofs.h b/libisofs/libisofs.h index 70c6dd7..721f347 100644 --- a/libisofs/libisofs.h +++ b/libisofs/libisofs.h @@ -878,15 +878,17 @@ extern ino_t serial_id; struct IsoStream_Iface { /* - * Current version of the interface, set to 1 or 2. + * Current version of the interface. * Version 0 (since 0.6.4) * deprecated but still valid. * Version 1 (since 0.6.8) * update_size() added. * Version 2 (since 0.6.18) - * get_input_stream() added. A filter stream must have version 2. + * get_input_stream() added. + * A filter stream must have version 2 at least. * Version 3 (since 0.6.20) - * compare() added. A filter stream should have version 3. + * compare() added. + * A filter stream should have version 3 at least. * Version 4 (since 1.0.2) * clone_stream() added. */ diff --git a/libisofs/stream.c b/libisofs/stream.c index bb9806a..551778f 100644 --- a/libisofs/stream.c +++ b/libisofs/stream.c @@ -214,6 +214,7 @@ int fsrc_clone_stream(IsoStream *old_stream, IsoStream **new_stream, return ISO_SUCCESS; } +static IsoStreamIface fsrc_stream_class = { 4, /* version */ "fsrc", @@ -503,6 +504,7 @@ int cut_out_clone_stream(IsoStream *old_stream, IsoStream **new_stream, /* * TODO update cut out streams to deal with update_size(). Seems hard. */ +static IsoStreamIface cut_out_stream_class = { 4, /* version */ "cout", @@ -748,6 +750,7 @@ int mem_clone_stream(IsoStream *old_stream, IsoStream **new_stream, } +static IsoStreamIface mem_stream_class = { 4, /* version */ "mem ",