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

Function IsPyUuid

python/pyarrow/src/arrow/python/helpers.cc:343–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341} // namespace
342
343bool IsPyUuid(PyObject* obj) {
344 uuid_runner.RunOnce([](OwnedRef& module) {
345 OwnedRef ref;
346 if (ImportFromModule(module.obj(), "UUID", &ref).ok()) {
347 uuid_UUID = ref.obj();
348 }
349 });
350 if (!uuid_UUID) return false;
351 int result = PyObject_IsInstance(obj, uuid_UUID);
352 if (result < 0) {
353 PyErr_Clear();
354 return false;
355 }
356 return result != 0;
357}
358
359namespace {
360

Callers 2

VisitMethod · 0.85
ConvertMethod · 0.85

Calls 3

ImportFromModuleFunction · 0.85
RunOnceMethod · 0.80
okMethod · 0.45

Tested by

no test coverage detected