MCPcopy Create free account
hub / github.com/apache/arrow / closed

Method closed

python/pyarrow/src/arrow/python/io.cc:73–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 }
72
73 bool closed() const {
74 if (!file_) {
75 return true;
76 }
77 PyObject* result = PyObject_GetAttrString(file_.obj(), "closed");
78 if (result == NULL) {
79 // Can't propagate the error, so write it out and return an arbitrary value
80 PyErr_WriteUnraisable(NULL);
81 return true;
82 }
83 int ret = PyObject_IsTrue(result);
84 Py_XDECREF(result);
85 if (ret < 0) {
86 PyErr_WriteUnraisable(NULL);
87 return true;
88 }
89 return ret != 0;
90 }
91
92 Status Seek(int64_t position, int whence) {
93 RETURN_NOT_OK(CheckClosed());

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected