Mercurial > hg > xemacs-beta
diff src/sequence.c @ 5700:37479d841681
Fix subsetp based on patch by Benson and Steven Mitchell.
Add appropriate short-circuits for null set arguments.
Add tests (mostly from Steven Mitchell) to test suite.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Mon, 24 Dec 2012 14:12:51 +0900 |
parents | 1a507c4c6c42 |
children | 70a3f4ff8da8 |
line wrap: on
line diff
--- a/src/sequence.c Mon Dec 24 04:16:31 2012 +0900 +++ b/src/sequence.c Mon Dec 24 14:12:51 2012 +0900 @@ -7606,6 +7606,20 @@ CHECK_LIST (liszt2); CHECK_KEY_ARGUMENT (key); + + /* #### Consider refactoring these tests into callers, and/or optimizing + tests. */ + if (EQ (caller, Qsubsetp)) + { + if (NILP (liszt1)) + { + return Qt; + } + if (NILP (liszt2)) + { + return Qnil; + } + } if (NILP (liszt1) && intersectionp) {