Skip to content

Commit

Permalink
Merge pull request #33 from DilumAluthge/dpa/warn
Browse files Browse the repository at this point in the history
Change all occurences of `warn(...)` to `@warn(...)`
  • Loading branch information
meggart authored Aug 30, 2022
2 parents ec337f9 + 12f69b4 commit a938537
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/cur.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ end
"Close a cursor"
function close(cur::Cursor)
if cur.handle == C_NULL
warn("Cursor is already closed")
@warn("Cursor is already closed")
end
_mdb_cursor_close(cur.handle)
cur.handle = C_NULL
Expand Down Expand Up @@ -72,7 +72,7 @@ process_returns(::ReturnValues{V}, _, mdb_val_ref) where V = arcopy(convert(V, m
process_returns(::ReturnBoth{K,V}, mdb_key_ref, mdb_val_ref) where {K,V} = arcopy((convert(K, mdb_key_ref)) => arcopy(convert(V, mdb_val_ref))), MDB_NEXT
process_returns(::ReturnValueSize, _, mdb_val_ref) = mdb_val_ref[].mv_size, MDB_NEXT
function init_values(d::LMDBIterator)
k,op = if !isempty(d.prefix)
k,op = if !isempty(d.prefix)
Ref(MDBValue(d.prefix)), MDB_SET_RANGE
else
Ref(MDBValue()), MDB_FIRST
Expand Down
2 changes: 1 addition & 1 deletion src/dbi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ end
"Close a database handle"
function close(env::Environment, dbi::DBI)
if !isopen(env)
warn("Environment is closed")
@warn("Environment is closed")
end
_mdb_dbi_close(env.handle, dbi.handle)
dbi.handle = zero(Cuint)
Expand Down
4 changes: 2 additions & 2 deletions src/env.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function setindex!(env::Environment, val::Cuint, option::Symbol)
elseif option == :DBs
mdb_env_set_maxdbs(env.handle, val)
else
warn("Cannot set $(string(option)) value")
@warn("Cannot set $(string(option)) value")
Cint(0)
end
end
Expand All @@ -138,7 +138,7 @@ function getindex(env::Environment, option::Symbol)
elseif option == :KeySize
value[1] = _mdb_env_get_maxkeysize(env.handle)
else
warn("Cannot get $(string(option)) value")
@warn("Cannot get $(string(option)) value")
end
return value[1]
end
Expand Down

0 comments on commit a938537

Please sign in to comment.