[racket-dev] Embedding racket in vim
Looks good except one thing: you really wouldn't want to gc environment
(see MZ_GC_CHECK) before registering it with MZ_REGISTER_STATIC.
BTW are there any guarantees that MZ_REGISTER_STATIC doesn't trigger
garbage collection?
@@ -861,6 +865,12 @@
> scheme_set_stack_base(stack_base, 1);
> #endif
>
> +#ifndef TRAMPOLINED_MZVIM_STARTUP
> + /* in newer versions of precise GC the initial env has been created */
> + environment = scheme_basic_env();
> +#endif
> + MZ_GC_CHECK();
> +
> MZ_REGISTER_STATIC(environment);
> MZ_REGISTER_STATIC(curout);
> MZ_REGISTER_STATIC(curerr);
> @@ -869,10 +879,6 @@
> MZ_REGISTER_STATIC(exn_message);
> MZ_REGISTER_STATIC(vim_exn);
>
> -#ifndef TRAMPOLINED_MZVIM_STARTUP
> - /* in newer versions of precise GC the initial env has been created */
> - environment = scheme_basic_env();
> -#endif
> MZ_GC_CHECK();
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20121217/9b8a245d/attachment.html>