Skip to content

Commit

Permalink
Remove definitions of unsafe_get and isnull fallsback
Browse files Browse the repository at this point in the history
Were added in #287.
  • Loading branch information
martinholters committed Aug 31, 2018
1 parent d1294c2 commit f775fe7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 40 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ Currently, the `@compat` macro supports the following syntaxes:

* [`normalize`](http://docs.julialang.org/en/latest/stdlib/linalg/?highlight=normalize#Base.normalize) and [`normalize!`](http://docs.julialang.org/en/latest/stdlib/linalg/?highlight=normalize#Base.normalize!), normalizes a vector with respect to the p-norm ([#13681])

* `unsafe_get` returns the `:value` field of a `Nullable` object without any null-check and has a generic fallback for non-`Nullable` argument ([#18484])

* `isnull` has a generic fallback for non-`Nullable` argument

* `transcode` converts between UTF-xx string encodings in Julia 0.5 (as a lightweight
alternative to the LegacyStrings package) ([#17323])

Expand Down Expand Up @@ -494,7 +490,6 @@ includes this fix. Find the minimum version from there.
[#17323]: https://github.com/JuliaLang/julia/issues/17323
[#17623]: https://github.com/JuliaLang/julia/issues/17623
[#18082]: https://github.com/JuliaLang/julia/issues/18082
[#18484]: https://github.com/JuliaLang/julia/issues/18484
[#18629]: https://github.com/JuliaLang/julia/issues/18629
[#18727]: https://github.com/JuliaLang/julia/issues/18727
[#18977]: https://github.com/JuliaLang/julia/issues/18977
Expand Down
8 changes: 0 additions & 8 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,6 @@ else
end
end

# julia#18484
@static if VERSION < v"0.6.0-dev.848"
unsafe_get(x::Nullable) = x.value
unsafe_get(x) = x
export unsafe_get
Base.isnull(x) = false
end

# julia#18977
@static if !isdefined(Base, :xor)
# 0.6
Expand Down
27 changes: 0 additions & 27 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,6 @@ else
end
end

if VERSION < v"0.7.0-DEV.3017"
types = [
Bool,
Float16,
Float32,
Float64,
Int128,
Int16,
Int32,
Int64,
Int8,
UInt16,
UInt32,
UInt64,
UInt8,
]
for T in types
# julia#18484, generic isnull, unsafe_get
a = one(T)
x = Nullable(a, true)
@test isequal(unsafe_get(x), a)

x = Nullable{Array{T}}()
@test_throws UndefRefError unsafe_get(x)
end
end

@test xor(1,5) == 4
@test 1 5 == 4

Expand Down

0 comments on commit f775fe7

Please sign in to comment.