svn commit: r1928521 - subversion/trunk/subversion/bindings/swig

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <175808498429.2791621.4672391792455893307@svn02-us-east.apache.org>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.