<div class="gmail_quote">2011/9/28 Alex Pyattaev <span dir="ltr">&lt;<a href="mailto:alex.pyattaev@gmail.com">alex.pyattaev@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":51">     <span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">Py_XINCREF(resultobj);</span></div></blockquote></div><div><br></div><div>What is this call doing? <span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; ">It should not be necessary, since you called PyTuple_New.</span></div>
<div><font color="#222222" face="arial, sans-serif">This may explain why it does not crash with CPython: the tuple object always leaks but happens to keep the necessary reference to the global object.</font></div><div><font color="#222222" face="arial, sans-serif">(PyPy does not use refcounting in tuples, so behaviour differs)</font></div>
<div><font color="#222222" face="arial, sans-serif"><br></font></div><div><div>If you fix the tuple leak, you will certainly see that CPython needs the additional <span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "> Py_XINCREF($1-&gt;node_tx)</span> as well...</div>
<div><br></div>-- <br>Amaury Forgeot d&#39;Arc<br>
</div>