2378 |
coding.mode |= (CODING_MODE_SAFE_ENCODING | CODING_MODE_LAST_BLOCK); |
coding.mode |= (CODING_MODE_SAFE_ENCODING | CODING_MODE_LAST_BLOCK); |
2379 |
/* We suppress producing escape sequences for composition. */ |
/* We suppress producing escape sequences for composition. */ |
2380 |
coding.common_flags &= ~CODING_ANNOTATION_MASK; |
coding.common_flags &= ~CODING_ANNOTATION_MASK; |
2381 |
|
coding.dst_bytes = XSTRING (string)->size * 2; |
2382 |
|
coding.destination = (unsigned char *) xmalloc (coding.dst_bytes); |
2383 |
encode_coding_object (&coding, string, 0, 0, |
encode_coding_object (&coding, string, 0, 0, |
2384 |
XSTRING (string)->size, |
XSTRING (string)->size, |
2385 |
STRING_BYTES (XSTRING (string)), Qt); |
STRING_BYTES (XSTRING (string)), Qnil); |
2386 |
*text_bytes = coding.produced; |
*text_bytes = coding.produced; |
2387 |
*stringp = (result == 1 || !EQ (coding_system, Qcompound_text)); |
*stringp = (result == 1 || !EQ (coding_system, Qcompound_text)); |
2388 |
return XSTRING (coding.dst_object)->data; |
return coding.destination; |
2389 |
} |
} |
2390 |
|
|
2391 |
|
|