From 7ef9e82f51de73e89759910fd1b45ce5ccc363b3 Mon Sep 17 00:00:00 2001 From: Roy Frostig Date: Sun, 25 Jul 2010 21:27:28 -0700 Subject: Don't write to NULL after calling C natives returning void. --- src/boot/me/trans.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/boot/me') diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml index 069fdb59..832ccd1f 100644 --- a/src/boot/me/trans.ml +++ b/src/boot/me/trans.ml @@ -4998,8 +4998,12 @@ let trans_visitor libstr; symstr |]; - abi.Abi.abi_emit_native_call_in_thunk (emitter()) - out nabi (Il.Cell f) args; + abi.Abi.abi_emit_native_call_in_thunk + (emitter()) + (if pointee_type out = Il.NilTy then None else Some out) + nabi + (Il.Cell f) + args; end | _ -> bug () -- cgit v1.2.3