Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
5699:a95c89dc9695 | 5700:37479d841681 |
---|---|
7604 | 7604 |
7605 CHECK_LIST (liszt1); | 7605 CHECK_LIST (liszt1); |
7606 CHECK_LIST (liszt2); | 7606 CHECK_LIST (liszt2); |
7607 | 7607 |
7608 CHECK_KEY_ARGUMENT (key); | 7608 CHECK_KEY_ARGUMENT (key); |
7609 | |
7610 /* #### Consider refactoring these tests into callers, and/or optimizing | |
7611 tests. */ | |
7612 if (EQ (caller, Qsubsetp)) | |
7613 { | |
7614 if (NILP (liszt1)) | |
7615 { | |
7616 return Qt; | |
7617 } | |
7618 if (NILP (liszt2)) | |
7619 { | |
7620 return Qnil; | |
7621 } | |
7622 } | |
7609 | 7623 |
7610 if (NILP (liszt1) && intersectionp) | 7624 if (NILP (liszt1) && intersectionp) |
7611 { | 7625 { |
7612 return Qnil; | 7626 return Qnil; |
7613 } | 7627 } |