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: You need to DECREF the fn variable (both PyObject_GetAttrString<http://www.python.org/doc/api/object.html>and PyString_FromString <http://www.python.org/doc/api/stringObjects.html>return new references). If this makes no sense, read up on reference counting (http://docs.python.org/ext/refcounts.html, http://www.python.org/doc/api/countingRefs.html). .... + PyString_AsString(name), + PyString_AsString(fn)); + Py_DECREF(fn); } Also: - Do you really want "?" if you can't get the filename for some reason -- why not just not say anything? - Perhaps don't create a new variable "fn", use one of the many defined at the top of the eval function. Otherwise, looks like it will do the job. But I haven't tested it, just eyeballed it. Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20080820/3359b6a0/attachment-0001.htm>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4