mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-02 23:50:47 +02:00
Inline scm_is_vector
* libguile/vectors.h (scm_is_vector): Define inline. (SCM_I_IS_VECTOR): Remove. * libguile/eval.c (env_tail): Use scm_is_vector. * libguile/vectors.c (scm_is_vector): Remove.
This commit is contained in:
parent
05e868892b
commit
7dfbb8bc4b
3 changed files with 7 additions and 9 deletions
|
@ -218,7 +218,7 @@ next_rib (SCM env)
|
|||
static SCM
|
||||
env_tail (SCM env)
|
||||
{
|
||||
while (SCM_I_IS_VECTOR (env))
|
||||
while (scm_is_vector (env))
|
||||
env = next_rib (env);
|
||||
return env;
|
||||
}
|
||||
|
|
|
@ -48,12 +48,6 @@
|
|||
} while (0)
|
||||
|
||||
|
||||
int
|
||||
scm_is_vector (SCM obj)
|
||||
{
|
||||
return SCM_I_IS_VECTOR (obj);
|
||||
}
|
||||
|
||||
const SCM *
|
||||
scm_vector_elements (SCM array, scm_t_array_handle *h,
|
||||
size_t *lenp, ssize_t *incp)
|
||||
|
|
|
@ -28,6 +28,12 @@
|
|||
|
||||
|
||||
|
||||
static inline int
|
||||
scm_is_vector (SCM obj)
|
||||
{
|
||||
return SCM_HAS_TYP7 (obj, scm_tc7_vector);
|
||||
}
|
||||
|
||||
SCM_API SCM scm_vector_p (SCM x);
|
||||
SCM_API SCM scm_vector_length (SCM v);
|
||||
SCM_API SCM scm_vector (SCM l);
|
||||
|
@ -44,7 +50,6 @@ SCM_API SCM scm_vector_copy (SCM vec);
|
|||
SCM_API SCM scm_vector_copy_partial (SCM vec, SCM start, SCM end);
|
||||
SCM_API SCM scm_vector_copy_x (SCM dst, SCM at, SCM src, SCM start, SCM end);
|
||||
|
||||
SCM_API int scm_is_vector (SCM obj);
|
||||
SCM_API SCM scm_c_make_vector (size_t len, SCM fill);
|
||||
SCM_API size_t scm_c_vector_length (SCM vec);
|
||||
SCM_API SCM scm_c_vector_ref (SCM vec, size_t k);
|
||||
|
@ -77,7 +82,6 @@ SCM_API SCM *scm_vector_writable_elements (SCM array,
|
|||
(SCM_NIMP (x) && \
|
||||
((SCM_CELL_TYPE (x) & (0x7f | SCM_F_VECTOR_IMMUTABLE)) \
|
||||
== scm_tc7_vector))
|
||||
#define SCM_I_IS_VECTOR(x) (SCM_HAS_TYP7 (x, scm_tc7_vector))
|
||||
#define SCM_I_VECTOR_ELTS(x) ((const SCM *) SCM_I_VECTOR_WELTS (x))
|
||||
#define SCM_I_VECTOR_WELTS(x) (SCM_CELL_OBJECT_LOC (x, 1))
|
||||
#define SCM_I_VECTOR_LENGTH(x) (((size_t) SCM_CELL_WORD_0 (x)) >> 8)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue