| 150 | } |
| 151 | |
| 152 | Result<int64_t> Tell() { |
| 153 | RETURN_NOT_OK(CheckClosed()); |
| 154 | |
| 155 | PyObject* result = cpp_PyObject_CallMethod(file_.obj(), "tell", "()"); |
| 156 | PY_RETURN_IF_ERROR(StatusCode::IOError); |
| 157 | |
| 158 | int64_t position = PyLong_AsLongLong(result); |
| 159 | Py_DECREF(result); |
| 160 | |
| 161 | // PyLong_AsLongLong can raise OverflowError |
| 162 | PY_RETURN_IF_ERROR(StatusCode::IOError); |
| 163 | return position; |
| 164 | } |
| 165 | |
| 166 | std::mutex& lock() { return lock_; } |
| 167 |
nothing calls this directly
no test coverage detected