<div dir="ltr">Hi Chris, super. Feel free to publish it when it's going.<div><div><br></div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Is it also possible to accomplish the same directly from a
      c-lambda that returns a scheme-object?<br></div></div></blockquote><div><br></div><div>Yes, however then for stability you need to sugar *all* Scheme object allocations you do in C with heap overflow handling logics.</div>

<div><br></div><div>Also a route would be you made a c-define that you have a C enumeration loop that reports to and the invoked Scheme code does the allocation. For stability you'd need to ensure other threads don't take over execution and rewind another C frame, and that you do by stopping Gambit's scheduler, and also if there'd be a heap overflow or other exception, that needs to be handled in such a way that your C enumeration loop's stack frame is rewound properly, so unless needed you don't want to take this route.</div>

<div><br></div><div>So I'd say as long as you feel it's viable to go with the form you are with now, that is the best option.</div><div><br></div></div></div></div></div></div>