From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michal Nazarewicz Newsgroups: gmane.emacs.bugs Subject: bug#24378: [PATCH 1/6] =?UTF-8?Q?Don=E2=80=99t?= use FETCH_MULTIBYTE_CHAR when advancing index Date: Tue, 06 Sep 2016 17:17:30 +0200 Organization: http://mina86.com/ Message-ID: References: <1473168498-13194-1-git-send-email-mina86@mina86.com> <1473168694-13605-1-git-send-email-mina86@mina86.com> <83poohay1n.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1473175766 17609 195.159.176.226 (6 Sep 2016 15:29:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Sep 2016 15:29:26 +0000 (UTC) User-Agent: Notmuch/0.19+53~g2e63a09 (http://notmuchmail.org) Emacs/25.1.50.106 (x86_64-unknown-linux-gnu) Cc: 24378@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 06 17:29:21 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1bhIJF-0003Hm-6w for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Sep 2016 17:29:13 +0200 Original-Received: from localhost ([::1]:34383 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhIJC-0001JY-Ti for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Sep 2016 11:29:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhI8V-0008G8-VW for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2016 11:18:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhI8P-0001Pu-VS for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2016 11:18:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhI8P-0001Pq-Rm for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2016 11:18:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bhI8P-0000En-Ok for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2016 11:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michal Nazarewicz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Sep 2016 15:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24378-submit@debbugs.gnu.org id=B24378.1473175071891 (code B ref 24378); Tue, 06 Sep 2016 15:18:01 +0000 Original-Received: (at 24378) by debbugs.gnu.org; 6 Sep 2016 15:17:51 +0000 Original-Received: from localhost ([127.0.0.1]:51468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhI8A-0000EE-0O for submit@debbugs.gnu.org; Tue, 06 Sep 2016 11:17:51 -0400 Original-Received: from mail-wm0-f50.google.com ([74.125.82.50]:35834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhI83-0000Ds-9N for 24378@debbugs.gnu.org; Tue, 06 Sep 2016 11:17:44 -0400 Original-Received: by mail-wm0-f50.google.com with SMTP id i204so40372798wma.0 for <24378@debbugs.gnu.org>; Tue, 06 Sep 2016 08:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:organization:references :user-agent:face:date:message-id:mime-version :content-transfer-encoding; bh=g5tN7qnwOAErxOCwgJBzSJDWYwEdP5GrYcPkXbZ52Is=; b=Nrw/X/eY1/7aq/lmRDIJ7bffVYH9hWy+bwLJsHlFiUh4QGJ+CtTdQNI54EUqg2432m 2K6pNJC7b3XMGU3/7FBNnM9lVdukblIITew5m1HPXnToUwF8l6gp/SB/r6C6Ysbnbzlp Ntg15VjzPFwxIbQthzKLcHx5Mo6fzvsEIwHS3j/FU8Y3/nn0h6JAgh8smD8zGsdN/wB5 avr3Mw7epY1o2y2BiRTYbgwzXq3ajXcdnEmBYWUDHdiZp1pYSoy0LKKGGWxV2YDAr7hJ pUJW160habBOt1KuEtoQGyBINk8MFvS+AAy/gooif2kt+6k02dHaEBTAS+24nlBI820v JHsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to :organization:references:user-agent:face:date:message-id :mime-version:content-transfer-encoding; bh=g5tN7qnwOAErxOCwgJBzSJDWYwEdP5GrYcPkXbZ52Is=; b=QXkXV/8F7AYZlVANv1brERL1u42+jHzM6zjKnvvozKKwQ/CjorKiju59DK/c4sx0Nl ihgkehsUE6L8U+uBgrCHVKYyJrALhIzPIc3o0K0hkS8Wen4kFSsr5ivMcVhSQzFq2dRx l78L9Tf1cNxbCXVjqemigd0qQ6FB4ZS9QbdOsN6dQ8ttl/MuyPP133zbCIdcB2SLGR9V 6AQFRFGrUgl+wl7jLJYs0NGlZxxQ6iLNkCFRmANCcTHziK7Rr3qOmoKW5cdmmSvU6ci+ Qb2r6xlEOQw2Sj5zmGSBkAg7C+pRmWVfahCrRdt2PG/Tc3+Mm8oLY63X9VYRJb75RXSk 2w0Q== X-Gm-Message-State: AE9vXwNgta6b4/4NX/qfjOca5g/wcFg5MZQNldsKBGcBsXtn5D+ztkRlLQeCRAbH3CxQjVtp X-Received: by 10.28.141.76 with SMTP id p73mr20278796wmd.118.1473175053244; Tue, 06 Sep 2016 08:17:33 -0700 (PDT) Original-Received: from mpn-glaptop ([2620:0:105f:301:a9f7:8009:2cb:e9ce]) by smtp.gmail.com with ESMTPSA id hk4sm26227886wjb.16.2016.09.06.08.17.31 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 06 Sep 2016 08:17:31 -0700 (PDT) In-Reply-To: <83poohay1n.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWbfGlUPDDHgE57V0jUupKjgIObY0PLrom9mH4dFRK4gmjPs41MxjOgAAACP0lEQVQ4T23Sv2vbQBQHcBk1xE6WyALX107VUEgmn6+ouUwpEQQ6uRjttkWP4CkBg2M0BQLBdPFZYPsyFYo7qEtKDQ7on+t7+nF2Ux8ahD587717OmNYrOvycHsZ+o2r051wHTHysAvGb8ygvgu4QWT0sCmkgZCIEnlV2X8BtyraazFGDuxhmKSQJMlwHQ7v5MHSNxmz78rfElwAa3ieVD9e+hBhjaPDDG6NgFo2f4wBMNIo5YmRtF0RyDgFjJjlMIWbnuM4x9MMfABGTlN4qgIQB4A1DEyA1BHWtfeWNUMwiVJKoqh97KrkOO+qzgluVYLvFCUKAX73nONeBr7BGMdM6Sg0kuep03VywLaIzRiVr+GAzKlpQIsAFnWAG2e6DT5WmWDiudZMIc6hYrMOmeMQK9WX0B+/RfjzL9DI7Y9/Iayn29Ci0r2i4f9gMimMSZLCDMalgQGU5hnUtqAN0OGvEmO1Wnl0C0wWSCEHnuHBqmygxdxA8oWXwbipoc1EoNR9DqOpBpOJrnr0criQab9ZT4LL+wI+K7GBQH30CrhUruilgP9DRTrhVWZCiAyILP+wiuLeCKGTD6r/nc8LOJcAwR6IBTUs+7CASw3QFZ0MdA2PI3zNziH4ZKVhXCRMBjeZ1DWMekKwDCASwExy+NQ86TaykaDAFHO4aP48y4 fIcDM5yOG8GcTLbOyp8A8azjJI93JFd1EA6yN8sSxMQJWoABqniRZVykYgRXErzrdqExAoUrRb0xfRp8p2A/4XmfilTtkDZ4cAAAAASUVORK5CYII= X-Face: -TR8(rDTHy/(xl?SfWd1|3:TTgDIatE^t'vop%*gVg[kn$t{EpK(P"VQ=~T2#ysNmJKN$"yTRLB4YQs$4{[.]Fc1)*O]3+XO^oXM>Q#b^ix, O)Zbn)q[y06$`e3?C)`CwR9y5riE=fv^X@x$y?D:XO6L&x4f-}}I4=VRNwiA^t1-ZrVK^07.Pi/57c_du'& X-PGP: 50751FF4 X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4 X-Hashcash: 1:20:160906:24378@debbugs.gnu.org::f32RzO/bvNnBORuf:00000000000000000000000000000000000000004HcW X-Hashcash: 1:20:160906:eliz@gnu.org::koTaFPjkcbUoaeue:000001Fmu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:123009 Archived-At: On Tue, Sep 06 2016, Eli Zaretskii wrote: >> From: Michal Nazarewicz >> Date: Tue, 6 Sep 2016 15:31:29 +0200 >>=20 >> * src/casefiddle.c (casify_region): use STRING_CHAR_AND_LENGTH as a safe >> alternative to FETCH_MULTIBYTE_CHAR which is documented in src/buffer.h >> as unsafe when used for advancing index. > > AFAIK, that comment is stale and no longer correct. I don't think > there's a reason to make this change anymore, since STRING_CHAR no > longer unifies characters. I=E2=80=99ll drop the patch in favour of updating the comment in FETCH_MULTIBYTE_CHAR then. /me wonders if STRING_CHAR_AND_LENGTH must be faster than FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. --=20 Best regards =E3=83=9F=E3=83=8F=E3=82=A6 =E2=80=9C=F0=9D=93=B6=F0=9D=93=B2=F0=9D=93=B7= =F0=9D=93=AA86=E2=80=9D =E3=83=8A=E3=82=B6=E3=83=AC=E3=83=B4=E3=82=A4=E3=83= =84 =C2=ABIf at first you don=E2=80=99t succeed, give up skydiving=C2=BB