1 | #include <c10/core/SafePyObject.h> |
---|---|
2 | |
3 | namespace c10 { |
4 | |
5 | PyObject* SafePyObject::ptr(const c10::impl::PyInterpreter* interpreter) const { |
6 | TORCH_INTERNAL_ASSERT(interpreter == pyinterpreter_); |
7 | return data_; |
8 | } |
9 | |
10 | PyObject* SafePyHandle::ptr(const c10::impl::PyInterpreter* interpreter) const { |
11 | TORCH_INTERNAL_ASSERT(interpreter == pyinterpreter_); |
12 | return data_; |
13 | } |
14 | |
15 | } // namespace c10 |
16 |