Commit 4c59b7c7 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #1130 from Daetalus/ref_nexedi_intPos

int positive function refcounting fixing
parents dbe3767a a0e3dac1
......@@ -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