Volkan YAZICI <[EMAIL PROTECTED]> writes:

> Hi all,
>
> This may look a little bit similar to my previous question but, I
> couldn't figure out a solution and thought it'd be best to hear your
> opinions about the problem: How can I create a new [for instance (let
> ...)] scope within my C code? By using such a method, after the
> execution of the scope, I'll be sure that any definitions special to the
> scope will get freed. I hope, I managed to explain my question.

I'm not sure what you mean by a new scope in C code.  C code must
always obey C's rules, of course.

Perhaps you mean that the C code has some Scheme code that it wants to
eval, but that it doesn't want it to make any lasting bindings.

Then I guess you could do something like

  scm_eval_string (scm_string_append (scm_list_3
     (scm_from_locale_string ("(let () "),
      scm_from_locale_string (code_to_eval),
      scm_from_locale_string (")"))));

Does that help at all?

Regards,
     Neil



_______________________________________________
Guile-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-user

Reply via email to