]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix handling of CODING_RESULT_INSUFFICIENT_DST.
authorKenichi Handa <handa@m17n.org>
Thu, 18 Feb 2010 02:27:25 +0000 (11:27 +0900)
committerKenichi Handa <handa@m17n.org>
Thu, 18 Feb 2010 02:27:25 +0000 (11:27 +0900)
src/ChangeLog
src/coding.c

index 1143ea96633e79d8938c027d040039536a820df4..d06237d7a0437e0e74a6d037b4414443b30f7d56 100644 (file)
@@ -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
index 879cae5619419486c11c81c856c994e9d8421d44..2144fe5fcd40a27af90af324ebf4efe8ffa7c59d 100644 (file)
@@ -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;
            }