| 74 | static const char* kExtensionName = "arrow.py_extension_type"; |
| 75 | |
| 76 | std::string PyExtensionType::ToString(bool show_metadata) const { |
| 77 | PyAcquireGIL lock; |
| 78 | |
| 79 | std::stringstream ss; |
| 80 | OwnedRef instance(GetInstance()); |
| 81 | ss << "extension<" << this->extension_name() << "<" << Py_TYPE(instance.obj())->tp_name |
| 82 | << ">>"; |
| 83 | return ss.str(); |
| 84 | } |
| 85 | |
| 86 | PyExtensionType::PyExtensionType(std::shared_ptr<DataType> storage_type, PyObject* typ, |
| 87 | PyObject* inst) |