Thien-Thi Nguyen <t...@gnu.org> 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