[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scm_add_to_port_table replacement
From: |
Andy Wingo |
Subject: |
Re: scm_add_to_port_table replacement |
Date: |
Mon, 20 Jun 2016 15:14:52 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Hi Thien-Thi,
On Fri 09 Jan 2015 15:44, address@hidden (Ludovic Courtès) writes:
> Thien-Thi Nguyen <address@hidden> skribis:
>
>> One of the last remaining ‘GUILE_WARN_DEPRECATED=detailed’
>> nits is ‘scm_add_to_port_table’:
>>
>> libpq.c:203:3: warning: ‘scm_add_to_port_table’ is deprecated
>> (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 ‘lob_mklobport’ function in libpq.c should be changed to use
> something like:
>
> SCM port;
> scm_t_port *c_port;
> const unsigned long mode_bits = SCM_OPN | SCM_RDNG | SCM_WRTNG;
>
> port = scm_new_port_table_entry (session_record_port_type);
> c_port = 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-Output.html#Input-and-Output
Regards,
Andy
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: scm_add_to_port_table replacement,
Andy Wingo <=