guile-user
[Top][All Lists]
Advanced

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

Re: problem becouse scm_tc7_contin is not defined


From: P Pareit
Subject: Re: problem becouse scm_tc7_contin is not defined
Date: Tue, 10 Sep 2002 13:57:22 +0200
User-agent: KMail/1.4.2

On Tuesday 10 September 2002 12:32 pm, Marius Vollmer wrote:
>
> P Pareit <address@hidden> writes:
> > By doing a grep on scm_tc7_contin in the source tree of guile I
> > found out that scm_tc7_contin is no longer supported and I have to
> > use SMOB continuation for rootcont instead.
>
> Scwm is digging into the innards of Guile, and we don't really support
> code like scm_internal_cwdr_no_unwind.  Scm_internal_cwdr_no_unwind is
> essentially a copy of Guile's scm_internal_cwdr with some bits
> removed.  There is a reason why it is called scm_*internal*_cwdr. ;-)
>
> However, scwm has probably a real need for
> scm_internal_cwdr_no_unwind, and we do want to support something like
> it officially in the future so that scwm does not need to provide its
> own hack.
>
> You might consider fixing scwm's hack like this
>
>   SCM
>   scm_internal_cwdr_no_unwind (scm_catch_body_t body, void *body_data,
>                                scm_catch_handler_t handler, void
> *handler_data, SCM_STACKITEM *stack_start)
>   {
>     SCM answer, old_winds;
>     old_winds = scm_dynwinds;
>     scm_dynwinds = SCM_EOL;
>
>     answer = scm_internal_cwdr (body, body_data, handler, handler_data,
>                                 stack_start); /* changed to stack_start */
>
>     scm_dynwinds = old_winds;
>     return answer;
>   }

Tried and failed, it does compile but I get a segment fault at startup and 
scm_internal_cwdr_no_unwind shows up in the backtrace. So I think this is the 
problem.

>
> This will _only_ work when HANDLER does not do a non-local exit (via
> longjmp, or similar).  If you want to support that (which I
> recommend), you need to defer running HANDLER (with the same trick
> that scm_internal_cwdr uses) until scm_dynwinds has been restored.
>
> The above code should be more resilient against changes to the
> internals of Guile, but it is still a hack.  We have a proposal to fix
> this for real.  See workbook/extension/dynamic-roots.text in CVS.
>
> You might also try to just scm_internal_cwdr instead of
> scm_internal_cwdr_no_unwind.  That should work as well, but at a
> slight performance loss.
>
> Could you bring this up with the scwm developers so that we might find
> a solution that makes everyone happy?

Yes, will do. I'm afraid that for the moment guile-1.4.* will still be used 
and development is not very active for the moment. I hope that with the way 
guile is going at the moment, scwm will soon follow.

pieter;





reply via email to

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