pytorch/c10/core/SafePyObject.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
384 B
C++
Raw Normal View History

#include <c10/core/SafePyObject.h>
namespace c10 {
PyObject* SafePyObject::ptr(const c10::impl::PyInterpreter* interpreter) const {
TORCH_INTERNAL_ASSERT(interpreter == pyinterpreter_);
return data_;
}
PyObject* SafePyHandle::ptr(const c10::impl::PyInterpreter* interpreter) const {
TORCH_INTERNAL_ASSERT(interpreter == pyinterpreter_);
return data_;
}
} // namespace c10