From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 8764544: Treat control characters in JSON strings as invalid Date: Thu, 28 Sep 2017 20:19:01 +0000 Message-ID: References: <20170818000543.9841.93700@vcs0.savannah.gnu.org> <20170818000544.84B5E2052C@vcs0.savannah.gnu.org> <20170818141330.GA848@holos.localdomain> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113c48ac16d5b3055a459fa6" X-Trace: blaine.gmane.org 1506629962 20038 195.159.176.226 (28 Sep 2017 20:19:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 28 Sep 2017 20:19:22 +0000 (UTC) To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 28 22:19:18 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 1dxfH8-0004eT-Jk for ged-emacs-devel@m.gmane.org; Thu, 28 Sep 2017 22:19:14 +0200 Original-Received: from localhost ([::1]:60714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxfHG-00068C-1n for ged-emacs-devel@m.gmane.org; Thu, 28 Sep 2017 16:19:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxfH7-00067K-Jy for emacs-devel@gnu.org; Thu, 28 Sep 2017 16:19:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxfH6-0007RV-P3 for emacs-devel@gnu.org; Thu, 28 Sep 2017 16:19:13 -0400 Original-Received: from mail-oi0-x22d.google.com ([2607:f8b0:4003:c06::22d]:48747) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dxfH6-0007R0-JK for emacs-devel@gnu.org; Thu, 28 Sep 2017 16:19:12 -0400 Original-Received: by mail-oi0-x22d.google.com with SMTP id 125so4254786oie.5 for ; Thu, 28 Sep 2017 13:19:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=PAEdHfDUg4RRQN1UTi7G1STLsDkM7uee5QWxU9VRVGI=; b=cI5N9K78tZF7fc+PLbUQPmbPTnXg/VlUtAvaHtXX4V/Wc1Nwz0v4VmQneZ9dsalHVX PLoa4dDPnl1GB78JkPEoo5koReQRb7guHJdAyIiehOdxkgQcsDp1bv/11cvXhjZG5blW W4QGU+/qltp1/uJNVYyt352WJz3Y3nSVilVV/vT1Ht35Qp9K3yp3mnIGXxVMBOQ4aUv2 n6ece+MUYUTd9Sc4GpacwqZ1nomIrvIbNG20203HGUTJaKFbwxaxjU6kvNAkbRk10sbN GlTWoql1elXqJ4pCX/iTDHqI8zOyjCGJpynhwALbnoH+eFXuNqTC+cRyVUOn0Q+RDUbG ECIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=PAEdHfDUg4RRQN1UTi7G1STLsDkM7uee5QWxU9VRVGI=; b=AP08kAm1iyvFiU0Y+9hyuCBejeqhsY+VwPnsBUm+zoa/Kw4YKAFowcXLiOMpMoV8Yz UPc2PyHpeYLrLpvVa6DujWdp9Ot31ze6ASFMH+8MGbWhx6HHvGEkVG2VGFfylVqb77eR TPpy3qOcZj0kdp7ZDvdjYY1GgD1MM1V51y5vdtUK5WHwqbJOQmkRdsCH17e7PlfDXUFn M02arwidnqr8samZNuy3WKcjJ5vWavB9B0SCVjee5iWuJRkhlrTxA1Uq0/hHfSzmB8uF y+dMQf29rJBU9fHL49DMVq4/yU0ucbog+wCwzjSR1xP2N/g/tFvKUh2JIeiNbX9DFuTz BocQ== X-Gm-Message-State: AHPjjUhmVo0U18KHxjHKCxXoxoHm4iiqgx2/zm45kBnaeLXcKTXGzZXE 9XngpU67A3hyMDjtVOuuAQBYDJxybQ8Obc0lwFg= X-Google-Smtp-Source: AOwi7QBaOntyFqbUWuP4rHZi5HMglhiMWcwRfffFyfPrMjf5iEyu2XA1JEGiFxkuDHHbwCKXbsXjFi5pdGxCzbYj1TI= X-Received: by 10.202.171.140 with SMTP id u134mr1178877oie.268.1506629951868; Thu, 28 Sep 2017 13:19:11 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22d 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:218863 Archived-At: --001a113c48ac16d5b3055a459fa6 Content-Type: text/plain; charset="UTF-8" Stefan Monnier schrieb am Fr., 18. Aug. 2017 um 22:25 Uhr: > >>> - (or (char-after (point)) :json-eof)) > >> I wonder why it used :json-eof instead of using nil ? > >> Any idea? > > Not sure--it has been there since json.el was added to Emacs. > > Then why use 0 now instead of nil? > > Because `following-char' returns 0 at EOB. "At the end of the buffer or accessible region, return 0." --001a113c48ac16d5b3055a459fa6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Stefan= Monnier <monnier@iro.umontr= eal.ca> schrieb am Fr., 18. Aug. 2017 um 22:25=C2=A0Uhr:
>>> -=C2=A0 (or (char-after (point)) = :json-eof))
>> I wonder why it used :json-eof instead of using nil ?
>> Any idea?
> Not sure--it has been there since json.el was added to Emacs.

Then why use 0 now instead of nil?


Because `following-char' returns 0 at = EOB. "At the end of the buffer or accessible region, return 0."
--001a113c48ac16d5b3055a459fa6--