Commit a0e3dac1 authored by Boxiang Sun's avatar Boxiang Sun

int positive function refcounting fixing

parent 125f19b2
......@@ -1036,7 +1036,7 @@ extern "C" Box* intPos(BoxedInt* v) {
raiseExcHelper(TypeError, "descriptor '__pos__' requires a 'int' object but received a '%s'", getTypeName(v));
if (v->cls == int_cls)
return v;
return incref(v);
return boxInt(v->n);
}
......
# expected: reffail
def f(x):
print x, not x, ~x, +x, -x
......
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