SCM scm_for_each (SCM proc, SCM arg1, SCM args) { static scm_i_pthread_once_t once = SCM_I_PTHREAD_ONCE_INIT; scm_i_pthread_once (&once, init_for_each_var); return scm_apply_0 (scm_variable_ref (for_each_var), scm_cons (proc, scm_cons (arg1, args))); }
SCM scm_make_foreign_object_type (SCM name, SCM slot_names, scm_t_struct_finalize finalizer) { SCM type; static scm_i_pthread_once_t once = SCM_I_PTHREAD_ONCE_INIT; scm_i_pthread_once (&once, init_make_fobj_type_var); type = scm_call_2 (scm_variable_ref (make_fobj_type_var), name, slot_names); if (finalizer) SCM_SET_VTABLE_INSTANCE_FINALIZER (type, finalizer); return type; }