diff options
Diffstat (limited to 'subversion/bindings/swig/python/svn/repos.py')
-rw-r--r-- | subversion/bindings/swig/python/svn/repos.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/subversion/bindings/swig/python/svn/repos.py b/subversion/bindings/swig/python/svn/repos.py index 486a850..f075acf 100644 --- a/subversion/bindings/swig/python/svn/repos.py +++ b/subversion/bindings/swig/python/svn/repos.py @@ -336,5 +336,16 @@ class ParseFns3: pass -def make_parse_fns3(parse_fns3, pool=None): - return svn_swig_py_make_parse_fns3(parse_fns3, pool) +def make_parse_fns3(parse_fns3, pool=None, baton=None): + from libsvn.delta import _AncBaton + + class _ParseBaton(_AncBaton): + # Drive _close_dumpstream method when the instance is deleted. + # For backward compatibility before Subversion 1.15, we call it even if + # the instance would not be used by C API, or the C API would cause + # some error. + def __del__(self): + self.editor._close_dumpstream() + + parse_baton = _ParseBaton(parse_fns3, pool, baton) + return svn_swig_py_make_parse_fns3(pool), parse_baton |