| 1610 | |
| 1611 | /// Return a type handle from a handle or an object |
| 1612 | static handle handle_of(handle h) { |
| 1613 | return handle(reinterpret_cast<PyObject *>(Py_TYPE(h.ptr()))); |
| 1614 | } |
| 1615 | |
| 1616 | /// Return a type object from a handle or an object |
| 1617 | static type of(handle h) { return type(type::handle_of(h), borrowed_t{}); } |