Make it clear which functions that are intended to be translation unit local #13163

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:internal-linkage changing 43 files +226 −226
  1. practicalswift commented at 7:49 pm on May 3, 2018: contributor

    Make it clear which functions that are intended to be translation unit local.

    Do not share functions that are meant to be translation unit local with other translation units. Use internal linkage for those consistently.

  2. Make it clear which functions that are intended to be translation unit local
    Do not share functions that are meant to be translation unit local with
    other translation units. Use internal linkage for those consistently.
    c3f34d06be
  3. sipa commented at 10:51 pm on May 3, 2018: member

    utACK c3f34d06befa352acb343ad08337123d9474535f

    All this does is add static declarations to functions; if it compiles, it should be correct.

  4. fanquake added the label Refactoring on May 4, 2018
  5. fanquake commented at 2:23 am on May 4, 2018: member
    Tested that it compiles c3f34d0
  6. laanwj commented at 7:01 am on May 4, 2018: member

    Concept ACK - indeed, not exposing unnecessary symbols is good, it can speed up linking, and also allows the compiler to be smarter with inlining.

    Can we somehow verify that you got them all? In C, we’d use -Wmissing-prototypes but compilers don’t tend to support that for C++.

  7. promag commented at 8:17 am on May 4, 2018: member
    utACK c3f34d0. @laanwj better than that would be a check to detect unnecessary symbols in future PRs?
  8. practicalswift commented at 9:09 am on May 4, 2018: contributor

    This is how I created this PR:

    I wrote a really dumb three-line bash script which generated a candidate list of 460 functions that lacked static despite appearing to be translation unit local.

    I manually checked those 460 functions and removed the false positives. The remaining 226 functions were changed.

  9. laanwj commented at 9:13 am on May 4, 2018: member

    @practicalswift good enough for me. Just asking because I wouldn’t want PRs like this to be opened every day, there’s already so many maintenance PRs.

    utACK c3f34d06befa352acb343ad08337123d9474535f

  10. practicalswift commented at 9:20 am on May 4, 2018: contributor
    @laanwj Yes, I promise not to PR spam on this .-)
  11. MarcoFalke commented at 2:42 pm on May 4, 2018: member
    utACK c3f34d06befa352acb343ad08337123d9474535f
  12. Empact commented at 4:27 pm on May 4, 2018: member
    utACK c3f34d0
  13. MarcoFalke merged this on May 4, 2018
  14. MarcoFalke closed this on May 4, 2018

  15. MarcoFalke referenced this in commit f82e1c9482 on May 4, 2018
  16. jasonbcox referenced this in commit be756d0c7f on Jun 28, 2019
  17. jtoomim referenced this in commit 5f44f14f0b on Jun 29, 2019
  18. Mengerian referenced this in commit e8149e5398 on Jul 2, 2019
  19. Mengerian referenced this in commit d5a3ed098b on Jul 2, 2019
  20. Mengerian referenced this in commit 29185c9032 on Jul 2, 2019
  21. Mengerian referenced this in commit ad96d594f4 on Jul 2, 2019
  22. schancel referenced this in commit eb2266b3cd on Jul 5, 2019
  23. schancel referenced this in commit 7733c03f8c on Jul 5, 2019
  24. jonspock referenced this in commit e567c64a94 on Jul 6, 2019
  25. jonspock referenced this in commit 85c483cec9 on Jul 7, 2019
  26. jonspock referenced this in commit 4f51d749b6 on Jul 7, 2019
  27. proteanx referenced this in commit 75f2a3fca4 on Jul 7, 2019
  28. jonspock referenced this in commit d0f7c152c3 on Jul 9, 2019
  29. schancel referenced this in commit a6e7748423 on Jul 18, 2019
  30. schancel referenced this in commit befd21523d on Jul 18, 2019
  31. jonspock referenced this in commit d4c8797927 on Aug 29, 2019
  32. proteanx referenced this in commit 94a4b77415 on Sep 4, 2019
  33. str4d referenced this in commit 4277ef2063 on Jul 31, 2020
  34. zkbot referenced this in commit 5ef5d8d268 on Jul 31, 2020
  35. zkbot referenced this in commit 7d94064616 on Sep 29, 2020
  36. practicalswift deleted the branch on Apr 10, 2021
  37. UdjinM6 referenced this in commit af7a775981 on May 21, 2021
  38. UdjinM6 referenced this in commit 7475782bc0 on May 25, 2021
  39. gades referenced this in commit f371f81239 on Apr 21, 2022
  40. DrahtBot locked this on Aug 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 06:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me