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

Move SCM_ARG1, etc definitions to error.h

* libguile/__scm.h:
* libguile/error.h (SCM_ARGn, SCM_ARG1, SCM_ARG2, SCM_ARG3, SCM_ARG4)
  (SCM_ARG5 SCM_ARG6 SCM_ARG7): Move here.
This commit is contained in:
Andy Wingo 2018-06-20 15:14:05 +02:00
parent 716d9aaf32
commit 6e51f89d01
2 changed files with 22 additions and 22 deletions

View file

@ -321,28 +321,6 @@ typedef long SCM_STACKITEM;
#define SCM_STACK_PTR(ptr) ((SCM_STACKITEM *) (void *) (ptr))
#ifndef SCM_MAGIC_SNARFER
/* Let these macros pass through if
we are snarfing; thus we can tell the
difference between the use of an actual
number vs. the use of one of these macros --
actual numbers in SCM_VALIDATE_* and SCM_ASSERT
constructs must match the formal argument name,
but using SCM_ARG* avoids the test */
#define SCM_ARGn 0
#define SCM_ARG1 1
#define SCM_ARG2 2
#define SCM_ARG3 3
#define SCM_ARG4 4
#define SCM_ARG5 5
#define SCM_ARG6 6
#define SCM_ARG7 7
#endif /* SCM_MAGIC_SNARFER */
/* Handling thread-local storage (TLS). */
#ifdef SCM_HAVE_THREAD_STORAGE_CLASS

View file

@ -74,6 +74,28 @@ SCM_INTERNAL void scm_init_error (void);
#ifndef SCM_MAGIC_SNARFER
/* Let these macros pass through if
we are snarfing; thus we can tell the
difference between the use of an actual
number vs. the use of one of these macros --
actual numbers in SCM_VALIDATE_* and SCM_ASSERT
constructs must match the formal argument name,
but using SCM_ARG* avoids the test */
#define SCM_ARGn 0
#define SCM_ARG1 1
#define SCM_ARG2 2
#define SCM_ARG3 3
#define SCM_ARG4 4
#define SCM_ARG5 5
#define SCM_ARG6 6
#define SCM_ARG7 7
#endif /* SCM_MAGIC_SNARFER */
#define SCM_MAKE_VALIDATE(pos, var, pred) \
do { \
SCM_ASSERT_TYPE (SCM_ ## pred (var), var, pos, FUNC_NAME, #pred); \