Skip to content

Commit 3af27a4

Browse files
author
Po Lu
committed
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.
1 parent 5de5e4b commit 3af27a4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/nsfns.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3829,7 +3829,11 @@ handled fairly well by the NS libraries (displayed with distinct
38293829
/* Make a Lisp string from an NSString. */
38303830
- (Lisp_Object)lispString
38313831
{
3832-
// make_string behaves predictably and correctly with UTF-8 input.
3832+
/* `make_string' creates a string with a given length, instead of
3833+
searching for a trailing NULL byte to determine its end. This is
3834+
important because this function is called to convert NSString
3835+
objects containing clipboard data, which can contain NUL bytes,
3836+
into Lisp strings. (bug#64697) */
38333837
return make_string ([self UTF8String],
38343838
[self lengthOfBytesUsingEncoding: NSUTF8StringEncoding]);
38353839
}

0 commit comments

Comments
 (0)