Peter Johnson (peter@tortall.net) weakref patch
I recently ran into this problem myself (as the current code causes Python to crash), so I whipped up a quick patch that fixes it for me. I think it follows all of the weakref guidelines now. The patch is against the LXML svn pyrex (http://codespeak.net/svn/lxml/pyrex/). Is there a different SVN I should be pointing to? It patches functions generate_new_function, generate_dealloc_function, generate_traverse_function, and generate_clear_function. The patch just compares the entry.name against "__weakref__"; this could probably be centralized in the Entry object if so desired.
Showing
Please register or sign in to comment