* Creating New Scope
@ 2006-10-31 19:54 Volkan YAZICI
2006-10-31 21:43 ` Neil Jerram
0 siblings, 1 reply; 3+ messages in thread
From: Volkan YAZICI @ 2006-10-31 19:54 UTC (permalink / raw)
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.
Regards.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Creating New Scope
2006-10-31 19:54 Creating New Scope Volkan YAZICI
@ 2006-10-31 21:43 ` Neil Jerram
2006-10-31 22:05 ` Volkan YAZICI
0 siblings, 1 reply; 3+ messages in thread
From: Neil Jerram @ 2006-10-31 21:43 UTC (permalink / raw)
Cc: guile-user
Volkan YAZICI <yazicivo@ttnet.net.tr> 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
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Creating New Scope
2006-10-31 21:43 ` Neil Jerram
@ 2006-10-31 22:05 ` Volkan YAZICI
0 siblings, 0 replies; 3+ messages in thread
From: Volkan YAZICI @ 2006-10-31 22:05 UTC (permalink / raw)
Cc: guile-user
On Oct 31 09:43, Neil Jerram wrote:
> 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 (")"))));
Yeah, this is exactly what I want to do but the problem is, after "(let
" I've some SCM values that I want to define in the inner scope. And the
problem is I don't have an idea about how can I turn them into suitable
string forms to place in the above scm_from_locale_string(...) string.
Regards.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-10-31 22:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-31 19:54 Creating New Scope Volkan YAZICI
2006-10-31 21:43 ` Neil Jerram
2006-10-31 22:05 ` Volkan YAZICI
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).