This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: MySQL and guile


Hal Roberts <hroberts@alumni.princeton.edu> writes:

> It could be that I'm mucking up the gh_list call.  There was no
> documented gh_null() function, so I assumed that gh_list(SCM_EOL) was
> what I was supposed to use instead.	

Aha!

Sorry to spoil the fun, but you indeed mucked up the gh_list call.
SCM_EOL *is* the canonical empty list, so you should be doing

    gh_make_vector (gh_int2scm (x), SCM_EOL);

gh_list is a var_args functions, as you might know, but the end of the
arguments is not marked by SCM_EOL (which is a very valid thing to
include in a list), but by SCM_UNDEFINED.  So

    SCM_EOL == gh_list (SCM_UNDEFINED)

cheers,
 Marius