mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
This reverts commit 642f4ed606.
Reverted https://github.com/pytorch/pytorch/pull/100170 on behalf of https://github.com/atalman due to breaking internal builds ([comment](https://github.com/pytorch/pytorch/pull/100170#issuecomment-1540140636))
13 lines
385 B
C
13 lines
385 B
C
#pragma once
|
|
|
|
#include <c10/macros/Macros.h>
|
|
|
|
#include <Python.h>
|
|
|
|
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<PyCFunction>(func);
|
|
C10_DIAGNOSTIC_POP()
|
|
C10_DIAGNOSTIC_POP()
|
|
}
|