[CM] Safe functions

Kjetil Matheussen k.s.matheussen at gmail.com
Wed Jan 20 02:39:20 PST 2021

On Tue, Jan 19, 2021 at 5:37 PM <bil at ccrma.stanford.edu> wrote:
> A safe function does not push anything on the s7 stack, and treats the
> arg list
> passed to it as immutable and temporary (that is, it just grabs the
> arguments from
> the list).

Hi Bill,
In Radium, all external functions are created with
"s7_define_unsafe_typed_function". Most of the functions could
probably be created with "s7_define_safe_typed_function" instead, but
since many of the functions calls s7_eval I just use unsafe
everywhere, for simplicity. However, none of the functions modifies
the arg list. I think this would be a common situation. Perhaps it
would make sense to create "s7_define_unsafe_stack_safe_args*"
functions in s7?

More information about the Cmdist mailing list