Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escaping the error "Method overwriting is not permitted during Module precompilation" with Julia V 1.10 #217

Merged
merged 2 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions src/api/capi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -431,15 +431,14 @@
"""=#
function getoption(mysql::MYSQL, option::mysql_option)
if option in CUINTOPTS
arg = Ref{Cuint}()
return @checksuccess mysql mysql_get_option_Cuint(mysql.ptr, option, Ref{Cuint}())

Check warning on line 434 in src/api/capi.jl

View check run for this annotation

Codecov / codecov/patch

src/api/capi.jl#L434

Added line #L434 was not covered by tests
elseif option in CULONGOPTS
arg = Ref{Culong}()
return @checksuccess mysql mysql_get_option_Culong(mysql.ptr, option, Ref{Culong}())

Check warning on line 436 in src/api/capi.jl

View check run for this annotation

Codecov / codecov/patch

src/api/capi.jl#L436

Added line #L436 was not covered by tests
elseif option in BOOLOPTS
arg = Ref{Bool}()
return @checksuccess mysql mysql_get_option_Bool(mysql.ptr, option, Ref{Bool}())

Check warning on line 438 in src/api/capi.jl

View check run for this annotation

Codecov / codecov/patch

src/api/capi.jl#L438

Added line #L438 was not covered by tests
else
arg = Ref{String}()
return @checksuccess mysql mysql_get_option_String(mysql.ptr, option, Ref{String}())

Check warning on line 440 in src/api/capi.jl

View check run for this annotation

Codecov / codecov/patch

src/api/capi.jl#L440

Added line #L440 was not covered by tests
end
return @checksuccess mysql mysql_get_option(mysql.ptr, option, arg)
end

#="""
Expand Down Expand Up @@ -964,18 +963,18 @@
function setoption(mysql::MYSQL, option::mysql_option, arg="0")
if option in CUINTOPTS
ref = Ref{Cuint}(Cuint(arg))
return @checksuccess mysql mysql_options(mysql.ptr, option, ref)
return @checksuccess mysql mysql_options_Cuint(mysql.ptr, option, ref)

Check warning on line 966 in src/api/capi.jl

View check run for this annotation

Codecov / codecov/patch

src/api/capi.jl#L966

Added line #L966 was not covered by tests
elseif option in CULONGOPTS
ref = Ref{Culong}(Culong(arg))
return @checksuccess mysql mysql_options(mysql.ptr, option, ref)
return @checksuccess mysql mysql_options_Culong(mysql.ptr, option, ref)

Check warning on line 969 in src/api/capi.jl

View check run for this annotation

Codecov / codecov/patch

src/api/capi.jl#L969

Added line #L969 was not covered by tests
elseif option in BOOLOPTS
ref = Ref{Bool}(Bool(arg))
return @checksuccess mysql mysql_options(mysql.ptr, option, ref)
return @checksuccess mysql mysql_options_Bool(mysql.ptr, option, ref)

Check warning on line 972 in src/api/capi.jl

View check run for this annotation

Codecov / codecov/patch

src/api/capi.jl#L972

Added line #L972 was not covered by tests
else
str = arg == C_NULL ? C_NULL : String(arg)
GC.@preserve str begin
ref = str == C_NULL ? C_NULL : convert(Ptr{Cvoid}, pointer(str))
return @checksuccess mysql mysql_options(mysql.ptr, option, ref)
return @checksuccess mysql mysql_options_Cvoid(mysql.ptr, option, ref)

Check warning on line 977 in src/api/capi.jl

View check run for this annotation

Codecov / codecov/patch

src/api/capi.jl#L977

Added line #L977 was not covered by tests
end
end
end
Expand Down
16 changes: 8 additions & 8 deletions src/api/ccalls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -215,28 +215,28 @@
end

#int mysql_get_option(MYSQL *mysql, enum mysql_option option, const void *arg)
function mysql_get_option(mysql::Ptr{Cvoid}, option::Integer, arg::Ref{Cuint})
function mysql_get_option_Cuint(mysql::Ptr{Cvoid}, option::Integer, arg::Ref{Cuint})

Check warning on line 218 in src/api/ccalls.jl

View check run for this annotation

Codecov / codecov/patch

src/api/ccalls.jl#L218

Added line #L218 was not covered by tests
return @c(:mysql_get_option,
Cint,
(Ptr{Cvoid}, Cint, Ref{Cuint}),
mysql, option, arg)
end

function mysql_get_option(mysql::Ptr{Cvoid}, option::Integer, arg::Ref{Culong})
function mysql_get_option_Culong(mysql::Ptr{Cvoid}, option::Integer, arg::Ref{Culong})

Check warning on line 225 in src/api/ccalls.jl

View check run for this annotation

Codecov / codecov/patch

src/api/ccalls.jl#L225

Added line #L225 was not covered by tests
return @c(:mysql_get_option,
Cint,
(Ptr{Cvoid}, Cint, Ref{Culong}),
mysql, option, arg)
end

function mysql_get_option(mysql::Ptr{Cvoid}, option::Integer, arg::Ref{Bool})
function mysql_get_option_Bool(mysql::Ptr{Cvoid}, option::Integer, arg::Ref{Bool})

Check warning on line 232 in src/api/ccalls.jl

View check run for this annotation

Codecov / codecov/patch

src/api/ccalls.jl#L232

Added line #L232 was not covered by tests
return @c(:mysql_get_option,
Cint,
(Ptr{Cvoid}, Cint, Ref{Bool}),
mysql, option, arg)
end

function mysql_get_option(mysql::Ptr{Cvoid}, option::Integer, arg::Ptr{Cvoid})
function mysql_get_option_Cvoid(mysql::Ptr{Cvoid}, option::Integer, arg::Ptr{Cvoid})

Check warning on line 239 in src/api/ccalls.jl

View check run for this annotation

Codecov / codecov/patch

src/api/ccalls.jl#L239

Added line #L239 was not covered by tests
return @c(:mysql_get_option,
Cint,
(Ptr{Cvoid}, Cint, Ptr{Cvoid}),
Expand Down Expand Up @@ -338,28 +338,28 @@
end

#int mysql_options(MYSQL *mysql, enum mysql_option option, const void *arg)
function mysql_options(mysql::Ptr{Cvoid}, option::mysql_option, arg::Ref{Cuint})
function mysql_options_Cuint(mysql::Ptr{Cvoid}, option::mysql_option, arg::Ref{Cuint})

Check warning on line 341 in src/api/ccalls.jl

View check run for this annotation

Codecov / codecov/patch

src/api/ccalls.jl#L341

Added line #L341 was not covered by tests
return @c(:mysql_options,
Cint,
(Ptr{Cvoid}, Cint, Ref{Cuint}),
mysql, option, arg)
end

function mysql_options(mysql::Ptr{Cvoid}, option::mysql_option, arg::Ref{Culong})
function mysql_options_Culong(mysql::Ptr{Cvoid}, option::mysql_option, arg::Ref{Culong})

Check warning on line 348 in src/api/ccalls.jl

View check run for this annotation

Codecov / codecov/patch

src/api/ccalls.jl#L348

Added line #L348 was not covered by tests
return @c(:mysql_options,
Cint,
(Ptr{Cvoid}, Cint, Ref{Culong}),
mysql, option, arg)
end

function mysql_options(mysql::Ptr{Cvoid}, option::mysql_option, arg::Ref{Bool})
function mysql_options_Bool(mysql::Ptr{Cvoid}, option::mysql_option, arg::Ref{Bool})

Check warning on line 355 in src/api/ccalls.jl

View check run for this annotation

Codecov / codecov/patch

src/api/ccalls.jl#L355

Added line #L355 was not covered by tests
return @c(:mysql_options,
Cint,
(Ptr{Cvoid}, Cint, Ref{Bool}),
mysql, option, arg)
end

function mysql_options(mysql::Ptr{Cvoid}, option::mysql_option, arg::Ptr{Cvoid})
function mysql_options_Cvoid(mysql::Ptr{Cvoid}, option::mysql_option, arg::Ptr{Cvoid})
return @c(:mysql_options,
Cint,
(Ptr{Cvoid}, Cint, Ptr{Cvoid}),
Expand Down
Loading