mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-04 11:23:24 +00:00
Improve commentary in nsfns.m
* src/nsfns.m (lispString): Avoid C++ comment and make the commentary actually relevant to the reason `make_string' is used.
This commit is contained in:
parent
5de5e4b4d0
commit
3af27a4b81
1 changed files with 5 additions and 1 deletions
|
@ -3829,7 +3829,11 @@ handled fairly well by the NS libraries (displayed with distinct
|
||||||
/* Make a Lisp string from an NSString. */
|
/* Make a Lisp string from an NSString. */
|
||||||
- (Lisp_Object)lispString
|
- (Lisp_Object)lispString
|
||||||
{
|
{
|
||||||
// make_string behaves predictably and correctly with UTF-8 input.
|
/* `make_string' creates a string with a given length, instead of
|
||||||
|
searching for a trailing NULL byte to determine its end. This is
|
||||||
|
important because this function is called to convert NSString
|
||||||
|
objects containing clipboard data, which can contain NUL bytes,
|
||||||
|
into Lisp strings. (bug#64697) */
|
||||||
return make_string ([self UTF8String],
|
return make_string ([self UTF8String],
|
||||||
[self lengthOfBytesUsingEncoding: NSUTF8StringEncoding]);
|
[self lengthOfBytesUsingEncoding: NSUTF8StringEncoding]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue