Skip to content

Commit abd0a20

Browse files
committed
Remove unnecessary methods
These are generated by BitFlags since it's first public release, and adding these methods then makes the methods all ambiguous. (Best guess is that the methods have been a long hold-over since a time when BitFlags hadn't been fully fleshed out yet.)
1 parent 8443c0f commit abd0a20

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
99
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
1010

1111
[compat]
12-
BitFlags = "0.1"
12+
BitFlags = "0.1.7"
1313
MacroTools = "0.5"
1414
julia = "1"
1515

src/consts.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ import .Sys # explicitly imported to allow docs generation to override
77
PROT_WRITE = 0x02
88
PROT_EXEC = 0x04
99
end
10-
Base.cconvert(::Type{T}, pf::MmapProtection) where {T <: Integer} = T(pf)
1110

1211
@bitflag SyncFlags::Cuint begin
1312
MS_ASYNC = 0x1
1413
MS_INVALIDATE = 0x2
1514
MS_SYNC = 0x4
1615
end
17-
Base.cconvert(::Type{T}, sf::SyncFlags) where {T <: Integer} = T(sf)
1816

1917
@staticexpand @bitflag MmapFlags::Cuint begin
2018
MAP_FILE = 0x00
@@ -67,7 +65,6 @@ Base.cconvert(::Type{T}, sf::SyncFlags) where {T <: Integer} = T(sf)
6765
MAP_STACK = 0x2000
6866
end
6967
end
70-
Base.cconvert(::Type{T}, mf::MmapFlags) where {T <: Integer} = T(mf)
7168

7269
# Provide this weird mode?
7370
#@static if Sys.islinux()
@@ -116,7 +113,6 @@ Base.cconvert(::Type{T}, mf::MmapFlags) where {T <: Integer} = T(mf)
116113
MADV_FREE = 6
117114
end
118115
end
119-
Base.cconvert(::Type{T}, af::AdviseFlags) where {T <: Integer} = T(af)
120116

121117
# documentation requires the types to be defined first, so do after the fact
122118
let _flag_docs

0 commit comments

Comments
 (0)