We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f9c064 commit d2455b9Copy full SHA for d2455b9
torch/csrc/utils/python_compat.h
@@ -35,7 +35,11 @@ PyCode_GetNFreevars(PyCodeObject* code) {
35
}
36
37
// Provided by CPython but getting the header for them is very hard
38
+#if IS_PYTHON_3_11_PLUS
39
+PyAPI_FUNC(void) _PyWeakref_ClearRef(PyWeakReference* self);
40
+#else
41
extern void _PyWeakref_ClearRef(PyWeakReference* self);
42
+#endif
43
44
#ifdef __cplusplus
45
0 commit comments