1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 21:10:27 +02:00

Remove public SCM_VALIDATE_NIM

* libguile/random.c (scm_random): Remove needless use of
  SCM_VALIDATE_NIM.
* libguile/srcprop.c (SCM_VALIDATE_NIM): Move definition here, as this
  file is its only use.
* libguile/validate.h (SCM_VALIDATE_NIM): Remove.  This was public but
  unlikely to be used in the wild.
This commit is contained in:
Andy Wingo 2018-06-17 22:42:20 +02:00
parent 82d5662887
commit eb5e1b8d5f
3 changed files with 3 additions and 3 deletions

View file

@ -411,7 +411,6 @@ SCM_DEFINE (scm_random, "random", 1, 1, 0,
#error "Cannot deal with this platform's scm_t_bits size" #error "Cannot deal with this platform's scm_t_bits size"
#endif #endif
} }
SCM_VALIDATE_NIM (1, n);
if (SCM_REALP (n)) if (SCM_REALP (n))
return scm_from_double (SCM_REAL_VALUE (n) return scm_from_double (SCM_REAL_VALUE (n)
* scm_c_uniform01 (SCM_RSTATE (state))); * scm_c_uniform01 (SCM_RSTATE (state)));

View file

@ -196,6 +196,9 @@ SCM_DEFINE (scm_source_properties, "source-properties", 1, 0, 0,
} }
#undef FUNC_NAME #undef FUNC_NAME
#define SCM_VALIDATE_NIM(pos, scm) \
SCM_MAKE_VALIDATE_MSG (pos, scm, NIMP, "non-immediate")
/* Perhaps this procedure should look through an alist /* Perhaps this procedure should look through an alist
and try to make a srcprops-object...? */ and try to make a srcprops-object...? */
SCM_DEFINE (scm_set_source_properties_x, "set-source-properties!", 2, 0, 0, SCM_DEFINE (scm_set_source_properties_x, "set-source-properties!", 2, 0, 0,

View file

@ -31,8 +31,6 @@
#define SCM_VALIDATE_NIM(pos, scm) SCM_MAKE_VALIDATE_MSG (pos, scm, NIMP, "non-immediate")
#define SCM_VALIDATE_BOOL(pos, flag) \ #define SCM_VALIDATE_BOOL(pos, flag) \
do { \ do { \
SCM_ASSERT_TYPE (scm_is_bool (flag), flag, pos, FUNC_NAME, "boolean"); \ SCM_ASSERT_TYPE (scm_is_bool (flag), flag, pos, FUNC_NAME, "boolean"); \