guile-user
[Top][All Lists]
Advanced

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

Re: leaf environments vs eval environments?


From: Neil Jerram
Subject: Re: leaf environments vs eval environments?
Date: 22 Jun 2001 15:29:15 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

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

    Lars> Hmm, then I'll have to ask...

    Lars> A C++ class contains a script string, and when it is going
    Lars> to be run I want to create an environment where "this" is a
    Lars> smob for the current class, and then evaluate the script in
    Lars> that environment.

    Lars> I figured I would define "this" to the smob in a leaf
    Lars> environment, and use that as the local part when creating an
    Lars> eval environment (haven't figured out what to use as the
    Lars> import env yet - maybe the one returned by
    Lars> scm_interaction_environment()?), and feed that env to the
    Lars> eval function.

Sounds entirely reasonable, ...

    Lars> If this doesn't work, what is the recommended method for
    Lars> doing what I'm trying to do?  A static/global this-binding
    Lars> isn't an option - it must be local to the evaluation.

... but I'm afraid I don't know how you should do this.  Hopefully
someone else will have the answer later.

        Neil




reply via email to

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