Lisp_Object ch;
EMACS_INT this_len_byte;
- if (VECTORP (this))
+ if (VECTORP (this) || COMPILEDP (this))
for (i = 0; i < len; i++)
{
ch = AREF (this, i);
EMACS_INT converted = str_to_unibyte (SDATA (string), str, chars, 0);
if (converted < chars)
- error ("Can't convert the %dth character to unibyte", converted);
+ error ("Can't convert the %"pEd"th character to unibyte", converted);
string = make_unibyte_string ((char *) str, chars);
xfree (str);
}
{
Lisp_Object res;
EMACS_INT size;
- EMACS_INT size_byte;
CHECK_VECTOR_OR_STRING (string);
- if (STRINGP (string))
- {
- size = SCHARS (string);
- size_byte = SBYTES (string);
- }
- else
- size = ASIZE (string);
+ size = STRINGP (string) ? SCHARS (string) : ASIZE (string);
if (!(0 <= from && from <= to && to <= size))
args_out_of_range_3 (string, make_number (from), make_number (to));
1) lists are not relocated and 2) the list is marked via `seq' so will not
be freed */
- if (VECTORP (seq))
+ if (VECTORP (seq) || COMPILEDP (seq))
{
for (i = 0; i < leni; i++)
{
{
double val = XFLOAT_DATA (obj);
unsigned char *p = (unsigned char *) &val;
- unsigned char *e = p + sizeof val;
- for (hash = 0; p < e; ++p)
- hash = SXHASH_COMBINE (hash, *p);
+ size_t i;
+ for (hash = 0, i = 0; i < sizeof val; i++)
+ hash = SXHASH_COMBINE (hash, p[i]);
break;
}