don't free result pointers

This commit is contained in:
Alex Shinn 2010-01-01 23:33:38 +09:00
parent 85298f69e1
commit 3132cb8c42

View file

@ -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))