Commit b5f3a74e authored by Boxiang Sun's avatar Boxiang Sun

minor refcounting annotation fixing in int.__abs__

parent ea7fe5c2
...@@ -1092,7 +1092,7 @@ Box* intAbs(BoxedInt* v) { ...@@ -1092,7 +1092,7 @@ Box* intAbs(BoxedInt* v) {
raiseExcHelper(TypeError, "descriptor '__abs__' requires a 'int' object but received a '%s'", getTypeName(v)); raiseExcHelper(TypeError, "descriptor '__abs__' requires a 'int' object but received a '%s'", getTypeName(v));
if (v->n == PYSTON_INT_MIN) { if (v->n == PYSTON_INT_MIN) {
return longNeg(boxLong(v->n)); return longNeg(autoDecref(boxLong(v->n)));
} }
return boxInt(std::abs(v->n)); return boxInt(std::abs(v->n));
} }
......
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