Commit 231ac3c9 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Whoops, need to do this after the call

parent 27f855a6
......@@ -319,9 +319,6 @@ Box* BoxedMethodDescriptor::tppCall(Box* _self, CallRewriteArgs* rewrite_args, A
if (!rewrite_success)
rewrite_args = NULL;
if (rewrite_args && oargs)
decrefOargs(rewrite_args->args, oargs_owned, 1);
if (ml_flags & METH_CLASS) {
rewrite_args = NULL;
if (!PyType_Check(arg1))
......@@ -402,6 +399,9 @@ Box* BoxedMethodDescriptor::tppCall(Box* _self, CallRewriteArgs* rewrite_args, A
if (!rtn)
throwCAPIException();
if (rewrite_args && oargs)
decrefOargs(rewrite_args->args, oargs_owned, 1);
if (rewrite_args) {
rewrite_args->rewriter->checkAndThrowCAPIException(rewrite_args->out_rtn);
rewrite_args->out_success = true;
......
......@@ -772,13 +772,13 @@ static Box* typeCallInner(CallRewriteArgs* rewrite_args, ArgPassSpec argspec, Bo
if (!rewrite_success)
rewrite_args = NULL;
if (rewrite_args)
decrefOargs(rewrite_args->args, oargs_owned, 1);
if (rewrite_args) {
rewrite_args->out_rtn
= rewrite_args->rewriter->call(true, (void*)unicodeNewHelper, rewrite_args->arg1, rewrite_args->arg2,
rewrite_args->arg3, rewrite_args->args)->setType(RefType::OWNED);
decrefOargs(rewrite_args->args, oargs_owned, 1);
rewrite_args->out_success = true;
}
......
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