From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56347: Optimize/simplify STRING_SET_MULTIBYTE Date: Sat, 02 Jul 2022 14:00:41 -0400 Message-ID: References: <83pmioca3h.fsf@gnu.org> <83letbbhzx.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8592"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 56347@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 02 20:01:14 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o7hQg-00023R-CX for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Jul 2022 20:01:14 +0200 Original-Received: from localhost ([::1]:51860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7hQf-0001vW-C2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Jul 2022 14:01:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7hQU-0001tV-0z for bug-gnu-emacs@gnu.org; Sat, 02 Jul 2022 14:01:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48924) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o7hQT-00021Q-OU for bug-gnu-emacs@gnu.org; Sat, 02 Jul 2022 14:01:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o7hQT-0008PB-N4 for bug-gnu-emacs@gnu.org; Sat, 02 Jul 2022 14:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Jul 2022 18:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56347 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 56347-submit@debbugs.gnu.org id=B56347.165678485032279 (code B ref 56347); Sat, 02 Jul 2022 18:01:01 +0000 Original-Received: (at 56347) by debbugs.gnu.org; 2 Jul 2022 18:00:50 +0000 Original-Received: from localhost ([127.0.0.1]:42821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o7hQI-0008OZ-KQ for submit@debbugs.gnu.org; Sat, 02 Jul 2022 14:00:50 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:4522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o7hQH-0008OG-53 for 56347@debbugs.gnu.org; Sat, 02 Jul 2022 14:00:49 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C1E268076B; Sat, 2 Jul 2022 14:00:43 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 498CC80677; Sat, 2 Jul 2022 14:00:42 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1656784842; bh=rFnZ4pjQdAouvp1BVapUWCRZ6E2naE7dsa91m5PZPnA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=pd0CH+Y1zZxn2YvqtRhNjZ+VJNfZlBOJsU8u4dNXCvNtSteWS1t1sqKnzlHrsb6dX vaqPOmVbXmdiNhVd0QIvB/DnGMvfUzd1fBLXj3mKm1ahKkQIVihnu70sOGu5yI1Qz6 BGVhKPE0K2031xNpdACq842avJc7qo234V14p0aooHlduiH8Rx/jqAvwCuoLXn6HiE gEMj9zC0LerTcMD80oRXJfMYbjFiuJ562fCxAEr2BjhbxAwK+Zz8Bc3LBVCl9Uaruz 7Kry2OQWAtefyOlGVQZuj0Gwye2QBKRP3+aEcpYJm0VfQwbfxZyT2MiUs91+fZB+gG N+X6RwJE8dZlw== Original-Received: from alfajor (unknown [45.72.196.165]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0C5E01201E5; Sat, 2 Jul 2022 14:00:41 -0400 (EDT) In-Reply-To: <83letbbhzx.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 02 Jul 2022 19:24:02 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:235946 Archived-At: >> No, I want to reduce the scope of semantics of the macro, e.g. so it can >> be implemented as a function rather than a macro and so it doesn't >> magically substitute empty_multibyte_string into a variable that held >> something else. > But the effect is that you disallow calling STRING_SET_MULTIBYTE on an > empty string, isn't it? Yes. In my book, STRING_SET_*IBYTE should basically not exist: a string is created as unibyte or multibyte and never changes after that. And indeed because we only have a single copy of the two possible empty strings, they can't be changed between unibyte<->multibyte Stefan