comparison src/data.c @ 647:b39c14581166

[xemacs-hg @ 2001-08-13 04:45:47 by ben] removal of unsigned, size_t, etc.
author ben
date Mon, 13 Aug 2001 04:46:48 +0000
parents 023b83f4e54b
children fdefd0186b75
comparison
equal deleted inserted replaced
646:00c54252fe4f 647:b39c14581166
718 if (idx >= XVECTOR_LENGTH (array)) goto range_error; 718 if (idx >= XVECTOR_LENGTH (array)) goto range_error;
719 return XVECTOR_DATA (array)[idx]; 719 return XVECTOR_DATA (array)[idx];
720 } 720 }
721 else if (BIT_VECTORP (array)) 721 else if (BIT_VECTORP (array))
722 { 722 {
723 if (idx >= bit_vector_length (XBIT_VECTOR (array))) goto range_error; 723 if (idx >= (EMACS_INT) bit_vector_length (XBIT_VECTOR (array)))
724 goto range_error;
724 return make_int (bit_vector_bit (XBIT_VECTOR (array), idx)); 725 return make_int (bit_vector_bit (XBIT_VECTOR (array), idx));
725 } 726 }
726 else if (STRINGP (array)) 727 else if (STRINGP (array))
727 { 728 {
728 if (idx >= XSTRING_CHAR_LENGTH (array)) goto range_error; 729 if (idx >= XSTRING_CHAR_LENGTH (array)) goto range_error;
772 if (idx >= XVECTOR_LENGTH (array)) goto range_error; 773 if (idx >= XVECTOR_LENGTH (array)) goto range_error;
773 XVECTOR_DATA (array)[idx] = newval; 774 XVECTOR_DATA (array)[idx] = newval;
774 } 775 }
775 else if (BIT_VECTORP (array)) 776 else if (BIT_VECTORP (array))
776 { 777 {
777 if (idx >= bit_vector_length (XBIT_VECTOR (array))) goto range_error; 778 if (idx >= (EMACS_INT) bit_vector_length (XBIT_VECTOR (array)))
779 goto range_error;
778 CHECK_BIT (newval); 780 CHECK_BIT (newval);
779 set_bit_vector_bit (XBIT_VECTOR (array), idx, !ZEROP (newval)); 781 set_bit_vector_bit (XBIT_VECTOR (array), idx, !ZEROP (newval));
780 } 782 }
781 else if (STRINGP (array)) 783 else if (STRINGP (array))
782 { 784 {
1607 1609
1608 return ((w1->type == w2->type) && 1610 return ((w1->type == w2->type) &&
1609 internal_equal (w1->list, w2->list, depth + 1)); 1611 internal_equal (w1->list, w2->list, depth + 1));
1610 } 1612 }
1611 1613
1612 static unsigned long 1614 static Hash_Code
1613 weak_list_hash (Lisp_Object obj, int depth) 1615 weak_list_hash (Lisp_Object obj, int depth)
1614 { 1616 {
1615 struct weak_list *w = XWEAK_LIST (obj); 1617 struct weak_list *w = XWEAK_LIST (obj);
1616 1618
1617 return HASH2 ((unsigned long) w->type, 1619 return HASH2 ((Hash_Code) w->type,
1618 internal_hash (w->list, depth + 1)); 1620 internal_hash (w->list, depth + 1));
1619 } 1621 }
1620 1622
1621 Lisp_Object 1623 Lisp_Object
1622 make_weak_list (enum weak_list_type type) 1624 make_weak_list (enum weak_list_type type)