We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3ebb0d commit 8dff51dCopy full SHA for 8dff51d
include/pybind11/pytypes.h
@@ -366,6 +366,7 @@ PYBIND11_NAMESPACE_BEGIN(detail)
366
std::string error_string();
367
std::string error_string(PyObject *&, PyObject *&, PyObject *&);
368
369
+// Equivalent to obj.__class__.__name__ (or obj.__name__ if obj is a class).
370
inline const char *obj_class_name(PyObject *obj) {
371
if (Py_TYPE(obj) == &PyType_Type) {
372
return reinterpret_cast<PyTypeObject *>(obj)->tp_name;
0 commit comments