Commit d42e89aa authored by sizeoftank's avatar sizeoftank

Add type.__basicsize__, type.__itemsize__

parent f2bf812d
# expected: fail
# Python test set -- part 6, built-in types
from test.test_support import run_unittest, have_unicode, run_with_locale, \
......
......@@ -4353,6 +4353,8 @@ void setupRuntime() {
type_cls->tp_hash = (hashfunc)_Py_HashPointer;
type_cls->giveAttrDescriptor("__module__", type_module, type_set_module);
type_cls->giveAttrMember("__mro__", T_OBJECT, offsetof(BoxedClass, tp_mro));
type_cls->giveAttrMember("__basicsize__", T_PYSSIZET, offsetof(BoxedClass, tp_basicsize));
type_cls->giveAttrMember("__itemsize__", T_PYSSIZET, offsetof(BoxedClass, tp_itemsize));
type_cls->giveAttrMember("__flags__", T_LONG, offsetof(BoxedClass, tp_flags));
type_cls->giveAttr("__subclasses__",
new BoxedFunction(FunctionMetadata::create((void*)typeSubclasses, UNKNOWN, 1)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment