Skip to content

Put utils in a namespace so its symbols don't clash with applications - #156

Merged
ethindp merged 1 commit into
ethindp:masterfrom
trypsynth:namespace-utils
Oct 7, 2026
Merged

ethindp merged 1 commit into
ethindp:masterfrom
trypsynth:namespace-utils

Conversation

@trypsynth

Copy link
Copy Markdown
Contributor

range_convert and range_convert_midpoint in source/utils.cpp came from NVGT, and they have external linkage. When NVGT links Prism statically, the linker finds two definitions of each function and the link fails.

This change puts the declarations and definitions in utils.h and utils.cpp into the prism::detail namespace. Using-declarations at the end of utils.h keep the old names available to the backends, so no call sites change. fill_frame_db stays in the global namespace because simd_kernels.cpp defines it there.

@ethindp

ethindp commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Thanks, I didn't realize when I pulled these in that they had external linkage (since they shouldn't and should be an implementation detail).

@ethindp
ethindp merged commit e2637ca into ethindp:master Oct 7, 2026
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants