blob: b9c4c4bd2b212be3dd6f3b032170916d9a405043 [file] [log] [blame]
#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