mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 14:49:18 +02:00
don't free result pointers
This commit is contained in:
parent
85298f69e1
commit
3132cb8c42
1 changed files with 2 additions and 0 deletions
|
@ -943,9 +943,11 @@
|
|||
(cat " if (len" i " != " len ")\n"
|
||||
" free(tmp" i ");\n"))))
|
||||
((and (type-result? a) (not (basic-type? a))
|
||||
(not (assq (type-base a) *types*))
|
||||
(not (type-free? a)) (not (type-pointer? a))
|
||||
(or (not (type-array a))
|
||||
(not (integer? (get-array-length func a)))))
|
||||
;; the above is hairy - basically this frees temporary strings
|
||||
(cat " free(tmp" (type-index a) ");\n"))))
|
||||
(func-c-args func))
|
||||
(let* ((results (func-results func))
|
||||
|
|
Loading…
Add table
Reference in a new issue