Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
e2a8b418
Commit
e2a8b418
authored
Jan 23, 2020
by
peterjc123
Committed by
Francisco Massa
Jan 22, 2020
Browse files
Fix Windows build by renaming Python init functions (#1779)
parent
8f4f8d89
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
torchvision/csrc/vision.cpp
torchvision/csrc/vision.cpp
+5
-5
No files found.
torchvision/csrc/vision.cpp
View file @
e2a8b418
...
...
@@ -14,18 +14,18 @@
#include "nms.h"
// If we are in a Windows environment, we need to define
// initialization functions for the _
custom_ops
extension
// initialization functions for the _
C
extension
#ifdef _WIN32
#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC
init_
custom_ops
(
void
)
{
PyMODINIT_FUNC
init_
C
(
void
)
{
// No need to do anything.
//
_custom_ops
.py will run on load
//
extension
.py will run on load
return
NULL
;
}
#else
PyMODINIT_FUNC
PyInit__
custom_ops
(
void
)
{
PyMODINIT_FUNC
PyInit__
C
(
void
)
{
// No need to do anything.
//
_custom_ops
.py will run on load
//
extension
.py will run on load
return
NULL
;
}
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment