Skip to content

Switch to using const Ref instead of mutable global #829

Closed
@omus

Description

@omus

I noticed in https://github.com/JuliaBinaryWrappers/MozillaCACerts_jll.jl/blob/12060f50fe9948363c300167506f26aa6c75415d/src/wrappers/any.jl#L18 that cacert is a mutable global. It seems like it would be more performant to change the code to be:

const cacert = Ref{String}()

function __init__()
    ...
    cacert[] = "..."
end

I'm guessing the rational for using a mutable global is purely for convenience.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions