unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* optionals in C procedures
@ 2010-04-04 15:15 Zeeshan Ali (Khattak)
  2010-04-05 15:18 ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: Zeeshan Ali (Khattak) @ 2010-04-04 15:15 UTC (permalink / raw)
  To: Guile User

Hi,
  As soon as I updated my guile installation from git master, the test
app in my guile-gir project started to fail. On a bit of
investigation, I found out that the problem is in this code:

<code>
static SCM
scm_g_irepository_require (SCM scm_repository,
                                                 SCM scm_namespace,
                                                 SCM scm_version,
                                                 SCM scm_flags)
{
        const char *version;

        if (SCM_UNBNDP (scm_version))
                version = NULL;
        else
                version = scm_to_locale_string (scm_version);
...
}

        scm_c_define_gsubr ("g-irepository-require", 2, 2, 0,
scm_g_irepository_require);


</code>

   Whats happening is that my scheme code is not passing any value to
the optional argument version and guile is not making sure that the
argument is unbound. Is this a regression or some intentional change?

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124




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

* Re: optionals in C procedures
  2010-04-04 15:15 optionals in C procedures Zeeshan Ali (Khattak)
@ 2010-04-05 15:18 ` Andy Wingo
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2010-04-05 15:18 UTC (permalink / raw)
  To: Zeeshan Ali (Khattak); +Cc: Guile User

Hi,

On Sun 04 Apr 2010 17:15, "Zeeshan Ali (Khattak)" <zeenix@gmail.com> writes:

> <code>
> static SCM
> scm_g_irepository_require (SCM scm_repository,
>                                                  SCM scm_namespace,
>                                                  SCM scm_version,
>                                                  SCM scm_flags)
> {
>         const char *version;
>
>         if (SCM_UNBNDP (scm_version))
>                 version = NULL;
>         else
>                 version = scm_to_locale_string (scm_version);
> ...
> }
>
>         scm_c_define_gsubr ("g-irepository-require", 2, 2, 0,
> scm_g_irepository_require);
>
>
> </code>
>
>    Whats happening is that my scheme code is not passing any value to
> the optional argument version and guile is not making sure that the
> argument is unbound. Is this a regression or some intentional change?

I think you might need to make clean && make, in Guile and in your
project. (The actual value for SCM_UNDEFINED changed, and I have seen
cases in which automake doesn't get the deps right. This sort of thing
won't happen after 2.0.)

Andy
-- 
http://wingolog.org/




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

end of thread, other threads:[~2010-04-05 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-04 15:15 optionals in C procedures Zeeshan Ali (Khattak)
2010-04-05 15:18 ` 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).