-
Notifications
You must be signed in to change notification settings - Fork 38.8k
util: Use locale independent ToString(…) instead of locale dependent strprintf(…) for low-level string formatting #18450
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
Conversation
|
Rased on top of partly overlapping PR #18449 which I saw after submitting this PR :) |
fe276fd to
09eecba
Compare
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
|
|
@laanwj I'm not sure I follow TBH. I'm not sure if you are claiming that 1.) In other words: what would be the "correct" fix in your opinion? :) FWIW: |
|
@laanwj Also, is the claim about "wrong fix" referring to the tinyformat fix or all fixes in this PR? Please clarify - the review was a bit vague :) |
|
Please also see #18432 which makes I don't have any preference myself: I just want to kill this bug class once and for all :) |
|
This needs rebase either way |
|
@MarcoFalke Thanks! Rebased :) |
09eecba to
ff7bcc7
Compare
ff7bcc7 to
7dcaf6e
Compare
7dcaf6e to
4cb9397
Compare
|
@laanwj Friendly ping: could you please clarify your review feedback? :) |
luke-jr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
|
ACK 4cb9397088bf01bb5893bbcb705668894da118a6 |
jonatack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK 4cb9397
4cb9397 to
3948a06
Compare
|
Re-opened thanks to renewed interest in the form of @jonatack's review and ACK :) Unfortunately I had to rebase to resolve a conflict, so the three ACKs collected are now stale. When rebasing I also added this case which makes this change complete across the code base: diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index dda00f1fe..c6a6a7e8d 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -4222,7 +4222,7 @@ static UniValue upgradewallet(const JSONRPCRequest& request)
"\nUpgrade the wallet. Upgrades to the latest version if no version number is specified\n"
"New keys may be generated and a new wallet backup will need to be made.",
{
- {"version", RPCArg::Type::NUM, /* default */ strprintf("%d", FEATURE_LATEST), "The version number to upgrade to. Default is the latest wallet version"}
+ {"version", RPCArg::Type::NUM, /* default */ ToString(FEATURE_LATEST), "The version number to upgrade to. Default is the latest wallet version"}
},
RPCResults{},
RPCExamples{@luke-jr @MarcoFalke @jonatack - would you mind re-reviewing the rebased version and re-ACK if everything still looks good? :) |
…strprintf(…) for low-level string formatting
3948a06 to
f808c23
Compare
|
@laanwj Friendly ping: can you clarify your review feedback as requested above? Generally I don't think it is fair to leave NACK style comments if one is unwilling to follow up when asked for clarification regarding the rationale for said NACK. |
Use locale independent
ToString(…)instead of locale dependentstrprintf(…)for low-level string formatting.Context: See sipas comment in #18147 (comment).
Example taken from #18281:
Fixes #18281.