From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Add internal-only port structure; move iconv descriptors there Date: Sun, 31 Mar 2013 15:20:40 +0200 Message-ID: <874nfr3duf.fsf@gnu.org> References: <87vc9ij5z0.fsf@pobox.com> <87fw0l2yyk.fsf@gnu.org> <877gltxgrg.fsf_-_@tines.lan> <87y5e8stst.fsf@pobox.com> <87d2vdekws.fsf@tines.lan> <87d2uk62a0.fsf_-_@tines.lan> <87a9poin2d.fsf@pobox.com> <87zjxk57l6.fsf_-_@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1364736057 22686 80.91.229.3 (31 Mar 2013 13:20:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 31 Mar 2013 13:20:57 +0000 (UTC) Cc: Andy Wingo , guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Mar 31 15:21:24 2013 Return-path: Envelope-to: guile-devel@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 1UMICK-0005V9-97 for guile-devel@m.gmane.org; Sun, 31 Mar 2013 15:21:24 +0200 Original-Received: from localhost ([::1]:60463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMIBv-0001jE-OA for guile-devel@m.gmane.org; Sun, 31 Mar 2013 09:20:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMIBo-0001j6-Dn for guile-devel@gnu.org; Sun, 31 Mar 2013 09:20:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMIBm-0000Yb-QM for guile-devel@gnu.org; Sun, 31 Mar 2013 09:20:52 -0400 Original-Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=52030 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMIBm-0000Y5-JX for guile-devel@gnu.org; Sun, 31 Mar 2013 09:20:50 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id CF55A7A82; Sun, 31 Mar 2013 15:20:41 +0200 (CEST) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oqNqpCC3Og4p; Sun, 31 Mar 2013 15:20:41 +0200 (CEST) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 3557F6ED5; Sun, 31 Mar 2013 15:20:41 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 11 Germinal an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87zjxk57l6.fsf_-_@tines.lan> (Mark H. Weaver's message of "Sun, 31 Mar 2013 03:52:53 -0400") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2a01:e0b:1:123:ca0a:a9ff:fe03:271e X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16067 Archived-At: Mark H Weaver skribis: > I've come to the conclusion that it is not safe to modify 'scm_t_port' > in 2.0 at all; not even to change the member names. In brief, the > reason has to do with the C11 standard definition of "compatible types", > which ties into the strict aliasing rules. Section 6.2.7 of C11 spells > out what it means for two structures declared in separate translation > units to be compatible, and among other things their member names must > be the same. I can=E2=80=99t imagine how changing the *name* of a member could change something to the structure=E2=80=99s layout in practice. I would be in favor of keeping the names =E2=80=98internal=E2=80=99 and =E2= =80=98reserved=E2=80=99 from your previous patch, but if you=E2=80=99re really convinced that this member name thing has a practical effect, fine with me. > Is this a reasonable start? Any suggestions before I proceed? Looks good to me! > +#define scm_gc_typed_calloc(t) ((t *) scm_gc_calloc (sizeof (t), #t)) Not really convinced by this, but hey. Ideally, this would need to go in the manual too. > +typedef struct scm_t_port_internal > +{ > + /* input/output iconv conversion descriptors */ > + void *input_cd; > + void *output_cd; > +} scm_t_port_internal; Please define the struct tag and typedef separately. Also, I=E2=80=99d rem= ove =E2=80=98_t=E2=80=99 from the struct tag, as discussed before. Thanks for your patience & thoroughness! :-) Ludo=E2=80=99.