#pragma once #include #include inline PyCFunction castPyCFunctionWithKeywords(PyCFunctionWithKeywords func) { C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wcast-function-type") C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wcast-function-type-strict") return reinterpret_cast(func); C10_DIAGNOSTIC_POP() C10_DIAGNOSTIC_POP() }