Skip to content

Commit

Permalink
Merge pull request #48567 from JuliaLang/sf/lbt_path_protection
Browse files Browse the repository at this point in the history
Restrict `path` to be an `AbstractString` in `lbt_forward()`
  • Loading branch information
staticfloat authored Feb 7, 2023
2 parents e32e20c + 8492031 commit 2c619b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions stdlib/LinearAlgebra/src/lbt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,10 @@ function lbt_set_num_threads(nthreads)
return ccall((:lbt_set_num_threads, libblastrampoline), Cvoid, (Int32,), nthreads)
end

function lbt_forward(path; clear::Bool = false, verbose::Bool = false, suffix_hint::Union{String,Nothing} = nothing)
function lbt_forward(path::AbstractString; clear::Bool = false, verbose::Bool = false, suffix_hint::Union{String,Nothing} = nothing)
_clear_config_with() do
return ccall((:lbt_forward, libblastrampoline), Int32, (Cstring, Int32, Int32, Cstring), path, clear ? 1 : 0, verbose ? 1 : 0, something(suffix_hint, C_NULL))
return ccall((:lbt_forward, libblastrampoline), Int32, (Cstring, Int32, Int32, Cstring),
path, clear ? 1 : 0, verbose ? 1 : 0, something(suffix_hint, C_NULL))
end
end

Expand Down

0 comments on commit 2c619b7

Please sign in to comment.