1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

scm_wta_* procedures replace SCM_WTA_* macros

* libguile/__scm.h: Move all the SCM_WTA and SCM_GASSERT macros out of
  here.  Also remove the scm_call_generic declarations.
* libguile/deprecated.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1):
  (SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_N): Deprecate.  See below for
  their replacements.
  (SCM_GASSERT0, SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn): Deprecate
  these too.
  (SCM_WTA_DISPATCH_1_SUBR): Deprecate this strange thing.
  (scm_call_generic_0, scm_call_generic_1, scm_call_generic_2):
  (scm_call_generic_3, scm_apply_generic): Remove, indicating their
  replacements.

* libguile/print.c (iprin1):
* libguile/eq.c (scm_equal_p): Use scm_call_2 instead of
  scm_call_generic_2.

* libguile/goops.h:
* libguile/goops.c: Remove scm_{call,apply}_generic definitions.
  (scm_wta_dispatch_0, scm_wta_dispatch_1, scm_wta_dispatch_2):
  (scm_wta_dispatch_n): New procedures, replacing the SCM_WTA macros.

* libguile/numbers.c (scm_lcm):
* libguile/procs.c (scm_setter): Remove uses of SCM_GASSERT.

* libguile/numbers.c (scm_lcm):
* libguile/procs.c (scm_setter):
* libguile/vectors.c: Use the procedural scm_wta routines instead of the
  SCM_WTA macros.
This commit is contained in:
Andy Wingo 2011-05-15 15:18:18 +02:00
parent 6703caf726
commit fa075d40dc
9 changed files with 337 additions and 329 deletions

View file

@ -123,7 +123,7 @@ scm_vector_length (SCM v)
return scm_from_size_t (dim->ubnd - dim->lbnd + 1);
}
else
SCM_WTA_DISPATCH_1 (g_vector_length, v, 1, NULL);
return scm_wta_dispatch_1 (g_vector_length, v, 1, "vector-length");
}
size_t
@ -241,7 +241,8 @@ scm_c_vector_ref (SCM v, size_t k)
scm_wrong_type_arg_msg (NULL, 0, v, "non-uniform vector");
}
else
SCM_WTA_DISPATCH_2 (g_vector_ref, v, scm_from_size_t (k), 2, NULL);
return scm_wta_dispatch_2 (g_vector_ref, v, scm_from_size_t (k), 2,
"vector-ref");
}
SCM_GPROC (s_vector_set_x, "vector-set!", 3, 0, 0, scm_vector_set_x, g_vector_set_x);
@ -307,8 +308,10 @@ scm_c_vector_set_x (SCM v, size_t k, SCM obj)
else
{
if (SCM_UNPACK (g_vector_set_x))
scm_apply_generic (g_vector_set_x,
scm_list_3 (v, scm_from_size_t (k), obj));
scm_wta_dispatch_n (g_vector_set_x,
scm_list_3 (v, scm_from_size_t (k), obj),
0,
"vector-set!");
else
scm_wrong_type_arg_msg (NULL, 0, v, "vector");
}