From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.devel Subject: make-c-struct and pointer->string Date: Tue, 26 Mar 2019 10:14:47 -0300 Message-ID: <20190326101419.340081fc@capac> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/9r+qFuAe.IhF8phQInZfn2U"; protocol="application/pgp-signature" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="155322"; mail-complaints-to="usenet@blaine.gmane.org" To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Mar 26 14:19:07 2019 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8lyp-000e9f-Uu for guile-devel@m.gmane.org; Tue, 26 Mar 2019 14:19:04 +0100 Original-Received: from localhost ([127.0.0.1]:59775 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8lyo-0005Oc-Ow for guile-devel@m.gmane.org; Tue, 26 Mar 2019 09:19:02 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8lyS-0005IE-10 for guile-devel@gnu.org; Tue, 26 Mar 2019 09:18:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8luv-0002tA-FA for guile-devel@gnu.org; Tue, 26 Mar 2019 09:15:02 -0400 Original-Received: from maximusconfessor.all2all.org ([79.99.200.102]:43122) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h8luu-0002qq-R5 for guile-devel@gnu.org; Tue, 26 Mar 2019 09:15:01 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by maximusconfessor.all2all.org (Postfix) with ESMTP id 9EF791BE0111 for ; Tue, 26 Mar 2019 14:14:53 +0100 (CET) Original-Received: from maximusconfessor.all2all.org ([127.0.0.1]) by localhost (maximusconfessor.all2all.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K9uNU-mR2r3O for ; Tue, 26 Mar 2019 14:14:53 +0100 (CET) Original-Received: from capac (unknown [179.210.16.193]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id EFE6D1BE0109 for ; Tue, 26 Mar 2019 14:14:52 +0100 (CET) X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 79.99.200.102 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.lisp.guile.devel:19863 Archived-At: --Sig_/9r+qFuAe.IhF8phQInZfn2U Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, guile 2.2.4.1-cdb19 ,use (system foreign) ;; this fails scheme@(guile-user)> (make-c-struct (list '* '*) (list (string->pointer "he= llo ") (string->pointer "there!"))) $16 =3D # scheme@(guile-user)> (parse-c-struct $16 (list '* '*)) $17 =3D (# #) scheme@(guile-user)> (map pointer->string $17) $18 =3D ("?g?=D5=A3U" "`!?=D5=A3U") ;; but this works scheme@(guile-user)> (map pointer->string (parse-c-struct (make-c-struct (l= ist '* '*) (list (string->pointer "hello ") (string->pointer "there!"))) (l= ist '* '*))) $19 =3D ("hello " "there!") David --Sig_/9r+qFuAe.IhF8phQInZfn2U Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEhCJlRZtBM3furJHe83T9k6MFetcFAlyaJccACgkQ83T9k6MF etdOGwf+P9l3IUGg2B7fOSEdHxwVnR58otayVUfciDy2eg6Yoenz/kZ1RrfNdQv1 f1m8AxpAQQ/LaBGB13bJqTsKof2j4Udb60tmLGo9zmo1c5VCV9o8/8KkpxzsEE0U JIDD1xV1ex/F5LDvs85eDXH+JLqCXxabXkZ8SBhCO1hbg5V2kN84ZCIs+bAt4sXr LODBddaMXR0+6pRxrdLwrK0A1FF/PP3IekP98FxaVS4FDZmWMk6U4wkxP3gy4QvF 2mqvDNtcqxsLZ3tuyNyFv1uwN57l8eJjXW/B+WNJQFV1mbnr7miUYtkh6mJvMlud sETA88Oce/ZFP1JO9lq/DGDz+UkorQ== =5mMR -----END PGP SIGNATURE----- --Sig_/9r+qFuAe.IhF8phQInZfn2U--