Merge return-value handling into c-call