Mercurial > hg > xemacs-beta
comparison src/data.c @ 410:de805c49cfc1 r21-2-35
Import from CVS: tag r21-2-35
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:19:21 +0200 |
parents | b8cc9ab3f761 |
children | 697ef44129c6 |
comparison
equal
deleted
inserted
replaced
409:301b9ebbdf3b | 410:de805c49cfc1 |
---|---|
768 } | 768 } |
769 else if (STRINGP (array)) | 769 else if (STRINGP (array)) |
770 { | 770 { |
771 CHECK_CHAR_COERCE_INT (newval); | 771 CHECK_CHAR_COERCE_INT (newval); |
772 if (idx >= XSTRING_CHAR_LENGTH (array)) goto range_error; | 772 if (idx >= XSTRING_CHAR_LENGTH (array)) goto range_error; |
773 set_string_char (XSTRING (array), idx, (unsigned char) XCHAR (newval)); | 773 set_string_char (XSTRING (array), idx, XCHAR (newval)); |
774 bump_string_modiff (array); | 774 bump_string_modiff (array); |
775 } | 775 } |
776 else | 776 else |
777 { | 777 { |
778 array = wrong_type_argument (Qarrayp, array); | 778 array = wrong_type_argument (Qarrayp, array); |
1062 atoi do this anyway, so we might as well make Emacs lisp consistent. */ | 1062 atoi do this anyway, so we might as well make Emacs lisp consistent. */ |
1063 while (*p == ' ' || *p == '\t') | 1063 while (*p == ' ' || *p == '\t') |
1064 p++; | 1064 p++; |
1065 | 1065 |
1066 #ifdef LISP_FLOAT_TYPE | 1066 #ifdef LISP_FLOAT_TYPE |
1067 if (isfloat_string (p)) | 1067 if (isfloat_string (p) && b == 10) |
1068 return make_float (atof (p)); | 1068 return make_float (atof (p)); |
1069 #endif /* LISP_FLOAT_TYPE */ | 1069 #endif /* LISP_FLOAT_TYPE */ |
1070 | 1070 |
1071 if (b == 10) | 1071 if (b == 10) |
1072 { | 1072 { |
1734 /* just leave bogus elements there */ | 1734 /* just leave bogus elements there */ |
1735 need_to_mark_cons = 1; | 1735 need_to_mark_cons = 1; |
1736 need_to_mark_elem = 1; | 1736 need_to_mark_elem = 1; |
1737 } | 1737 } |
1738 else if (marked_p (XCDR (elem))) | 1738 else if (marked_p (XCDR (elem))) |
1739 { | |
1740 need_to_mark_cons = 1; | |
1741 /* We still need to mark elem and XCAR (elem); | |
1742 marking elem does both */ | |
1743 need_to_mark_elem = 1; | |
1744 } | |
1745 break; | |
1746 | |
1747 case WEAK_LIST_FULL_ASSOC: | |
1748 if (!CONSP (elem)) | |
1749 { | |
1750 /* just leave bogus elements there */ | |
1751 need_to_mark_cons = 1; | |
1752 need_to_mark_elem = 1; | |
1753 } | |
1754 else if (marked_p (XCAR (elem)) || | |
1755 marked_p (XCDR (elem))) | |
1739 { | 1756 { |
1740 need_to_mark_cons = 1; | 1757 need_to_mark_cons = 1; |
1741 /* We still need to mark elem and XCAR (elem); | 1758 /* We still need to mark elem and XCAR (elem); |
1742 marking elem does both */ | 1759 marking elem does both */ |
1743 need_to_mark_elem = 1; | 1760 need_to_mark_elem = 1; |
1882 if (EQ (symbol, Qsimple)) return WEAK_LIST_SIMPLE; | 1899 if (EQ (symbol, Qsimple)) return WEAK_LIST_SIMPLE; |
1883 if (EQ (symbol, Qassoc)) return WEAK_LIST_ASSOC; | 1900 if (EQ (symbol, Qassoc)) return WEAK_LIST_ASSOC; |
1884 if (EQ (symbol, Qold_assoc)) return WEAK_LIST_ASSOC; /* EBOLA ALERT! */ | 1901 if (EQ (symbol, Qold_assoc)) return WEAK_LIST_ASSOC; /* EBOLA ALERT! */ |
1885 if (EQ (symbol, Qkey_assoc)) return WEAK_LIST_KEY_ASSOC; | 1902 if (EQ (symbol, Qkey_assoc)) return WEAK_LIST_KEY_ASSOC; |
1886 if (EQ (symbol, Qvalue_assoc)) return WEAK_LIST_VALUE_ASSOC; | 1903 if (EQ (symbol, Qvalue_assoc)) return WEAK_LIST_VALUE_ASSOC; |
1904 if (EQ (symbol, Qfull_assoc)) return WEAK_LIST_FULL_ASSOC; | |
1887 | 1905 |
1888 signal_simple_error ("Invalid weak list type", symbol); | 1906 signal_simple_error ("Invalid weak list type", symbol); |
1889 return WEAK_LIST_SIMPLE; /* not reached */ | 1907 return WEAK_LIST_SIMPLE; /* not reached */ |
1890 } | 1908 } |
1891 | 1909 |
1896 { | 1914 { |
1897 case WEAK_LIST_SIMPLE: return Qsimple; | 1915 case WEAK_LIST_SIMPLE: return Qsimple; |
1898 case WEAK_LIST_ASSOC: return Qassoc; | 1916 case WEAK_LIST_ASSOC: return Qassoc; |
1899 case WEAK_LIST_KEY_ASSOC: return Qkey_assoc; | 1917 case WEAK_LIST_KEY_ASSOC: return Qkey_assoc; |
1900 case WEAK_LIST_VALUE_ASSOC: return Qvalue_assoc; | 1918 case WEAK_LIST_VALUE_ASSOC: return Qvalue_assoc; |
1919 case WEAK_LIST_FULL_ASSOC: return Qfull_assoc; | |
1901 default: | 1920 default: |
1902 abort (); | 1921 abort (); |
1903 } | 1922 } |
1904 | 1923 |
1905 return Qnil; /* not reached */ | 1924 return Qnil; /* not reached */ |
1934 pointed to. | 1953 pointed to. |
1935 `key-assoc' Objects in the list disappear if they are conses | 1954 `key-assoc' Objects in the list disappear if they are conses |
1936 and the car is not pointed to. | 1955 and the car is not pointed to. |
1937 `value-assoc' Objects in the list disappear if they are conses | 1956 `value-assoc' Objects in the list disappear if they are conses |
1938 and the cdr is not pointed to. | 1957 and the cdr is not pointed to. |
1958 `full-assoc' Objects in the list disappear if they are conses | |
1959 and neither the car nor the cdr is pointed to. | |
1939 */ | 1960 */ |
1940 (type)) | 1961 (type)) |
1941 { | 1962 { |
1942 if (NILP (type)) | 1963 if (NILP (type)) |
1943 type = Qsimple; | 1964 type = Qsimple; |