mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Hide torch_python symbols (#142214)
Change symbols in torch_python to invisible by default on platforms other than Apple. Pull Request resolved: https://github.com/pytorch/pytorch/pull/142214 Approved by: https://github.com/ezyang
This commit is contained in:
@ -46,6 +46,7 @@
|
||||
#include <torch/csrc/Dtype.h>
|
||||
#include <torch/csrc/DynamicTypes.h>
|
||||
#include <torch/csrc/Event.h>
|
||||
#include <torch/csrc/Export.h>
|
||||
#include <torch/csrc/Generator.h>
|
||||
#include <torch/csrc/Layout.h>
|
||||
#include <torch/csrc/MemoryFormat.h>
|
||||
@ -1717,7 +1718,7 @@ class WeakTensorRef {
|
||||
}
|
||||
};
|
||||
|
||||
extern "C" C10_EXPORT PyObject* initModule();
|
||||
extern "C" TORCH_PYTHON_API PyObject* initModule();
|
||||
// separate decl and defn for msvc error C2491
|
||||
PyObject* initModule() {
|
||||
HANDLE_TH_ERRORS
|
||||
|
Reference in New Issue
Block a user