Skip to content

Commit ccf22bd

Browse files
authored
Merge pull request #2277 from ERGO-Code/od/highs-int
Fix docs by removing links to HighsInt
2 parents cbfebdd + 0870d47 commit ccf22bd

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

docs/c_api_gen/build.jl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ import Clang: Generators
1212

1313
highs_src = joinpath(dirname(dirname(@__DIR__)), "src")
1414
c_api = joinpath(highs_src, "interfaces", "highs_c_api.h")
15+
libhighs_filename = joinpath(@__DIR__, "libhighs.jl")
1516

1617
Generators.build!(
1718
Generators.create_context(
1819
[c_api, joinpath(highs_src, "util", "HighsInt.h")],
1920
[Generators.get_default_args(); "-I$highs_src"; "-I$(@__DIR__)"],
2021
Dict{String,Any}(
2122
"general" => Dict{String,Any}(
22-
"output_file_path" => joinpath(@__DIR__, "libhighs.jl"),
23+
"output_file_path" => libhighs_filename,
2324
"library_name" => "libhighs",
2425
"print_using_CEnum" => false,
2526
"extract_c_comment_style" => "doxygen",
@@ -28,7 +29,15 @@ Generators.build!(
2829
),
2930
)
3031

31-
open(joinpath(@__DIR__, "libhighs.jl"), "a") do io
32+
write(
33+
libhighs_filename,
34+
replace(
35+
read(libhighs_filename, String),
36+
"[`HighsInt`](@ref)" => "`HighsInt`",
37+
),
38+
)
39+
40+
open(libhighs_filename, "a") do io
3241
for line in readlines(c_api)
3342
m = match(r"const HighsInt kHighs([a-zA-Z]+) = (-?[0-9]+);", line)
3443
if m === nothing

0 commit comments

Comments
 (0)