From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#23487: 25.0.93; Modules: add functionality to create and copy unibyte strings Date: Mon, 09 May 2016 18:06:41 +0000 Message-ID: References: <83r3dbcfju.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11412a884907c705326cace9 X-Trace: ger.gmane.org 1462817242 22250 80.91.229.3 (9 May 2016 18:07:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 May 2016 18:07:22 +0000 (UTC) Cc: 23487@debbugs.gnu.org To: Eli Zaretskii , dancol@dancol.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 09 20:07:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1azpaK-0004BT-PL for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 May 2016 20:07:13 +0200 Original-Received: from localhost ([::1]:42773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azpaJ-00056k-NB for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 May 2016 14:07:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azpaF-00053K-Db for bug-gnu-emacs@gnu.org; Mon, 09 May 2016 14:07:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azpaA-0000dc-AO for bug-gnu-emacs@gnu.org; Mon, 09 May 2016 14:07:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azpaA-0000dP-6e for bug-gnu-emacs@gnu.org; Mon, 09 May 2016 14:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1azpa9-00008e-Uz for bug-gnu-emacs@gnu.org; Mon, 09 May 2016 14:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 May 2016 18:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23487 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23487-submit@debbugs.gnu.org id=B23487.1462817220523 (code B ref 23487); Mon, 09 May 2016 18:07:01 +0000 Original-Received: (at 23487) by debbugs.gnu.org; 9 May 2016 18:07:00 +0000 Original-Received: from localhost ([127.0.0.1]:44667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1azpa8-00008N-CT for submit@debbugs.gnu.org; Mon, 09 May 2016 14:07:00 -0400 Original-Received: from mail-lf0-f52.google.com ([209.85.215.52]:35976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1azpa6-00007z-1x for 23487@debbugs.gnu.org; Mon, 09 May 2016 14:06:58 -0400 Original-Received: by mail-lf0-f52.google.com with SMTP id u64so209801849lff.3 for <23487@debbugs.gnu.org>; Mon, 09 May 2016 11:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bJ2yK4zjUmp3vRoiC9ma0ShmYmXOvk1EB97tmD621Oc=; b=hiKhmv8C68+KFs02ANKJ+oAFo4hjQGtYOIyCHSXG4vhf1V9A+QvLpptDqF7hzpW9gW BsRn8kZMIpnKkOK+bQOjI9f055kixw6aCJ86bsZ/O0nvRKZ0KAlRv1qkCgFHNZdDRUHb Z6guG2I5x4FF+n3DBsj6V+axXnKB3dvO9PkSeErXQxeUNqwl0MJ8bk8+W0vEICjIAXPT lplADwlg/OzIJjPwDfuvxzbRn/HAwJHR6KdVm6mXSLz3njLI/Cy0jWAWtwLL0BZgCsRo MLIEsTMfdBZp63fPS0dbw7sWZ7yOSA+MQ1kS3P3PFVN6oy9eXCNDSghI0WUIoYh8f/tr tZLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bJ2yK4zjUmp3vRoiC9ma0ShmYmXOvk1EB97tmD621Oc=; b=kMIpTLK2W6i5qoStfC+IC+VE5Kg23mI+ccANjmwFpxR636ldpRGbjaGE+c5bBYUopE U2Mh/UZblEr7eeWOaq0QK4b5ASTu+2oAgZ084W/cQkMJpXEgLWxdpbDWBgCjCFGeJnti qNaP+29+PQvV/Xjpci4fBKLC4b6DY1+HnnjS/jw4jsN57I5qzOCMk7ntSbZ27ZtesV3Z 2vqYH6eYcaey/LzfKHG3uYR/aJGFonTd4pwWguWm35d8YXX/Eb4j/3qlJ/cpMrpFVmOw os2SnSSKTPFS75gQRzId+fhFpZvPbwO/BGypdpUajOBQlQU6zeQIliGDyryrSg8GAqK6 TPqg== X-Gm-Message-State: AOPr4FXiw1FqmjGZ9oL7T2nv2ELgLOngfenCnDEONkwn74w6tN3nifL/e3Qc85vwU2Vi4W940Do9X9yVipxI9A== X-Received: by 10.25.210.202 with SMTP id j193mr15130016lfg.139.1462817211874; Mon, 09 May 2016 11:06:51 -0700 (PDT) In-Reply-To: <83r3dbcfju.fsf@gnu.org> 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:118031 Archived-At: --001a11412a884907c705326cace9 Content-Type: text/plain; charset=UTF-8 Eli Zaretskii schrieb am Mo., 9. Mai 2016 um 19:22 Uhr: > > From: Philipp Stephani > > Date: Mon, 09 May 2016 18:45:19 +0200 > > > > Currently creating unibyte strings with the C module API is rather > > convoluted: one has to create a list with the individual bytes and then > > call `unibyte-string', requiring lots of memory allocations. Given that > > creating a unibyte string is more fundamental than creating a multibyte > > string, I propose adding functions to create and extract unibyte strings > > that exactly mirror the existing support for multibyte strings. > > Can you explain why you need to create unibyte strings, or describe a > use case where this would be required? > I don't have a concrete use case per se, but the API feels incomplete without this functionality, especially given that creation of multibyte strings is supported and uses unibyte strings under the hood. I'll let +Daniel Colascione chime in for his opinion. --001a11412a884907c705326cace9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Mo., 9. Mai 2016 um 19:22=C2=A0Uhr:
p.stephani2@gmail.com>
> Date: Mon, 09 May 2016 18:45:19 +0200
>
> Currently creating unibyte strings with the C module API is rather
> convoluted: one has to create a list with the individual bytes and the= n
> call `unibyte-string', requiring lots of memory allocations.=C2=A0= Given that
> creating a unibyte string is more fundamental than creating a multibyt= e
> string, I propose adding functions to create and extract unibyte strin= gs
> that exactly mirror the existing support for multibyte strings.

Can you explain why you need to create unibyte strings, or describe a
use case where this would be required?

= I don't have a concrete use case per se, but the API feels incomplete w= ithout this functionality, especially given that creation of multibyte stri= ngs is supported and uses unibyte strings under the hood.

I'll let +Daniel Colascione=C2=A0chime in for= his opinion.=C2=A0
--001a11412a884907c705326cace9--