container.cc
2.58 KB
-
[PY][FFI] Introduce PyNativeObject, enable runtime.String to subclass str (#5426) · e68450da
To make runtime.String to work as naturally as possible in the python side, we make it sub-class the python's str object. Note that however, we cannot sub-class Object at the same time due to python's type layout constraint. We introduce a PyNativeObject class to handle this kind of object sub-classing and updated the FFI to handle PyNativeObject classes.
Tianqi Chen committed