diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/bytecode.c | 2 | ||||
-rw-r--r-- | lisp/hash.c | 2 | ||||
-rw-r--r-- | lisp/read.c | 19 |
3 files changed, 15 insertions, 8 deletions
diff --git a/lisp/bytecode.c b/lisp/bytecode.c index 8353a13..cc7d1c5 100644 --- a/lisp/bytecode.c +++ b/lisp/bytecode.c @@ -551,6 +551,8 @@ Lisp_Disassemble(LispBuiltin *builtin) name = bytecode = NULL; switch (OBJECT_TYPE(function)) { + case LispFunction_t: + function = function->data.atom->object; case LispAtom_t: name = function; atom = function->data.atom; diff --git a/lisp/hash.c b/lisp/hash.c index 5959330..a6b91ec 100644 --- a/lisp/hash.c +++ b/lisp/hash.c @@ -153,8 +153,6 @@ LispHashKey(LispObj *object, int function) case LispString_t: string = THESTR(object); length = STRLEN(object); - if (length > 32) - length = 32; for (i = 0, key = 0; i < length; i++) key = (key << 1) ^ string[i]; break; diff --git a/lisp/read.c b/lisp/read.c index 283f473..9c70b64 100644 --- a/lisp/read.c +++ b/lisp/read.c @@ -1127,6 +1127,13 @@ LispReadObject(int unintern, read_info *info) collon = 1; string[length++] = ch; symbol = string + 1; + ch = LispGet(); + if (ch == '|') { + quote = ch; + unreadable = 1; + } + else if (ch != EOF) + LispUnget(ch); } else if (ch) { if (islower(ch)) @@ -1220,12 +1227,6 @@ LispReadObject(int unintern, read_info *info) else if (quote == '"') object = LSTRING(string, length); - else if (quote == '|' || (unreadable && !collon)) { - /* Set unreadable field, this atom needs quoting to be read back */ - object = ATOM(string); - object->data.atom->unreadable = 1; - } - else if (collon) { /* Package specified in object name */ symbol[-1] = '\0'; @@ -1236,6 +1237,12 @@ LispReadObject(int unintern, read_info *info) read__stream, read__line); } + else if (quote == '|' || (unreadable && !collon)) { + /* Set unreadable field, this atom needs quoting to be read back */ + object = ATOM(string); + object->data.atom->unreadable = 1; + } + /* Check some common symbols */ else if (length == 1 && string[0] == 'T') /* The T */ |