Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8)

Issue 91044: Fix the last regression shown by cvs2svn (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 11 months ago by Collin Winter
Modified:
16 years, 10 months ago
Reviewers:
Jeffrey Yasskin
CC:
unladen-swallow_googlegroups.com
Base URL:
http://unladen-swallow.googlecode.com/svn/trunk/
Visibility:
Public.

Description

We need to hold a reference to the memoized object in the Pickler for as long as the Pickler lives. With this applied, all of cvs2svn's tests that pass under mainline 2.6.1 pass under Unladen Swallow.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -33 lines) Patch
M Modules/_testcapimodule.c View 2 chunks +31 lines, -23 lines 1 comment Download
M Modules/cPickle.c View 12 chunks +23 lines, -10 lines 1 comment Download

Messages

Total messages: 2
Collin Winter
PTAL
16 years, 11 months ago (2009-07-03 00:10:28 UTC) #1
Jeffrey Yasskin
16 years, 11 months ago (2009-07-03 01:32:59 UTC) #2
LGTM

http://codereview.appspot.com/91044/diff/1/2
File Modules/_testcapimodule.c (right):

http://codereview.appspot.com/91044/diff/1/2#newcode834
Line 834: Py_DECREF(three);  /* The memo table takes its own reference. */
This comment seems unnecessary, since incref'ing on insertion is pretty common
in Python. On the other hand, you should have a test that checks that the
objects aren't deallocated while they're in the memotable.

http://codereview.appspot.com/91044/diff/1/3
File Modules/cPickle.c (right):

http://codereview.appspot.com/91044/diff/1/3#newcode382
Line 382: Py_ssize_t i;
Just call PyMemoTable_Clear()? The extra memset shouldn't cost that much since
everything was just decref'ed, and it might even be optimized away.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b