db-move: moved seahorse from [testing] to [extra] (x86_64)
[arch-packages.git] / subversion / repos / extra-x86_64 / subversion-1.14.2-swig-py-Fix-conditionals-by-SWIG-version-and-by-Pyth.patch
blob3478f2c043d5b7b38b32ec1d8d490693c7c6c2cb
1 From 8ff4cfd06ce554e9df31a088c9d09f45278c6de4 Mon Sep 17 00:00:00 2001
2 From: Yasuhito Futatsuki <futatuki@apache.org>
3 Date: Tue, 20 Sep 2022 12:57:06 +0000
4 Subject: [PATCH] swig-py: Fix conditionals by SWIG version and by Python
5 version for proxy code.
7 We are using different code for proxy object, by Python version and by SWIG
8 version. The distinguish between Python 2 and Python 3 was done by SWIG
9 macro "SWIGPYTHON_PY3". However, the macro was dropped since SWIG commit
10 a343b7e[1], between SWIG 4.0.2 release and upcoming SWIG 4.1.0 release.
12 As we already dropped support for the combination of SWIG >= 4.0 and Python 2,
13 we should detect Python 2 only in SWIG < 4.0 case. So we can rely on the macro
14 only in the case.
16 * subversion/bindings/swig/include/proxy.swg ():
17 Reorder the conditionals distinguish SWIG versions and Python versions,
18 as described above.
20 Found by: Jitka Plesnikova (jplesnik {_AT_} redhat.com)
22 Suggested by: Julien Schueller (schueller {_AT_} phimeca.com) [2]
24 [1] https://github.com/swig/swig/commit/a343b7e254567a64761bc1be7dc55b7b7424ec52
25 [2] https://github.com/swig/swig/issues/2373#issuecomment-1250997124
28 git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1904167 13f79535-47bb-0310-9956-ffa450edef68
29 ---
30 subversion/bindings/swig/include/proxy.swg | 4 +---
31 1 file changed, 1 insertion(+), 3 deletions(-)
33 diff --git a/subversion/bindings/swig/include/proxy.swg b/subversion/bindings/swig/include/proxy.swg
34 index ac67d434ca..7d2d0dd033 100644
35 --- a/subversion/bindings/swig/include/proxy.swg
36 +++ b/subversion/bindings/swig/include/proxy.swg
37 @@ -66,7 +66,6 @@
38 fn()
41 -#if defined(SWIGPYTHON_PY3)
42 #if SWIG_VERSION >= 0x040000
43 %pythoncode %{
44 # -classic and -modern options have been dropped and this variable
45 @@ -76,7 +75,7 @@
46 _set_instance_attr = _swig_setattr_nondynamic_instance_variable(object.__setattr__)
49 -#else
50 +#elif defined(SWIGPYTHON_PY3)
51 %pythoncode %{
52 # SWIG classes generated with -modern do not define this variable
53 try:
54 @@ -90,7 +89,6 @@
55 _set_instance_attr = _swig_setattr_nondynamic_method(object.__setattr__)
58 -#endif
59 #else
60 %pythoncode %{
61 # SWIG classes generated with -classic do not define this variable,
62 --
63 2.37.3