Major reformatting of code along with a few sundry changes.
Summary of changes: - Add function gc_all_items() to call gc_item() on everything in dict. This factors out common code in all the gc methods. - Add check_size() function that factors out code to check cache size before starting a gc. - Simplify argument processing in cc_invalidate(), avoiding a second call to PyArg_ParseTuple() when argument is a sequence instead of a dictionary. - Chance code to reflect belief that NULL return from PyDict_GetItem() does not set exception, except in cases that don't apply for the pickle cache like comparing a string with high-order bit set to a Unicode object. - Use if (!expr) instead of UNLESS(). - Remove all statements from conditionals. - Reformat to 4 spaces and Python-style brace placement. - Put whitespace around operators and after commas.
Showing
Please register or sign in to comment