guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scm_add_to_port_table replacement


From: Ludovic Courtès
Subject: Re: scm_add_to_port_table replacement
Date: Fri, 09 Jan 2015 15:44:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

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.)

HTH,
Ludo’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]