[Top][All Lists]

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

Re: mutating C binding arguments?

From: Michael Livshin
Subject: Re: mutating C binding arguments?
Date: 03 Oct 2000 20:06:04 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (20 Minutes to Nikko)

"Lars J. Aas" <address@hidden> writes:

> How do I mutate an argument to a gsubr-bound function so I can
> emulate C++ pass-by-reference in a Guile binding?  Is it even
> possible for immediate types?

no.  the proper Scheme way to have multiple results from a function
is to use call-with-values & values.

they are not reflected in the C interface now.  perhaps they should

or you can just box your "mutable" arguments, i.e. wrap them in a
cons.  come to think of it, I recall that MzScheme has a special `box' 
datatype for such occasions.  perhaps we should have one too, if
there's demand.

One man's constant is another man's variable.
                -- Alan Perlis

reply via email to

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