unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* scm_add_to_port_table replacement
@ 2015-01-09  8:45 Thien-Thi Nguyen
  2015-01-09 14:44 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Thien-Thi Nguyen @ 2015-01-09  8:45 UTC (permalink / raw)
  To: guile-user

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

Guile-PG is currently undergoing the slog to Guile 2.x:

 http://git.sv.nongnu.org/cgit/guile-pg.git?h=p

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?

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: scm_add_to_port_table replacement
  2015-01-09  8:45 scm_add_to_port_table replacement Thien-Thi Nguyen
@ 2015-01-09 14:44 ` Ludovic Courtès
  2015-01-10  9:47   ` Thien-Thi Nguyen
  2016-06-20 13:14   ` Andy Wingo
  0 siblings, 2 replies; 4+ messages in thread
From: Ludovic Courtès @ 2015-01-09 14:44 UTC (permalink / raw)
  To: guile-user

Thien-Thi Nguyen <ttn@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’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: scm_add_to_port_table replacement
  2015-01-09 14:44 ` Ludovic Courtès
@ 2015-01-10  9:47   ` Thien-Thi Nguyen
  2016-06-20 13:14   ` Andy Wingo
  1 sibling, 0 replies; 4+ messages in thread
From: Thien-Thi Nguyen @ 2015-01-10  9:47 UTC (permalink / raw)
  To: guile-user

[-- Attachment #1: Type: text/plain, Size: 568 bytes --]

() ludo@gnu.org (Ludovic Courtès)
() Fri, 09 Jan 2015 15:44:17 +0100

   The ‘lob_mklobport’ function in libpq.c should be changed to
   use something like: [...].  This has been supported in both
   1.8 and 2.0 (perhaps 1.6 as well.)

Thanks.  I'll make those changes.  Guile-PG on Guile 2.x in
2015, If All Goes Well... :-D

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: scm_add_to_port_table replacement
  2015-01-09 14:44 ` Ludovic Courtès
  2015-01-10  9:47   ` Thien-Thi Nguyen
@ 2016-06-20 13:14   ` Andy Wingo
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2016-06-20 13:14 UTC (permalink / raw)
  To: ttn; +Cc: guile-user

Hi Thien-Thi,

On Fri 09 Jan 2015 15:44, ludo@gnu.org (Ludovic Courtès) writes:

> Thien-Thi Nguyen <ttn@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.)

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-20 13:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-09  8:45 scm_add_to_port_table replacement Thien-Thi Nguyen
2015-01-09 14:44 ` Ludovic Courtès
2015-01-10  9:47   ` Thien-Thi Nguyen
2016-06-20 13:14   ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).