Skip to content

Commit ad61f63

Browse files
committed
Fix Windows build by renaming Python init functions
1 parent c5e972a commit ad61f63

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

torchvision/csrc/vision.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
#include "nms.h"
1515

1616
// If we are in a Windows environment, we need to define
17-
// initialization functions for the _custom_ops extension
17+
// initialization functions for the _C extension
1818
#ifdef _WIN32
1919
#if PY_MAJOR_VERSION < 3
20-
PyMODINIT_FUNC init_custom_ops(void) {
20+
PyMODINIT_FUNC init_C(void) {
2121
// No need to do anything.
22-
// _custom_ops.py will run on load
22+
// extension.py will run on load
2323
return NULL;
2424
}
2525
#else
26-
PyMODINIT_FUNC PyInit__custom_ops(void) {
26+
PyMODINIT_FUNC PyInit__C(void) {
2727
// No need to do anything.
28-
// _custom_ops.py will run on load
28+
// extension.py will run on load
2929
return NULL;
3030
}
3131
#endif

0 commit comments

Comments
 (0)