diff -Nurdb tcc.egg.dir-orig/tcc.scm tcc.egg.dir/tcc.scm --- tcc.egg.dir-orig/tcc.scm 2003-08-31 21:33:58.000000000 -0400 +++ tcc.egg.dir/tcc.scm 2005-03-27 21:41:37.781000512 -0500 @@ -105,6 +105,9 @@ (tcc:error 'tcc:relocate "relocation failed" '()) ) ) ) ) (define tcc:get-symbol - (let ([get (foreign-lambda c-pointer "tcc_get_symbol" tcc-state* c-string)]) + (let ([get (foreign-lambda int "tcc_get_symbol" tcc-state* c-pointer c-string)]) (lambda (s str) - (check 'tcc:get-symbol (cut get s str) "can't get symbol") ) ) ) + (let-location ([val c-pointer]) + (if (zero? (get s (location val) str)) + val + (tcc:error 'tcc:get-symbol "can't get symbol" '()))))))