mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-19 18:13:55 +00:00
(Fget_byte): Fix and make it faster for unibyte target.
This commit is contained in:
parent
47264a9799
commit
d5998e0317
@ -1,3 +1,8 @@
|
||||
2008-11-10 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* character.c (Fget_byte): Fix and make it faster for unibyte
|
||||
target.
|
||||
|
||||
2008-11-08 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* dired.c (file_name_completion): If completion_ignore_case is
|
||||
|
@ -1058,6 +1058,8 @@ character is not ASCII nor 8-bit character, an error is signalled. */)
|
||||
pos = XFASTINT (position);
|
||||
p = CHAR_POS_ADDR (pos);
|
||||
}
|
||||
if (NILP (current_buffer->enable_multibyte_characters))
|
||||
return make_number (*p);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1074,6 +1076,8 @@ character is not ASCII nor 8-bit character, an error is signalled. */)
|
||||
pos = XFASTINT (position);
|
||||
p = SDATA (string) + string_char_to_byte (string, pos);
|
||||
}
|
||||
if (! STRING_MULTIBYTE (string))
|
||||
return make_number (*p);
|
||||
}
|
||||
c = STRING_CHAR (p, 0);
|
||||
if (CHAR_BYTE8_P (c))
|
||||
|
Loading…
Reference in New Issue
Block a user