Use ffi_prep_closure_loc rather than ffi_prep_closure
authorIan Lynagh <ian@well-typed.com>
Sun, 21 Apr 2013 15:03:40 +0000 (16:03 +0100)
committerIan Lynagh <ian@well-typed.com>
Sun, 21 Apr 2013 15:03:40 +0000 (16:03 +0100)
The latter is deprecated. Part of #7718.

rts/Adjustor.c

index fbf95df..e4d6e8c 100644 (file)
@@ -131,7 +131,7 @@ createAdjustor (int cconv,
         barf("createAdjustor: failed to allocate memory");
     }
 
-    r = ffi_prep_closure(cl, cif, (void*)wptr, hptr/*userdata*/);
+    r = ffi_prep_closure_loc(cl, cif, (void*)wptr, hptr/*userdata*/, code);
     if (r != FFI_OK) barf("ffi_prep_closure failed: %d", r);
 
     return (void*)code;