From ebaf11b608664ec92f82f2da3bb740b6dc880823 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 18 Feb 2010 11:27:25 +0900 Subject: [PATCH] Fix handling of CODING_RESULT_INSUFFICIENT_DST. --- src/ChangeLog | 7 +++++++ src/coding.c | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1143ea96633..d06237d7a04 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2010-02-18 Kazuhiro Ito (tiny change) + + * coding.c (record_conversion_result): Handle + CODING_RESULT_INSUFFICIENT_DST. + (decode_coding_object): Record CODING_RESULT_INSUFFICIENT_MEM on + memory allocation error. + 2010-02-17 Kenichi Handa * coding.c (decode_coding_ccl): Don't setup ccl program here. Fix diff --git a/src/coding.c b/src/coding.c index 879cae56194..2144fe5fcd4 100644 --- a/src/coding.c +++ b/src/coding.c @@ -993,6 +993,11 @@ record_conversion_result (struct coding_system *coding, case CODING_RESULT_INSUFFICIENT_MEM: Vlast_code_conversion_error = Qinsufficient_memory; break; + case CODING_RESULT_INSUFFICIENT_DST: + /* Don't record this error in Vlast_code_conversion_error + because it happens just temporarily and is resolved when the + whole conversion is finished. */ + break; case CODING_RESULT_SUCCESS: break; default: @@ -7865,7 +7870,7 @@ decode_coding_object (coding, src_object, from, from_byte, to, to_byte, if (! destination) { record_conversion_result (coding, - CODING_RESULT_INSUFFICIENT_DST); + CODING_RESULT_INSUFFICIENT_MEM); unbind_to (count, Qnil); return; } -- 2.39.2