-size_t
-scm_prepare_fluids (size_t n, SCM *fluids, SCM *values)
-{
- size_t j = n;
-
- /* Ensure that there are no duplicates in the fluids set -- an N^2 operation,
- but N will usually be small, so perhaps that's OK. */
- while (j--)
- {
- size_t i;
-
- if (SCM_UNLIKELY (!IS_FLUID (fluids[j])))
- scm_wrong_type_arg ("with-fluids", 0, fluids[j]);
-
- for (i = 0; i < j; i++)
- if (scm_is_eq (fluids[i], fluids[j]))
- {
- values[i] = values[j]; /* later bindings win */
- n--;
- break;
- }
- }
-
- return n;
-}
-