Commit 6e17f0e0 authored by Boxiang Sun's avatar Boxiang Sun

add nonzero attributes to NotImplemented class

parent e9152be5
...@@ -1869,6 +1869,7 @@ void setupBuiltins() { ...@@ -1869,6 +1869,7 @@ void setupBuiltins() {
notimplemented_cls->giveAttr("__repr__", notimplemented_cls->giveAttr("__repr__",
new BoxedFunction(FunctionMetadata::create((void*)notimplementedRepr, STR, 1))); new BoxedFunction(FunctionMetadata::create((void*)notimplementedRepr, STR, 1)));
notimplemented_cls->freeze(); notimplemented_cls->freeze();
notimplemented_cls->instances_are_nonzero = true;
NotImplemented = new (notimplemented_cls) Box(); NotImplemented = new (notimplemented_cls) Box();
gc::registerPermanentRoot(NotImplemented); gc::registerPermanentRoot(NotImplemented);
......
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