◐ Shell
clean mode source ↗

Replace unsafe pointer cast with PyMutex in PyCode by youknowone · Pull Request #7055 · RustPython/RustPython

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

coderabbitai[bot]

Add `source_path: PyMutex<&'static PyStrInterned>` field to
`PyCode` for interior mutability, replacing the UB-inducing
`#[allow(invalid_reference_casting)]` + `write_volatile` pattern
in `update_code_filenames`. Update all read sites across the
codebase to use the new `source_path()` accessor method.

coderabbitai[bot]

Comment on lines 254 to 256