From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Allow inserting non-BMP characters Date: Wed, 27 Dec 2017 05:41:23 +0200 Message-ID: <83shbwhm70.fsf@gnu.org> References: <20171225210115.13789-1-phst@google.com> <83d132hz9e.fsf@gnu.org> <834lodii55.fsf@gnu.org> <83zi65grxv.fsf@gnu.org> <20171226213642.GB82103@breton.holly.idiocy.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1514346000 12142 195.159.176.226 (27 Dec 2017 03:40:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 27 Dec 2017 03:40:00 +0000 (UTC) Cc: phst@google.com, p.stephani2@gmail.com, emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 27 04:39:56 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eU2ZM-0002bz-GM for ged-emacs-devel@m.gmane.org; Wed, 27 Dec 2017 04:39:52 +0100 Original-Received: from localhost ([::1]:42266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eU2bL-00035w-4w for ged-emacs-devel@m.gmane.org; Tue, 26 Dec 2017 22:41:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eU2ai-00034z-U7 for emacs-devel@gnu.org; Tue, 26 Dec 2017 22:41:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eU2ae-0003Et-VY for emacs-devel@gnu.org; Tue, 26 Dec 2017 22:41:16 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eU2ae-0003Eg-S0; Tue, 26 Dec 2017 22:41:12 -0500 Original-Received: from [176.228.60.248] (port=4230 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eU2ae-0003NG-9h; Tue, 26 Dec 2017 22:41:12 -0500 In-reply-to: <20171226213642.GB82103@breton.holly.idiocy.org> (message from Alan Third on Tue, 26 Dec 2017 21:36:42 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221433 Archived-At: > Date: Tue, 26 Dec 2017 21:36:42 +0000 > From: Alan Third > Cc: Philipp Stephani , phst@google.com, > emacs-devel@gnu.org > > Appleā€™s documentation says to put it in a buffer: > > If you want to iterate over the characters of a string, one of the > things you should not do is use the characterAtIndex: method to > retrieve each character separately. This method is not designed for > repeated access. Instead, consider fetching the characters all at once > using the getCharacters:range: method and iterating over the bytes > directly. > > https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CocoaPerformance/Articles/StringDrawing.html#//apple_ref/doc/uid/TP40001445-112378 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?