Skip to content

Commit

Permalink
Update the gen folder
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Nov 13, 2023
1 parent ae6e64c commit 85b8c18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gen/analyzer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using HSL_jll
using JuliaFormatter

release = "2023.10.6"
release = "2023.11.7"
libhsl = "/home/alexis/Bureau/git/hsl/libhsl/libHSL-$release/"

# Symbols of the shared library libhsl
Expand Down
5 changes: 3 additions & 2 deletions gen/rewriter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ function rewrite!(path::String, name::String, optimized::Bool)
text = read(path, String)
if name == "libhsl"
updated_text = replace(text, "# no prototype is found for this function at libhsl.h:44:6, please use with caution\n" => "")
updated_text = replace(updated_text, "major, minor, patch)\n" => ")\n major = Ref{Cint}(0)\n minor = Ref{Cint}(0)\n patch = Ref{Cint}(0)\n")
updated_text = replace(updated_text, "major, minor, patch)\n" => ")\n major = Ref{Cint}(0)\n minor = Ref{Cint}(0)\n patch = Ref{Cint}(0)\n")
updated_text = replace(updated_text, "Ptr{Cint}" => "Ref{Cint}")
updated_text = replace(updated_text, "Cvoid\n" => "Cvoid\n VersionNumber(major[], minor[], patch[])\n")
updated_text = replace(updated_text, " @ccall" => " @ccall")
updated_text = replace(updated_text, "Cvoid\n" => "Cvoid\n return VersionNumber(major[], minor[], patch[])\n")
else
solver = split(name, "_")[2]
updated_text = replace(text, "struct $solver" => "mutable struct $solver")
Expand Down

0 comments on commit 85b8c18

Please sign in to comment.