[commit: ghc] master: Use ffi_prep_closure_loc rather than ffi_prep_closure (310735e)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[commit: ghc] master: Use ffi_prep_closure_loc rather than ffi_prep_closure (310735e)

Sergei Trofimovich
> commit 310735e7adce0145c653386c21686b4a1b96aea9
> Author: Ian Lynagh <ian at well-typed.com>
> Date:   Sun Apr 21 16:03:40 2013 +0100
>
>     Use ffi_prep_closure_loc rather than ffi_prep_closure
>    
>     The latter is deprecated. Part of #7718.
>
> >---------------------------------------------------------------
>
>  rts/Adjustor.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rts/Adjustor.c b/rts/Adjustor.c
> index fbf95df..e4d6e8c 100644
> --- a/rts/Adjustor.c
> +++ b/rts/Adjustor.c
> @@ -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);

The barf() text (/ffi_prep_closure/ffi_prep_closure_loc/) might be adjusted as well.

>      return (void*)code;

--

  Sergei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130421/111d0a11/attachment.pgp>

Reply | Threaded
Open this post in threaded view
|

[commit: ghc] master: Use ffi_prep_closure_loc rather than ffi_prep_closure (310735e)

Ian Lynagh-2
On Sun, Apr 21, 2013 at 09:34:31PM +0300, Sergei Trofimovich wrote:
> > commit 310735e7adce0145c653386c21686b4a1b96aea9
> >  
> > -    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);
>
> The barf() text (/ffi_prep_closure/ffi_prep_closure_loc/) might be adjusted as well.

Ta, fixed.


Thanks
Ian