guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 19/86: Remove public SCM_VALIDATE_NIM


From: Andy Wingo
Subject: [Guile-commits] 19/86: Remove public SCM_VALIDATE_NIM
Date: Wed, 20 Jun 2018 14:09:30 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit eb5e1b8d5f9cbe2313a04959643b4ee1b0464be8
Author: Andy Wingo <address@hidden>
Date:   Sun Jun 17 22:42:20 2018 +0200

    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.
---
 libguile/random.c   | 1 -
 libguile/srcprop.c  | 3 +++
 libguile/validate.h | 2 --
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libguile/random.c b/libguile/random.c
index 75eb53b..13af962 100644
--- a/libguile/random.c
+++ b/libguile/random.c
@@ -411,7 +411,6 @@ SCM_DEFINE (scm_random, "random", 1, 1, 0,
 #error "Cannot deal with this platform's scm_t_bits size"
 #endif
     }
-  SCM_VALIDATE_NIM (1, n);
   if (SCM_REALP (n))
     return scm_from_double (SCM_REAL_VALUE (n)
                            * scm_c_uniform01 (SCM_RSTATE (state)));
diff --git a/libguile/srcprop.c b/libguile/srcprop.c
index 118c9da..fc819f7 100644
--- a/libguile/srcprop.c
+++ b/libguile/srcprop.c
@@ -196,6 +196,9 @@ SCM_DEFINE (scm_source_properties, "source-properties", 1, 
0, 0,
 }
 #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
    and try to make a srcprops-object...? */
 SCM_DEFINE (scm_set_source_properties_x, "set-source-properties!", 2, 0, 0,
diff --git a/libguile/validate.h b/libguile/validate.h
index cb15622..386a219 100644
--- a/libguile/validate.h
+++ b/libguile/validate.h
@@ -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) \
   do { \
     SCM_ASSERT_TYPE (scm_is_bool (flag), flag, pos, FUNC_NAME, "boolean"); \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]