comparison src/fns.c @ 61735:76a2f6423902

(copy_sub_char_table): Explicitly copy the default value of the sub-chartable.
author Kenichi Handa <handa@m17n.org>
date Fri, 22 Apr 2005 07:11:08 +0000
parents afe4f19c3436
children 8ff9d677eeff
comparison
equal deleted inserted replaced
61734:64a1c93f3c3d 61735:76a2f6423902
460 nested sub char table are not copied. */ 460 nested sub char table are not copied. */
461 static Lisp_Object 461 static Lisp_Object
462 copy_sub_char_table (arg) 462 copy_sub_char_table (arg)
463 Lisp_Object arg; 463 Lisp_Object arg;
464 { 464 {
465 Lisp_Object copy = make_sub_char_table (XCHAR_TABLE (arg)->defalt); 465 Lisp_Object copy = make_sub_char_table (Qnil);
466 int i; 466 int i;
467 467
468 XCHAR_TABLE (copy)->defalt = XCHAR_TABLE (arg)->defalt;
468 /* Copy all the contents. */ 469 /* Copy all the contents. */
469 bcopy (XCHAR_TABLE (arg)->contents, XCHAR_TABLE (copy)->contents, 470 bcopy (XCHAR_TABLE (arg)->contents, XCHAR_TABLE (copy)->contents,
470 SUB_CHAR_TABLE_ORDINARY_SLOTS * sizeof (Lisp_Object)); 471 SUB_CHAR_TABLE_ORDINARY_SLOTS * sizeof (Lisp_Object));
471 /* Recursively copy any sub char-tables in the ordinary slots. */ 472 /* Recursively copy any sub char-tables in the ordinary slots. */
472 for (i = 32; i < SUB_CHAR_TABLE_ORDINARY_SLOTS; i++) 473 for (i = 32; i < SUB_CHAR_TABLE_ORDINARY_SLOTS; i++)