X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fsearch.c;h=4bf6b503fa72f95db2e93fff9bdb6e6b8ea593f9;hb=df9e151e5c81ac2716011c246c0e62848527b9b3;hp=611c77ad169a2a38e536b4e9090808b83200c81d;hpb=d2e48d5a1805e3fb98268473a71aff38d8fd9d0b;p=sbcl.git diff --git a/src/runtime/search.c b/src/runtime/search.c index 611c77a..4bf6b50 100644 --- a/src/runtime/search.c +++ b/src/runtime/search.c @@ -11,10 +11,11 @@ #include -#include "runtime.h" #include "sbcl.h" +#include "runtime.h" #include "os.h" #include "search.h" +#include "thread.h" #include "genesis/primitive-objects.h" boolean search_for_type(int type, lispobj **start, int *count) @@ -22,7 +23,7 @@ boolean search_for_type(int type, lispobj **start, int *count) lispobj obj, *addr; while ((*count == -1 || (*count > 0)) && - is_valid_lisp_addr((os_vm_address_t)*start)) { + is_valid_lisp_addr((os_vm_address_t)*start)) { obj = **start; addr = *start; if (*count != -1) @@ -43,13 +44,15 @@ boolean search_for_symbol(char *name, lispobj **start, int *count) while (search_for_type(SYMBOL_HEADER_WIDETAG, start, count)) { symbol = (struct symbol *)native_pointer((lispobj)*start); - if (lowtag_of(symbol->name) == OTHER_POINTER_LOWTAG) { + if (lowtag_of(symbol->name) == OTHER_POINTER_LOWTAG) { symbol_name = (struct vector *)native_pointer(symbol->name); if (is_valid_lisp_addr((os_vm_address_t)symbol_name) && - widetag_of(symbol_name->header) == SIMPLE_STRING_WIDETAG && - strcmp((char *)symbol_name->data, name) == 0) + /* FIXME: Broken with more than one type of string + (i.e. even broken given (VECTOR NIL) */ + widetag_of(symbol_name->header) == SIMPLE_BASE_STRING_WIDETAG && + strcmp((char *)symbol_name->data, name) == 0) return 1; - } + } (*start) += 2; } return 0;