Skip to content

Commit

Permalink
Put uses of @pure and @_pure_meta behind @static if (#792)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters authored Feb 18, 2023
1 parent 7463409 commit 3a03b54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Compat"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.46.0"
version = "3.46.1"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down
4 changes: 2 additions & 2 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ if VERSION < v"1.1.0-DEV.506"
end

# https://github.com/JuliaLang/julia/pull/30496
if VERSION < v"1.2.0-DEV.272"
@static if VERSION < v"1.2.0-DEV.272"
Base.@pure hasfield(::Type{T}, name::Symbol) where T =
Base.fieldindex(T, name, false) > 0
export hasfield
Expand Down Expand Up @@ -277,7 +277,7 @@ if VERSION < v"1.4.0-DEV.551"
end

# https://github.com/JuliaLang/julia/pull/34652
if VERSION < v"1.5.0-DEV.247"
@static if VERSION < v"1.5.0-DEV.247"
export ismutable
ismutable(@nospecialize(x)) = (Base.@_pure_meta; typeof(x).mutable)
end
Expand Down

2 comments on commit 3a03b54

@martinholters
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/77966

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v3.46.1 -m "<description of version>" 3a03b54c986693333dc707e5669f00450a9e1cc5
git push origin v3.46.1

Please sign in to comment.