Mercurial > hg > xemacs-beta
diff src/mule-coding.c @ 4703:6dfca4f26f53
Register any CCL programs used by fixed-width coding-systems.
src/ChangeLog addition:
2009-09-30 Aidan Kehoe <kehoea@parhasard.net>
* mule-coding.c (fixed_width_putprop):
Register any CCL programs, avoiding crashes described by Robert
Delius Royar. Though it's unclear why, I'll try to investigate
once I'm on a 32-bit Unix machine regularly again.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 30 Sep 2009 12:48:21 +0100 |
parents | 3ba90c659d01 |
children | 0c54de4c4b9d |
line wrap: on
line diff
--- a/src/mule-coding.c Mon Sep 28 18:04:07 2009 +0200 +++ b/src/mule-coding.c Wed Sep 30 12:48:21 2009 +0100 @@ -3538,6 +3538,17 @@ if (EQ (key, Qdecode) || EQ (key, Qencode)) { + Lisp_Object sym; + + CHECK_VECTOR (value); + + sym = Fintern (concat3 (XSYMBOL_NAME (XCODING_SYSTEM_NAME (codesys)), + build_string ("-"), + XSYMBOL_NAME (key)), Qnil); + + Fregister_ccl_program (sym, value); + + /* Check if the CCL infrastructure thinks this is a sane CCL program: */ if (setup_ccl_program (&test_ccl, value) < 0) @@ -3547,11 +3558,11 @@ if (EQ (key, Qdecode)) { - XCODING_SYSTEM_FIXED_WIDTH_DECODE (codesys) = value; + XCODING_SYSTEM_FIXED_WIDTH_DECODE (codesys) = sym; } else { - XCODING_SYSTEM_FIXED_WIDTH_ENCODE (codesys) = value; + XCODING_SYSTEM_FIXED_WIDTH_ENCODE (codesys) = sym; } } else if (EQ (key, Qfrom_unicode))