diff options
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/coding.c b/src/coding.c index c10fb375672..ac828a48683 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -5761,6 +5761,7 @@ setup_coding_system (Lisp_Object coding_system, struct coding_system *coding) | |||
| 5761 | coding->safe_charsets = SDATA (val); | 5761 | coding->safe_charsets = SDATA (val); |
| 5762 | coding->default_char = XINT (CODING_ATTR_DEFAULT_CHAR (attrs)); | 5762 | coding->default_char = XINT (CODING_ATTR_DEFAULT_CHAR (attrs)); |
| 5763 | coding->carryover_bytes = 0; | 5763 | coding->carryover_bytes = 0; |
| 5764 | coding->raw_destination = 0; | ||
| 5764 | 5765 | ||
| 5765 | coding_type = CODING_ATTR_TYPE (attrs); | 5766 | coding_type = CODING_ATTR_TYPE (attrs); |
| 5766 | if (EQ (coding_type, Qundecided)) | 5767 | if (EQ (coding_type, Qundecided)) |
| @@ -8352,6 +8353,11 @@ encode_coding_object (struct coding_system *coding, | |||
| 8352 | { | 8353 | { |
| 8353 | if (BUFFERP (coding->dst_object)) | 8354 | if (BUFFERP (coding->dst_object)) |
| 8354 | coding->dst_object = Fbuffer_string (); | 8355 | coding->dst_object = Fbuffer_string (); |
| 8356 | else if (coding->raw_destination) | ||
| 8357 | /* This is used to avoid creating huge Lisp string. | ||
| 8358 | NOTE: caller who sets `raw_destination' is also | ||
| 8359 | responsible for freeing `destination' buffer. */ | ||
| 8360 | coding->dst_object = Qnil; | ||
| 8355 | else | 8361 | else |
| 8356 | { | 8362 | { |
| 8357 | coding->dst_object | 8363 | coding->dst_object |