mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-18 21:29:19 +02:00
no need to zero out calloc result in ffi
This commit is contained in:
parent
b52df76e8a
commit
17102697e9
1 changed files with 6 additions and 5 deletions
|
@ -1233,11 +1233,12 @@
|
||||||
"*sizeof(tmp" (type-index a) "[0])"))
|
"*sizeof(tmp" (type-index a) "[0])"))
|
||||||
(lambda () (cat "sizeof(tmp" (type-index a) "[0])")))
|
(lambda () (cat "sizeof(tmp" (type-index a) "[0])")))
|
||||||
");\n"
|
");\n"
|
||||||
(lambda ()
|
;; (lambda ()
|
||||||
(if (and (symbol? len) (not (eq? len 'null)))
|
;; (if (and (symbol? len) (not (eq? len 'null)))
|
||||||
(cat " tmp" (type-index a) "["
|
;; (cat " tmp" (type-index a) "["
|
||||||
(lambda () (scheme->c-converter 'unsigned-int len))
|
;; (lambda () (scheme->c-converter 'unsigned-int len))
|
||||||
"*sizeof(tmp" (type-index a) "[0])] = 0;\n"))))))
|
;; "*sizeof(tmp" (type-index a) "[0])] = 0;\n")))
|
||||||
|
)))
|
||||||
((and (type-result? a) (type-value a))
|
((and (type-result? a) (type-value a))
|
||||||
(cat " tmp" (type-index a) " = "
|
(cat " tmp" (type-index a) " = "
|
||||||
(lambda () (write-value func (type-value a))) ";\n"))
|
(lambda () (write-value func (type-value a))) ";\n"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue