~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 3628.1.1.

  • Committer: Lukáš Lalinský
  • Date: 2008-08-17 19:31:03 UTC
  • mto: (3650.1.1 bzr.ab.integration)
  • mto: This revision was merged to the branch mainline in revision 3651.
  • Revision ID: lalinsky@gmail.com-20080817193103-nph9o92j2177iq96
Handle references to line data in _patiencediff_c.c properly

This code is called in bzrlib only with lists or tuples of strings, which works fine, because PySequence_Fast always returns the same object and so the items from PySequence_Fast_GET_ITEM will not be deleted until the original sequence is deleted. But if it's called with a sequence than needs to be converted to list (e.g. PyUnicode), the items will be garbage collected in the contructor and still used later in code (which leads to segfaults).

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: