[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] #<invalid forwarded object> using FFI callback

Subject: Re: [Chicken-users] #<invalid forwarded object> using FFI callback
Date: Sun, 8 Dec 2013 10:36:41 -0701

I wish I could take that advice, but getpwent_r is not available on
OpenBSD.  I do take care to call it sequentially, and the call is
not being made from, say, multiple Scheme threads.  Invocation of
each loop in the (let loop ...) would have to be reordered by the
compiler (I don't believe that is permitted, but would result in
out-of-order records at worst, no?) or the runtime would have to make
a call to getpwent while I'm doing my loop, and I find no reference to
getpwent in Chicken's source code.

I'd like to use a pattern like this in multiple places: anywhere I
construct a record from C and want to pass it to Scheme, not just
reading the /etc/passwd file.  I could rewrite this to read records
from an arbitrary file and suspect I'd still be getting this error.

Thank you,


On Sun, Dec 08, 2013 at 12:21:24PM -0500, John Cowan wrote:
> scripsit:
> > I'm trying to read /etc/passwd using getpwent(3) and store each
> > record returned in a scheme list.  
> The very first thing I would try is switching to getpwent_r(), because
> the fact that getpwent() uses a static buffer internally may well be
> confusing Chicken.  
> -- 
> John Cowan  <address@hidden>
>         Raffiniert ist der Herrgott, aber boshaft ist er nicht.
>                 --Albert Einstein
> _______________________________________________
> Chicken-users mailing list
> address@hidden

my personal website:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]