pytorch
4b1310bf - suppress `-Wcast-function-type-strict` when casting to PyCFunction (#100068)

Commit
1 year ago
suppress `-Wcast-function-type-strict` when casting to PyCFunction (#100068) suppress `-Wcast-function-type-strict` when casting to PyCFunction Summary: These casts are a necessary evil due to the design of Python. Python ultimately casts it back to the original type based on the flags specified in the `PyMethodDef`. Nevertheless, the new Clang flag `-Wcast-function-type-strict` breaks with this. While here, convert the cast to a `reinterpret_cast`. Test Plan: Should be a no-op. Rely on CI. Pull Request resolved: https://github.com/pytorch/pytorch/pull/100068 Approved by: https://github.com/Skylion007
Author
Committer
Parents
Loading