From: P P. <pie...@pl...> - 2002-09-10 13:14:45
|
---------- Forwarded Message ---------- Subject: Re: problem becouse scm_tc7_contin is not defined Date: 09 Sep 2002 20:43:12 +0200 From: Marius Vollmer <mv...@za...> To: P Pareit <pie...@pl...> Cc: gui...@gn... P Pareit <pie...@pl...> 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 =3D scm_dynwinds; scm_dynwinds =3D SCM_EOL; answer =3D scm_internal_cwdr (body, body_data, handler, handler_data, stack_stack); scm_dynwinds =3D old_winds; return answer; } 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? -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 ------------------------------------------------------- |