Skip to content
  • Emilio Cobos Álvarez's avatar
    Bug 1536586 - Simplify a bit our generated bindings by getting rid of... · ad066f1d
    Emilio Cobos Álvarez authored
    Bug 1536586 - Simplify a bit our generated bindings by getting rid of FooBorrowed and FooBorrowedMut. r=heycam
    
    This reduces a lot the boilerplate that's needed in order to add simple binding
    functions.
    
    This starts using &Foo and Option<&Foo> instead, and as a result we need to
    remove the servo_function_signatures test, which is a bit unfortunate.
    
    I think it's worth though, this causes problems on some platforms (see bug
    1534844), and messing up the functions signature is not something that I've ever
    seen (other than bug 1308234, which already had all the FooBorrowed mess which
    I'm removing).
    
    Also, cbindgen understands references and Option<&Foo>, so it will be the way to
    go in the future.
    
    After this patch we can also remove HasSimpleFFI, but I've kept it for now since
    I still use it in a few places, and this patch is quite big on its own.
    
    Differential Revision: https://phabricator.services.mozilla.com/D24092
    
    --HG--
    extra : moz-landing-system : lando
    ad066f1d
This project manages its dependencies using Cargo. Learn more