diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c index debb1318..56708cba 100644 --- a/release/c/wuffs-unsupported-snapshot.c +++ b/release/c/wuffs-unsupported-snapshot.c @@ -3053,7 +3053,7 @@ struct wuffs_lzw__decoder__struct { uint32_t magic; uint32_t active_coroutine; - uint32_t f_lw; + uint32_t f_set_literal_width_arg; uint32_t f_literal_width; uint32_t f_clear_code; uint32_t f_end_code; @@ -8039,7 +8039,7 @@ wuffs_lzw__decoder__set_literal_width(wuffs_lzw__decoder* self, uint32_t a_lw) { return ((wuffs_base__empty_struct){}); } - self->private_impl.f_lw = a_lw; + self->private_impl.f_set_literal_width_arg = a_lw; return ((wuffs_base__empty_struct){}); } @@ -8089,8 +8089,9 @@ wuffs_lzw__decoder__decode_io_writer(wuffs_lzw__decoder* self, WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0; self->private_impl.f_literal_width = 8; - if (self->private_impl.f_lw >= 2) { - self->private_impl.f_literal_width = self->private_impl.f_lw; + if (self->private_impl.f_set_literal_width_arg >= 2) { + self->private_impl.f_literal_width = + self->private_impl.f_set_literal_width_arg; } self->private_impl.f_clear_code = (((uint32_t)(1)) << self->private_impl.f_literal_width); diff --git a/std/lzw/decode_lzw.wuffs b/std/lzw/decode_lzw.wuffs index d1aebb8f..4e2eb358 100644 --- a/std/lzw/decode_lzw.wuffs +++ b/std/lzw/decode_lzw.wuffs @@ -27,10 +27,11 @@ pri status "?internal error: inconsistent I/O" pub const decoder_workbuf_len_max_incl_worst_case base.u64 = 0 pub struct decoder?( - // The value passed to set_literal_width. This lw field is copied to the - // literal_width field at the start of the decode method. During that - // method, calling set_literal_width will change lw but not literal_width. - lw base.u32[..8], + // set_literal_width_arg is the saved argument passed to set_literal_width. + // This field is copied to the literal_width field at the start of + // decode_io_writer. During that method, calling set_literal_width will + // change set_literal_width_arg but not literal_width. + set_literal_width_arg base.u32[..8], // read_from state that does not change during a decode call. literal_width base.u32[..8], @@ -67,7 +68,7 @@ pub struct decoder?( ) pub func decoder.set_literal_width!(lw base.u32[2..8]) { - this.lw = args.lw + this.set_literal_width_arg = args.lw } pub func decoder.workbuf_len() base.range_ii_u64 { @@ -79,8 +80,8 @@ pub func decoder.decode_io_writer?(dst base.io_writer, src base.io_reader, workb // Initialize read_from state. this.literal_width = 8 - if this.lw >= 2 { - this.literal_width = this.lw + if this.set_literal_width_arg >= 2 { + this.literal_width = this.set_literal_width_arg } this.clear_code = (1 as base.u32) << this.literal_width this.end_code = this.clear_code + 1