Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
ToolboxLib ToolboxLib
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • RiscOS
    • SSources
  • Toolbox
  • ToolboxLibToolboxLib
  • Merge requests
  • !3

Merged
Created Jun 09, 2020 by Ben Avison@bavisonDeveloper

Const correctness of arg to toolbox_template_lookup()

  • Overview 1
  • Commits 1
  • Changes 2

The pointer whose address is passed in argument hdr will, on exit, point into memory that is managed by the Toolbox module, and which therefore should not be written by the callee (for example the module should be within its rights to re-use the same location to service another similar call). The pointer should therefore have type const ObjectTemplateHeader *, so hdr should have type const ObjectTemplateHeader ** to save well-behaved clients from having to use a typecast.

If nobody has any major objections to this, I have matching tweaks to the callers of the function in Config2Main, FilrSetup, PinSetup, ScrnSetup, SndSetup, and WindSetup ready to merge also.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: ConstTemplates