Remove hard-coded cgen for the reset method

This commit is contained in:
Nigel Tao committed 2018-06-02 12:26:00 +10:00
1 parent 5b08ad2ba6
commit 9afd91075d
10 files changed
+74 -19

No files matched your search

+4
View File
@@ -1254,6 +1254,10 @@ uint32_t wuffs_adler32__hasher__update(wuffs_adler32__hasher* self,
// See the License for the specific language governing permissions and
// limitations under the License.
static inline wuffs_base__empty_struct wuffs_base__return_empty_struct() {
return ((wuffs_base__empty_struct){});
}
#define WUFFS_BASE__IGNORE_POTENTIALLY_UNUSED_VARIABLE(x) (void)(x)
// WUFFS_BASE__MAGIC is a magic number to check that initializers are called.
+4
View File
@@ -1253,6 +1253,10 @@ uint32_t wuffs_crc32__ieee_hasher__update(wuffs_crc32__ieee_hasher* self,
// See the License for the specific language governing permissions and
// limitations under the License.
static inline wuffs_base__empty_struct wuffs_base__return_empty_struct() {
return ((wuffs_base__empty_struct){});
}
#define WUFFS_BASE__IGNORE_POTENTIALLY_UNUSED_VARIABLE(x) (void)(x)
// WUFFS_BASE__MAGIC is a magic number to check that initializers are called.
+4
View File
@@ -1344,6 +1344,10 @@ wuffs_deflate__status wuffs_deflate__decoder__decode(
// See the License for the specific language governing permissions and
// limitations under the License.
static inline wuffs_base__empty_struct wuffs_base__return_empty_struct() {
return ((wuffs_base__empty_struct){});
}
#define WUFFS_BASE__IGNORE_POTENTIALLY_UNUSED_VARIABLE(x) (void)(x)
// WUFFS_BASE__MAGIC is a magic number to check that initializers are called.
+9 -7
View File
@@ -1397,6 +1397,10 @@ wuffs_gif__status wuffs_gif__decoder__decode_up_to_id_part1(
// See the License for the specific language governing permissions and
// limitations under the License.
static inline wuffs_base__empty_struct wuffs_base__return_empty_struct() {
return ((wuffs_base__empty_struct){});
}
#define WUFFS_BASE__IGNORE_POTENTIALLY_UNUSED_VARIABLE(x) (void)(x)
// WUFFS_BASE__MAGIC is a magic number to check that initializers are called.
@@ -1958,12 +1962,6 @@ void wuffs_gif__lzw_decoder__check_wuffs_version(wuffs_gif__lzw_decoder* self,
size_t sizeof_star_self,
uint32_t wuffs_version);
static inline void wuffs_gif__lzw_decoder__reset(wuffs_gif__lzw_decoder* self) {
memset(self, 0, sizeof *self);
wuffs_gif__lzw_decoder__check_wuffs_version(self, sizeof *self,
WUFFS_VERSION);
}
// ---------------- Private Function Prototypes
static wuffs_gif__status wuffs_gif__decoder__decode_header(
@@ -3401,7 +3399,11 @@ static wuffs_gif__status wuffs_gif__decoder__decode_id_part1(
}
}
if (self->private_impl.f_previous_lzw_decode_ended_abruptly) {
wuffs_gif__lzw_decoder__reset(&self->private_impl.f_lzw);
(memset(&self->private_impl.f_lzw, 0, sizeof((wuffs_gif__lzw_decoder){})),
wuffs_gif__lzw_decoder__check_wuffs_version(
&self->private_impl.f_lzw, sizeof((wuffs_gif__lzw_decoder){}),
WUFFS_VERSION),
wuffs_base__return_empty_struct());
}
{
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(5);
+4
View File
@@ -1556,6 +1556,10 @@ wuffs_gzip__status wuffs_gzip__decoder__decode(wuffs_gzip__decoder* self,
// See the License for the specific language governing permissions and
// limitations under the License.
static inline wuffs_base__empty_struct wuffs_base__return_empty_struct() {
return ((wuffs_base__empty_struct){});
}
#define WUFFS_BASE__IGNORE_POTENTIALLY_UNUSED_VARIABLE(x) (void)(x)
// WUFFS_BASE__MAGIC is a magic number to check that initializers are called.
+4
View File
@@ -1556,6 +1556,10 @@ wuffs_zlib__status wuffs_zlib__decoder__decode(wuffs_zlib__decoder* self,
// See the License for the specific language governing permissions and
// limitations under the License.
static inline wuffs_base__empty_struct wuffs_base__return_empty_struct() {
return ((wuffs_base__empty_struct){});
}
#define WUFFS_BASE__IGNORE_POTENTIALLY_UNUSED_VARIABLE(x) (void)(x)
// WUFFS_BASE__MAGIC is a magic number to check that initializers are called.