Commit 5c0bad8d authored by Jeremy Hylton's avatar Jeremy Hylton

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.
parent d6750225
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment