<div dir="ltr">I think this is not the place to be discussing the patch (the tracker is), but while I think of it, I'll just say:<br><br>You need to DECREF the fn variable (both <a href="http://www.python.org/doc/api/object.html">PyObject_GetAttrString</a> and <a href="http://www.python.org/doc/api/stringObjects.html">PyString_FromString</a> return new references). If this makes no sense, read up on reference counting (<a href="http://docs.python.org/ext/refcounts.html">http://docs.python.org/ext/refcounts.html</a>, <a href="http://www.python.org/doc/api/countingRefs.html">http://www.python.org/doc/api/countingRefs.html</a>).<br>
<pre>....<br>+                         PyString_AsString(name),<br>+ PyString_AsString(fn));<br>+ Py_DECREF(fn);<br>         }<br></pre>Also:<br><ul><li>Do you really want "?" if you can't get the filename for some reason -- why not just not say anything?</li>
<li>Perhaps don't create a new variable "fn", use one of the many defined at the top of the eval function.<br></li></ul>Otherwise, looks like it will do the job.<br><br>But I haven't tested it, just eyeballed it.<br>
<br>Matt<br></div>