changeset 107177:0d0660dbdea4

Fix handling of CODING_RESULT_INSUFFICIENT_DST.
author Kenichi Handa <handa@m17n.org>
date Thu, 18 Feb 2010 11:32:37 +0900
parents 6e6072f0c0a2 (current diff) 3e078e935115 (diff)
children 7f1976431211 5937202fb760
files
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Feb 17 16:39:21 2010 -0500
+++ b/src/ChangeLog	Thu Feb 18 11:32:37 2010 +0900
@@ -1,3 +1,10 @@
+2010-02-18  Kazuhiro Ito  <kzhr@d1.dion.ne.jp>  (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  <handa@m17n.org>
 
 	* coding.c (decode_coding_ccl): Don't setup ccl program here.  Fix
--- a/src/coding.c	Wed Feb 17 16:39:21 2010 -0500
+++ b/src/coding.c	Thu Feb 18 11:32:37 2010 +0900
@@ -993,6 +993,11 @@
     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 @@
 	  if (! destination)
 	    {
 	      record_conversion_result (coding,
-					CODING_RESULT_INSUFFICIENT_DST);
+					CODING_RESULT_INSUFFICIENT_MEM);
 	      unbind_to (count, Qnil);
 	      return;
 	    }