* Deprecated scm_sloppy_mem(q|v|ber)

This commit is contained in:
Dirk Herrmann 2000-10-13 07:55:25 +00:00
commit daa6ba187b
7 changed files with 43 additions and 25 deletions

4
NEWS
View file

@ -100,6 +100,10 @@ internally, combined with a copy-on-write strategy.
The concept of read-only strings will disappear in next release of The concept of read-only strings will disappear in next release of
Guile. Guile.
** Deprecated: scm_sloppy_memq, scm_sloppy_memv, scm_sloppy_member
Instead, use scm_memq, scm_memv, scm_member.
* Changes to the gh_ interface * Changes to the gh_ interface
* Changes to the scm_ interface * Changes to the scm_ interface

View file

@ -60,6 +60,7 @@ In release 1.6:
- remove scm_tc7_ssymbol - remove scm_tc7_ssymbol
- remove scm_tc7_msymbol - remove scm_tc7_msymbol
- remove scm_tcs_symbols - remove scm_tcs_symbols
- remove scm_sloppy_memq, scm_sloppy_memv, scm_sloppy_member
Modules sort.c and random.c should be factored out into separate Modules sort.c and random.c should be factored out into separate
modules (but still be distributed with guile-core) when we get a new modules (but still be distributed with guile-core) when we get a new

View file

@ -1,3 +1,10 @@
2000-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
* list.[ch] (scm_sloppy_memq, scm_sloppy_memv, scm_sloppy_member):
Deprecated.
(scm_memq, scm_memv, scm_member): Inline the sloppy code.
2000-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de> 2000-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
* alloca.c: Fixed include file path. Thanks to Bruce Korb for * alloca.c: Fixed include file path. Thanks to Bruce Korb for

View file

@ -504,6 +504,8 @@ SCM_DEFINE (scm_list_copy, "list-copy", 1, 0, 0,
/* membership tests (memq, memv, etc.) */ /* membership tests (memq, memv, etc.) */
#if SCM_DEBUG_DEPRECATED == 0
SCM_DEFINE (scm_sloppy_memq, "sloppy-memq", 2, 0, 0, SCM_DEFINE (scm_sloppy_memq, "sloppy-memq", 2, 0, 0,
(SCM x, SCM lst), (SCM x, SCM lst),
"This procedure behaves like @code{memq}, but does no type or error checking.\n" "This procedure behaves like @code{memq}, but does no type or error checking.\n"
@ -554,7 +556,7 @@ SCM_DEFINE (scm_sloppy_member, "sloppy-member", 2, 0, 0,
} }
#undef FUNC_NAME #undef FUNC_NAME
#endif /* DEPRECATED */
SCM_DEFINE (scm_memq, "memq", 2, 0, 0, SCM_DEFINE (scm_memq, "memq", 2, 0, 0,
(SCM x, SCM lst), (SCM x, SCM lst),
@ -565,10 +567,13 @@ SCM_DEFINE (scm_memq, "memq", 2, 0, 0,
"returned.") "returned.")
#define FUNC_NAME s_scm_memq #define FUNC_NAME s_scm_memq
{ {
SCM answer; SCM_VALIDATE_LIST (2, lst);
SCM_VALIDATE_LIST (2,lst); for (; !SCM_NULLP (lst); lst = SCM_CDR (lst))
answer = scm_sloppy_memq (x, lst); {
return (SCM_NULLP (answer)) ? SCM_BOOL_F : answer; if (SCM_EQ_P (SCM_CAR (lst), x))
return lst;
}
return SCM_BOOL_F;
} }
#undef FUNC_NAME #undef FUNC_NAME
@ -583,10 +588,13 @@ SCM_DEFINE (scm_memv, "memv", 2, 0, 0,
"returned.") "returned.")
#define FUNC_NAME s_scm_memv #define FUNC_NAME s_scm_memv
{ {
SCM answer; SCM_VALIDATE_LIST (2, lst);
SCM_VALIDATE_LIST (2,lst); for (; !SCM_NULLP (lst); lst = SCM_CDR (lst))
answer = scm_sloppy_memv (x, lst); {
return (SCM_NULLP (answer)) ? SCM_BOOL_F : answer; if (! SCM_FALSEP (scm_eqv_p (SCM_CAR (lst), x)))
return lst;
}
return SCM_BOOL_F;
} }
#undef FUNC_NAME #undef FUNC_NAME
@ -600,10 +608,13 @@ SCM_DEFINE (scm_member, "member", 2, 0, 0,
"returned.") "returned.")
#define FUNC_NAME s_scm_member #define FUNC_NAME s_scm_member
{ {
SCM answer; SCM_VALIDATE_LIST (2, lst);
SCM_VALIDATE_LIST (2,lst); for (; !SCM_NULLP (lst); lst = SCM_CDR (lst))
answer = scm_sloppy_member (x, lst); {
return (SCM_NULLP (answer)) ? SCM_BOOL_F : answer; if (! SCM_FALSEP (scm_equal_p (SCM_CAR (lst), x)))
return lst;
}
return SCM_BOOL_F;
} }
#undef FUNC_NAME #undef FUNC_NAME

View file

@ -83,9 +83,6 @@ extern SCM scm_list_set_x (SCM lst, SCM k, SCM val);
extern SCM scm_list_cdr_set_x (SCM lst, SCM k, SCM val); extern SCM scm_list_cdr_set_x (SCM lst, SCM k, SCM val);
extern SCM scm_last_pair (SCM sx); extern SCM scm_last_pair (SCM sx);
extern SCM scm_list_tail (SCM lst, SCM k); extern SCM scm_list_tail (SCM lst, SCM k);
extern SCM scm_sloppy_memq (SCM x, SCM lst);
extern SCM scm_sloppy_memv (SCM x, SCM lst);
extern SCM scm_sloppy_member (SCM x, SCM lst);
extern SCM scm_memq (SCM x, SCM lst); extern SCM scm_memq (SCM x, SCM lst);
extern SCM scm_memv (SCM x, SCM lst); extern SCM scm_memv (SCM x, SCM lst);
extern SCM scm_member (SCM x, SCM lst); extern SCM scm_member (SCM x, SCM lst);
@ -106,6 +103,9 @@ extern void scm_init_list (void);
#if (SCM_DEBUG_DEPRECATED == 0) #if (SCM_DEBUG_DEPRECATED == 0)
#define scm_list_star scm_cons_star #define scm_list_star scm_cons_star
extern SCM scm_sloppy_memq (SCM x, SCM lst);
extern SCM scm_sloppy_memv (SCM x, SCM lst);
extern SCM scm_sloppy_member (SCM x, SCM lst);
#endif /* SCM_DEBUG_DEPRECATED == 0 */ #endif /* SCM_DEBUG_DEPRECATED == 0 */

View file

@ -1,3 +1,7 @@
2000-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
* tests/list.test: Removed references to sloppy-mem(q|v|ber)
2000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de> 2000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
* tests/strings.test: Added a test to help remember that string=? * tests/strings.test: Added a test to help remember that string=?

View file

@ -665,15 +665,6 @@
;;; list-copy ;;; list-copy
;;; sloppy-memq
;;; sloppy-memv
;;; sloppy-member
;;; memq ;;; memq