No description provided.
Make position of * in pointer declarations in include/ consistent #1252
pull jonasnick wants to merge 1 commits into bitcoin-core:master from jonasnick:asterisk changing 6 files +86 −86-
jonasnick commented at 7:41 PM on March 28, 2023: contributor
-
Make position of * in pointer declarations in include/ consistent 3d1f430f9f
-
apoelstra commented at 7:52 PM on March 28, 2023: contributor
I think we should move it the other direction, so the
*is part of the type and not part of the name. -
jonasnick commented at 7:25 AM on March 29, 2023: contributor
I went with the traditional convention as used in the C standard. I'd agree with you if the position of
*was entirely arbitrary. But making*part of the name makes more sense in C because it applies to the variable and not the type. For example,char* foo, bar;declaresfooto be a pointer to char andbarto be a char. - real-or-random approved
-
real-or-random commented at 11:31 AM on March 29, 2023: contributor
I think they're arguments for either side. But yeah, we should make it consistent.
utACK https://github.com/bitcoin-core/secp256k1/pull/1252/commits/3d1f430f9f32d45885b0a10b448c0f15386c423d
I would ACK the other variant as well.
-
hebasto commented at 12:47 PM on March 29, 2023: member
I think we should move it the other direction, so the
*is part of the type and not part of the name.+1 on that. Especially in the case when this repo is a subtree in other C++ project (like Bitcoin Core), which uses the same convention.
-
sipa commented at 2:58 PM on April 7, 2023: contributor
utACK 3d1f430f9f32d45885b0a10b448c0f15386c423d. I have not verified these are the only instances where changes would need to be made.
In general, concept ACK on making these types consistent across the codebase. I have a slight preference for
*hugging the variable rather than the type, because it's closer to how the C semantics for types actually work, but consistency is more important than bike shedding this if there is disagreement. -
apoelstra commented at 3:23 PM on April 7, 2023: contributor
utACK 3d1f430 from me too. I also value consistency more than either specific choice.'
- real-or-random merged this on Apr 8, 2023
- real-or-random closed this on Apr 8, 2023
- sipa referenced this in commit e1552d578e on Apr 11, 2023
- sipa referenced this in commit c981671e9b on Apr 14, 2023
- hebasto referenced this in commit 49c52ea2b1 on May 13, 2023
- RandyMcMillan referenced this in commit 3cc75121b3 on May 27, 2023
- vmta referenced this in commit e1120c94a1 on Jun 4, 2023
- vmta referenced this in commit 8f03457eed on Jul 1, 2023
- delta1 referenced this in commit 3f32c20932 on Aug 8, 2023
- delta1 referenced this in commit 31ac0c1081 on Aug 31, 2023
- janus referenced this in commit 05145db5ff on Sep 3, 2023
- backpacker69 referenced this in commit e66b1bd882 on Mar 5, 2024
- div72 referenced this in commit af627d47c3 on Apr 12, 2025
- str4d referenced this in commit f634fc6004 on Jun 4, 2025
- Fabcien referenced this in commit 64f445de0f on Apr 16, 2026
- Fabcien referenced this in commit 64838c90e7 on Apr 16, 2026