mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
* __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call scm_wrong_type_arg instead. (SCM_WNA): Deprecated. * error.[ch] (scm_wta): Deprecated. * numbers.c (s_i_log): Minor comment fix. * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra, scm_make_shared_array, scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p): Don't use SCM_ASSERT to check for wrong-num-args or misc errors. * unif.c (scm_make_shared_array, scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x): Validate the rest argument (note: this is only done when guile is built with SCM_DEBUG_REST_ARGUMENT=1) (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x): Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS. * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
This commit is contained in:
parent
68baa7e7f8
commit
b3fcac341b
10 changed files with 140 additions and 85 deletions
|
@ -314,7 +314,8 @@ scm_misc_error (const char *subr, const char *message, SCM args)
|
|||
scm_error (scm_misc_error_key, subr, message, args, SCM_BOOL_F);
|
||||
}
|
||||
|
||||
/* implements the SCM_ASSERT interface. */
|
||||
#if (SCM_DEBUG_DEPRECATED == 0)
|
||||
|
||||
SCM
|
||||
scm_wta (SCM arg, const char *pos, const char *s_subr)
|
||||
{
|
||||
|
@ -350,16 +351,10 @@ scm_wta (SCM arg, const char *pos, const char *s_subr)
|
|||
scm_wrong_type_arg (s_subr, 7, arg);
|
||||
case SCM_WNA:
|
||||
scm_wrong_num_args (arg);
|
||||
|
||||
#if (SCM_DEBUG_DEPRECATED == 0)
|
||||
|
||||
case SCM_OUTOFRANGE:
|
||||
scm_out_of_range (s_subr, arg);
|
||||
case SCM_NALLOC:
|
||||
scm_memory_error (s_subr);
|
||||
|
||||
#endif /* SCM_DEBUG_DEPRECATED == 0 */
|
||||
|
||||
default:
|
||||
/* this shouldn't happen. */
|
||||
scm_misc_error (s_subr, "Unknown error", SCM_EOL);
|
||||
|
@ -368,6 +363,8 @@ scm_wta (SCM arg, const char *pos, const char *s_subr)
|
|||
return SCM_UNSPECIFIED;
|
||||
}
|
||||
|
||||
#endif /* SCM_DEBUG_DEPRECATED == 0 */
|
||||
|
||||
void
|
||||
scm_init_error ()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue