unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* guile-1.8 question
@ 2009-10-14  7:02 Stanislav Ievlev
  2009-10-14  7:05 ` Stanislav Ievlev
  0 siblings, 1 reply; 5+ messages in thread
From: Stanislav Ievlev @ 2009-10-14  7:02 UTC (permalink / raw)
  To: guile-devel

Greetings!

There are several functions exists to convert file descriptor into guile port:
* scm_fdes_to_ports - search for fdes in already opened ports
* scm_fdes_to_port - looks like internal function, not documented, but
exists in header files.
* scm_fdopen - looks like public function.

What is the difference between scm_fdes_to_port and scm_fdopen? What
function should I use?

Have you any plans to made this API simpler?

--
With best regards
Stanislav Ievlev.




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

* Re: guile-1.8 question
  2009-10-14  7:02 guile-1.8 question Stanislav Ievlev
@ 2009-10-14  7:05 ` Stanislav Ievlev
  2009-10-14  7:33   ` Stanislav Ievlev
  0 siblings, 1 reply; 5+ messages in thread
From: Stanislav Ievlev @ 2009-10-14  7:05 UTC (permalink / raw)
  To: guile-devel

As I understand you should mark scm_fdes_to_port as a deprecated and
don't use it in own code (e.g. in socket.c).


2009/10/14 Stanislav Ievlev <stanislav.ievlev@gmail.com>:
> Greetings!
>
> There are several functions exists to convert file descriptor into guile port:
> * scm_fdes_to_ports - search for fdes in already opened ports
> * scm_fdes_to_port - looks like internal function, not documented, but
> exists in header files.
> * scm_fdopen - looks like public function.
>
> What is the difference between scm_fdes_to_port and scm_fdopen? What
> function should I use?
>
> Have you any plans to made this API simpler?
>
> --
> With best regards
> Stanislav Ievlev.
>




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

* Re: guile-1.8 question
  2009-10-14  7:05 ` Stanislav Ievlev
@ 2009-10-14  7:33   ` Stanislav Ievlev
  2009-10-15  9:44     ` Andy Wingo
  0 siblings, 1 reply; 5+ messages in thread
From: Stanislav Ievlev @ 2009-10-14  7:33 UTC (permalink / raw)
  To: guile-devel

2009/10/14 Stanislav Ievlev <stanislav.ievlev@gmail.com>:
> As I understand you should mark scm_fdes_to_port as a deprecated and
> don't use it in own code (e.g. in socket.c).
Ooops, I'm wrong.
scm_fdes_to_port works is like "scm_C_fdopen", however function name
is not good ;)




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

* Re: guile-1.8 question
  2009-10-14  7:33   ` Stanislav Ievlev
@ 2009-10-15  9:44     ` Andy Wingo
  2009-10-15 15:18       ` Stanislav Ievlev
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Wingo @ 2009-10-15  9:44 UTC (permalink / raw)
  To: Stanislav Ievlev; +Cc: guile-devel

On Wed 14 Oct 2009 09:33, Stanislav Ievlev <stanislav.ievlev@gmail.com> writes:

> 2009/10/14 Stanislav Ievlev <stanislav.ievlev@gmail.com>:
>> As I understand you should mark scm_fdes_to_port as a deprecated and
>> don't use it in own code (e.g. in socket.c).
> Ooops, I'm wrong.
> scm_fdes_to_port works is like "scm_C_fdopen", however function name
> is not good ;)

The ports C interface is rather crufty, as you have found :) Do you have
any suggestions, or a patch? Keep in mind that we need to maintain
backwards compatibility with these interfaces.

Cheers,

Andy
-- 
http://wingolog.org/




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

* Re: guile-1.8 question
  2009-10-15  9:44     ` Andy Wingo
@ 2009-10-15 15:18       ` Stanislav Ievlev
  0 siblings, 0 replies; 5+ messages in thread
From: Stanislav Ievlev @ 2009-10-15 15:18 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

2009/10/15 Andy Wingo <wingo@pobox.com>:
> The ports C interface is rather crufty, as you have found :) Do you have
> any suggestions, or a patch? Keep in mind that we need to maintain
> backwards compatibility with these interfaces.

What do you think about documented additional function like this?
--
SCM
scm_c_fdopen(int fdes, const char* modes)
{
 return scm_i_fdes_to_port (fdes, scm_mode_bits (modes), SCM_BOOL_F);
}
--

You can also use in libguile source files scm_i_fdes_to_port  instead
of scm_i_fdes_to_port, and mark scm_fdes_to_port as a deprecated.




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

end of thread, other threads:[~2009-10-15 15:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-14  7:02 guile-1.8 question Stanislav Ievlev
2009-10-14  7:05 ` Stanislav Ievlev
2009-10-14  7:33   ` Stanislav Ievlev
2009-10-15  9:44     ` Andy Wingo
2009-10-15 15:18       ` Stanislav Ievlev

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