Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ce42812

Browse files
Add fixes for some bugs revealed by test suite
1 parent a5f53af commit ce42812

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

‎autotest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ def test():
807807
for line in TESTS.split("\n"):
808808
if line and line.startswith("("):
809809
text = talk(line, port)
810-
if "Error:" in text:
810+
if "Error:" in textor"Error in"intext:
811811
talk("(incf crashes)", port)
812812

813813
test()

‎ulisp.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ int intpower (int base, int exp) {
11011101
testargument - handles the :test argument for functions that accept it
11021102
*/
11031103
object* testargument (object* args) {
1104-
object* test = bsymbol(EQ);
1104+
object* test = bfunction_from_symbol(bsymbol(EQ));
11051105
if (args != NULL) {
11061106
if (cdr(args) == NULL) error("dangling keyword", first(args));
11071107
if (isbuiltin(first(args), TEST)) test = second(args);
@@ -1795,7 +1795,8 @@ object* closure (bool tc, symbol_t name, object* function, object* args, object*
17951795
}
17961796

17971797
object* apply (object* function, object* args, object* env) {
1798-
if (symbolp(function)) {
1798+
if (symbolp(function)) error("can't call a symbol", function);
1799+
if (bfunctionp(function)) {
17991800
builtin_t fname = builtin(function->name);
18001801
if ((fname < ENDFUNCTIONS) && (fntype(getminmax(fname)) == FUNCTIONS)) {
18011802
Context = fname;
@@ -7001,8 +7002,8 @@ const tbl_entry_t BuiltinTable[] = {
70017002
{ stringcopylist, fn_copylist, MINMAX(FUNCTIONS, 1, 1), doccopylist },
70027003
{ string86, fn_makearray, MINMAX(FUNCTIONS, 1, 5), doc86 },
70037004
{ string87, fn_reverse, MINMAX(FUNCTIONS, 1, 1), doc87 },
7004-
{ string88, fn_assoc, MINMAX(FUNCTIONS, 2, 2), doc88 },
7005-
{ string89, fn_member, MINMAX(FUNCTIONS, 2, 2), doc89 },
7005+
{ string88, fn_assoc, MINMAX(FUNCTIONS, 2, 4), doc88 },
7006+
{ string89, fn_member, MINMAX(FUNCTIONS, 2, 4), doc89 },
70067007
{ string90, fn_apply, MINMAX(FUNCTIONS, 2, UNLIMITED), doc90 },
70077008
{ string91, fn_funcall, MINMAX(FUNCTIONS, 1, UNLIMITED), doc91 },
70087009
{ string93, fn_mapc, MINMAX(FUNCTIONS, 2, UNLIMITED), doc93 },

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /