From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: extract_data_from_object considered dangerous Date: Sun, 22 Sep 2019 16:53:05 -0400 Message-ID: References: <83woe0p961.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="120032"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 22 23:27:06 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iC9Np-000V6R-V5 for ged-emacs-devel@m.gmane.org; Sun, 22 Sep 2019 23:27:06 +0200 Original-Received: from localhost ([::1]:50476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iC9No-0000Mr-Rj for ged-emacs-devel@m.gmane.org; Sun, 22 Sep 2019 17:27:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59981) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iC9ND-0000Mh-RJ for emacs-devel@gnu.org; Sun, 22 Sep 2019 17:26:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iC9NB-0004Rj-Tf for emacs-devel@gnu.org; Sun, 22 Sep 2019 17:26:26 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46575) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iC8qr-00028w-Tj; Sun, 22 Sep 2019 16:53:02 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 86E9110040C; Sun, 22 Sep 2019 16:52:59 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 449DD1003C9; Sun, 22 Sep 2019 16:52:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1569185578; bh=ARDRxHmIyzX6oe/dUwIlpoYn8FJLpCROjo19YuEt1cM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=XzvYl3/wUBXDIH4X6gqPgundOsWBeqfcFkibz29rzQpm5T/v2eCVpPJhrmb6C48lE UgFsQUXREDg4bIr3eIZAW/zEs/xg1tNIpa3Pru0eNvSe00iR2bBXKhfxqKOPmxuQdl ESBRKl9+DBVITvA9NI/ib8q8B6H6N4+c1qLDXHV8e0d9wnApm1yjfR62LUFUioIAW4 mUixwR7uEaKextqjU0LMKe458wLrHgc8hQW30PPfdhb8bhT7CdHr/r4fnQHj1viPJN Ua5dFEK5MlW84YFdahaLWjCXd91G9jHwDSzuW0srXmUJ6ScRsjYiPzeFuJB0KXz6VB TEqMOVaOJnAmg== Original-Received: from alfajor (76-10-182-129.dsl.teksavvy.com [76.10.182.129]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7CCDC120835; Sun, 22 Sep 2019 16:52:57 -0400 (EDT) In-Reply-To: <83woe0p961.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 22 Sep 2019 19:50:30 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:240251 Archived-At: > The original idea was to use the pointer right away, so that GC > couldn't happen. Indeed, I think that it might be the case that currently this problem is only hypothetical, but relying on "the GC probably can't happen now" is too fragile for my taste. > If we want to lift this restriction, I think the > function should return a Lisp object, not a char *. That's also my impression, but I was wondering is there was a good reason why it wasn't done this way in the first place. Stefan