removed a useless check in foreign-alloc

original commit: a629477f50dffd0cdc838276bbbf31f06504d958
This commit is contained in:
Bob Burger 2017-09-15 09:49:00 -04:00
parent d9068c2642
commit 022bf715be
2 changed files with 3 additions and 4 deletions

2
LOG
View File

@ -582,3 +582,5 @@
simplified test and finding the initial solution.
cpnanopass.ss,
3.ms
- removed a useless check in foreign-alloc
record.ss

View File

@ -51,10 +51,7 @@
(lambda (n)
(unless (and (fixnum? n) (fx> n 0))
($oops who "~s is not a positive fixnum" n))
(let ([x (malloc n)])
(if (string? x)
($oops who "system call failed: ~(~a~)" x)
x)))))
(malloc n))))
(set-who! foreign-free
(let ([free (foreign-procedure "(cs)free" (uptr) void)])