From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add a mechanism for passing unibyte strings from lisp to modules. Date: Fri, 21 Jun 2024 22:08:22 +0300 Message-ID: <86v822jeqh.fsf@gnu.org> References: <20240621181400.174822-2-brennan@umanwizard.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31852"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Brennan Vincent Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 21 21:09:02 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sKjd8-0007zx-0b for ged-emacs-devel@m.gmane-mx.org; Fri, 21 Jun 2024 21:09:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKjca-0007fj-NN; Fri, 21 Jun 2024 15:08:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKjcY-0007fY-I6 for emacs-devel@gnu.org; Fri, 21 Jun 2024 15:08:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKjcX-0008UN-JC; Fri, 21 Jun 2024 15:08:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=D7dDweha3BPWgkJvztUTEjbgr7JN9K46P+wTPht5R0k=; b=CZrG2k/ojC1Y G0+boJnHVHJl2LQ7kbbyoGsYbo21GkoDqwP8hdAMFfKEXmNBUZdjMbmD/xnirV0dJ5opd0YjCjHQT rh89yPfAYHp6n4/CYpcfRQNz4qtQIcFfYpmuSwZzk32b6p3rqbcb8OAwjF2kuTYpzmwox99s3O4ES 9bNNEGs8RU/B0ZITmM11Ta+taP50ys7YzrbQSaTg7LqaIXhoTDB5suADZjbAesuL+9/E3mO2Z+zy9 OC6zoptgbKSgGmzE+Cq0i4sD3/N3lg4qWtuITlIE6VTc7bQ8MWfF9VB24mWNvenekgp2LqEUxs/SN 7M9goiaAyI2bsQO38LJKVg==; In-Reply-To: <20240621181400.174822-2-brennan@umanwizard.com> (message from Brennan Vincent on Fri, 21 Jun 2024 14:13:14 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320436 Archived-At: > From: Brennan Vincent > Date: Fri, 21 Jun 2024 14:13:14 -0400 > > Since the introduction of make_unibyte_string, it has been possible to pass > raw binary data from modules to lisp, but not the other way around > (except by using vectors of bytes, which is inefficient). This > patch implements that feature so that raw binary data can be sent both ways. Please describe the motivation and real-life use cases for this. In general, we want to minimize the use of unibyte strings in Emacs. I also don't understand the need for unibyte-string-p, since we already have multibyte-string-p.