Atomically allocate the next function version, returning 0 if exhausted. Once the counter wraps to 0, it stays at 0 permanently.
()
| 83 | /// Atomically allocate the next function version, returning 0 if exhausted. |
| 84 | /// Once the counter wraps to 0, it stays at 0 permanently. |
| 85 | fn next_func_version() -> u32 { |
| 86 | FUNC_VERSION_COUNTER |
| 87 | .fetch_update(Relaxed, Relaxed, |v| (v != 0).then(|| v.wrapping_add(1))) |
| 88 | .unwrap_or(0) |
| 89 | } |
| 90 | |
| 91 | unsafe impl Traverse for PyFunction { |
| 92 | fn traverse(&self, tracer_fn: &mut TraverseFn<'_>) { |
no test coverage detected