From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.user Subject: Re: scm_add_to_port_table replacement Date: Mon, 20 Jun 2016 15:14:52 +0200 Message-ID: <8737o8huib.fsf@pobox.com> References: <871tn4uyt9.fsf@zigzag.favinet> <87zj9s2ev2.fsf@gnu.org> 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 1466428544 11747 80.91.229.3 (20 Jun 2016 13:15:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2016 13:15:44 +0000 (UTC) Cc: guile-user@gnu.org To: ttn@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Jun 20 15:15:36 2016 Return-path: Envelope-to: guile-user@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 1bEz39-00064t-0U for guile-user@m.gmane.org; Mon, 20 Jun 2016 15:15:35 +0200 Original-Received: from localhost ([::1]:43617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEz32-0000NT-Sj for guile-user@m.gmane.org; Mon, 20 Jun 2016 09:15:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEz2h-0000Lp-Ie for guile-user@gnu.org; Mon, 20 Jun 2016 09:15:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEz2d-0003zG-GH for guile-user@gnu.org; Mon, 20 Jun 2016 09:15:07 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:57565 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEz2d-0003zA-CS; Mon, 20 Jun 2016 09:15:03 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 0A43E22428; Mon, 20 Jun 2016 09:15:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=NKVb+Ue2cO8F de/MPO6rItFLy7w=; b=VTs/Tmi/gCIUgWcRKNPhqvZ1UI4R96lP3MpfP/X2Bs8T YUTeCfnbM9RvfSKkTzEe76fVBJVOBOF3HRZijksSWpRyQZpdvYbwOWGQ3Lyr0z0T loulNO7lu2RqgGOOwgRr7O0+1p7B3K9aLU7Fm1kzMuUbW2U2Q/V5heNj/idM6mU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=RGhBN/ YfD0Qd/cViIcTWwLroolpV3vFIoAbmW5btxNjQqMO8kcrw1i/1xYa+d/7WTPa2Om CVs7luIFM2sdbKjhrsEX6PMVtdxjpfChYRhHGv+5IftPsVZn2c1SQgIltHG6Dsx4 ETqe4BB0m6EYqU0H/slhVzmDBW7GizP1LdxK8= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id D2DF822425; Mon, 20 Jun 2016 09:15:02 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 0631522423; Mon, 20 Jun 2016 09:14:59 -0400 (EDT) In-Reply-To: <87zj9s2ev2.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 09 Jan 2015 15:44:17 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: FDFBE442-36E8-11E6-B8D3-C1836462E9F6-02397024!pb-sasl1.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.108.66 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:12663 Archived-At: Hi Thien-Thi, On Fri 09 Jan 2015 15:44, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Thien-Thi Nguyen skribis: > >> One of the last remaining =E2=80=98GUILE_WARN_DEPRECATED=3Ddetailed=E2= =80=99 >> nits is =E2=80=98scm_add_to_port_table=E2=80=99: >> >> libpq.c:203:3: warning: =E2=80=98scm_add_to_port_table=E2=80=99 is depr= ecated >> (declared at /home/ttn/eep/include/guile/2.0/libguile/ports.h:344) >> [-Wdeprecated-declarations] >> >> Where can i find documentation on its replacement, please? > > The =E2=80=98lob_mklobport=E2=80=99 function in libpq.c should be changed= to use > something like: > > SCM port; > scm_t_port *c_port; > const unsigned long mode_bits =3D SCM_OPN | SCM_RDNG | SCM_WRTNG; > > port =3D scm_new_port_table_entry (session_record_port_type); > c_port =3D SCM_PTAB_ENTRY (port); > > SCM_SET_CELL_TYPE (port, session_record_port_type | mode_bits); > > This has been supported in both 1.8 and 2.0 (perhaps 1.6 as well.) I notice that you have a port implementation in C. I have bad news, and that is that this part of libguile is changing again in the 2.0->2.2 transition :/ But fortunately it's documented now. See: https://www.gnu.org/software/guile/docs/master/guile.html/Input-and-Outpu= t.html#Input-and-Output Regards, Andy