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

Remove cmp argument from replacefield! docstring #41282

Merged
merged 1 commit into from
Jun 20, 2021
Merged
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
8 changes: 4 additions & 4 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2005,22 +2005,22 @@ optimized to the appropriate hardware instruction, otherwise it'll use a loop.
modifyfield!

"""
replacefield!(value, name::Symbol, cmp, expected, desired,
replacefield!(value, name::Symbol, expected, desired,
[success_order::Symbol, [fail_order::Symbol=success_order]) =>
(old, Bool)

These atomically perform the operations to get and conditionally set a field to
a given value.

y = getfield!(value, name, fail_order)
ok = cmp(y, expected)
ok = y === expected
if ok
setfield!(value, name, desired, success_order)
end
return y, ok

If the operation is `===` on a supported type, we'll use the relevant processor
instructions, otherwise it'll use a loop.
If supported by the hardware, this may be optimized to the appropriate hardware
instruction, otherwise it'll use a loop.
"""
replacefield!

Expand Down