wesm commented on a change in pull request #7537:
URL: https://github.com/apache/arrow/pull/7537#discussion_r445221159
##########
File path: cpp/src/arrow/python/helpers.cc
##########
@@ -254,14 +255,45 @@ bool PyFloat_IsNaN(PyObject* obj) {
return PyFloat_Check(obj) && std::isnan(PyFloat_AsDouble(obj));
}
+namespace {
+
+static std::once_flag pandas_static_initialized;
+static OwnedRef pandas_NaTType;
Review comment:
@pitrou this seemed worrisome to me so could use your advice about how
to import this symbol once and then have it persist. Another option is that I
could immediately decref the object returned by `PyObject_Type` and put a
`PyObject*` here with the near certainty that this object will remain alive
until the end of the Python session
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]