emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Allow inserting non-BMP characters


From: Philipp Stephani
Subject: Re: [PATCH] Allow inserting non-BMP characters
Date: Fri, 29 Dec 2017 20:14:41 +0000



Eli Zaretskii <address@hidden> schrieb am Do., 28. Dez. 2017 um 17:29 Uhr:
> From: Philipp Stephani <address@hidden>
> Date: Thu, 28 Dec 2017 12:31:39 +0000
> Cc: address@hidden, Eli Zaretskii <address@hidden>, address@hidden
>
> Alan Third <address@hidden> schrieb am Do., 28. Dez. 2017 um 12:38 Uhr:
>
>  On Wed, Dec 27, 2017 at 05:41:23AM +0200, Eli Zaretskii wrote:
>  > What about the possibility that SAFE_NALLOCA could signal an error and
>  > longjmp to top level?  Does this code always run in the main thread,
>  > and if so, can it allow such longjmp's?
>
>  I think it does always run in the main thread, however since it runs
>  within the NSApplication run loop I’ve no idea what would happen if we
>  did a longjmp.
>
> We should probably avoid longjmps here. This message is invoked by the window manager, which most likely
> can't deal with longjmps.

Then maybe process the input in chunks using a fixed-size buffer?

Maybe, but for now I've reverted to just call characterAtIndex repeatedly. I guess in 99% of cases we insert a single code unit anyway, and if we plan to make the code more complex we should benchmark it before. 

Attachment: 0001-Allow-inserting-non-BMP-characters.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]