From 86e9acc7a7b714307e08ab25117ca03cecb00936 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Thu, 9 Oct 2014 13:44:26 +0000 Subject: throw away the long obsolete runtime type information in the C runtime --- src/runtime/c/gu/utf8.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/runtime/c/gu/utf8.c') diff --git a/src/runtime/c/gu/utf8.c b/src/runtime/c/gu/utf8.c index 70db65f05..8f22e5823 100644 --- a/src/runtime/c/gu/utf8.c +++ b/src/runtime/c/gu/utf8.c @@ -49,9 +49,9 @@ gu_in_utf8_(GuIn* in, GuExn* err) uint8_t buf[3]; // If reading the extra bytes causes EOF, it is an encoding // error, not a legitimate end of character stream. - GuExn* tmp_err = gu_exn(err, GuEOF, NULL); - gu_in_bytes(in, buf, len, tmp_err); - if (tmp_err->caught) { + gu_in_bytes(in, buf, len, err); + if (gu_exn_caught(err, GuEOF)) { + gu_exn_clear(err); goto fail; } if (!gu_ok(err)) { @@ -151,9 +151,9 @@ gu_in_utf8_buf(uint8_t** buf, GuIn* in, GuExn* err) } // If reading the extra bytes causes EOF, it is an encoding // error, not a legitimate end of character stream. - GuExn* tmp_err = gu_exn(err, GuEOF, NULL); - gu_in_bytes(in, p, len, tmp_err); - if (tmp_err->caught) { + gu_in_bytes(in, p, len, err); + if (gu_exn_caught(err, GuEOF)) { + gu_exn_clear(err); goto fail; } if (!gu_ok(err)) { -- cgit v1.2.3