Commit 9b821a21 authored by Paul Eggert's avatar Paul Eggert

* fns.c (internal_equal): Don't assume size_t fits in int.

parent 3c616cfa
2011-04-19 Paul Eggert <eggert@cs.ucla.edu>
* fns.c (internal_equal): Don't assume size_t fits in int.
* alloc.c (compact_small_strings): Tighten assertion a little.
Replace pEd with more-general pI, and fix some printf arg casts.
......
......@@ -2063,14 +2063,12 @@ internal_equal (register Lisp_Object o1, register Lisp_Object o2, int depth, int
/* Boolvectors are compared much like strings. */
if (BOOL_VECTOR_P (o1))
{
int size_in_chars
= ((XBOOL_VECTOR (o1)->size + BOOL_VECTOR_BITS_PER_CHAR - 1)
/ BOOL_VECTOR_BITS_PER_CHAR);
if (XBOOL_VECTOR (o1)->size != XBOOL_VECTOR (o2)->size)
return 0;
if (memcmp (XBOOL_VECTOR (o1)->data, XBOOL_VECTOR (o2)->data,
size_in_chars))
((XBOOL_VECTOR (o1)->size
+ BOOL_VECTOR_BITS_PER_CHAR - 1)
/ BOOL_VECTOR_BITS_PER_CHAR)))
return 0;
return 1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment