Ignore whitespace when checking for legacy define-c

This commit is contained in:
Justin Ethier 2021-03-09 21:40:18 -05:00
parent 524e6da427
commit 8a0986cb0b

View file

@ -2136,8 +2136,8 @@
(cond
((equal? 'precompiled-lambda (caadr l))
(cond
((equal? (substring (cadadr l) 0 42)
"(void *data, int argc, closure _, object k")
((equal? (substring (string-replace-all (cadadr l) " " "") 0 35)
(string-replace-all "(void *data, int argc, closure _, object k" " " ""))
;; Backwards compatibility for define-c expressions using
;; the old style of all C parameters contained directly
;; in the function definition. The above code finds them