Author: futatuki
Date: Wed Sep 17 04:56:23 2025
New Revision: 1928521
Log:
swig-py: follow up to r1912500: Fix NameError on using old SWIG
As some old version of SWIG does not import libsvn.core or core sub-module
in generated svn_delta.py, it need to import libsvn.core before using
libsvn.core.svn_pool_create().
* subversion/bindings/swig/svn_delta.i (SWIGPYTHON: _ItemBaton.__init__):
Import libsvn.core explicitly.
Modified:
subversion/trunk/subversion/bindings/swig/svn_delta.i
Modified: subversion/trunk/subversion/bindings/swig/svn_delta.i
==============================================================================
--- subversion/trunk/subversion/bindings/swig/svn_delta.i Wed Sep 17
04:20:02 2025 (r1928520)
+++ subversion/trunk/subversion/bindings/swig/svn_delta.i Wed Sep 17
04:56:23 2025 (r1928521)
@@ -208,6 +208,7 @@ void _ops_get(int *num_ops, const svn_tx
# Baton container class for editor/parse_fns3 batons and their decendants.
class _ItemBaton:
def __init__(self, editor, pool, baton=None):
+ import libsvn.core
self.pool = pool if pool else libsvn.core.svn_pool_create()
self.baton = baton
self.editor = editor