Author: svn-role
Date: Tue Nov 19 04:00:09 2024
New Revision: 1921948

URL: http://svn.apache.org/viewvc?rev=1921948&view=rev
Log:
Merge r1921506 from trunk:

 * r1921506
   Make swig-rb compatible with SWIG 4.3.0.
   Justification:
     Ditto.
   Votes:
     +1: jun66j5, astieger

Modified:
    subversion/branches/1.14.x/   (props changed)
    subversion/branches/1.14.x/STATUS
    
subversion/branches/1.14.x/subversion/bindings/swig/include/svn_containers.swg
    subversion/branches/1.14.x/subversion/bindings/swig/include/svn_types.swg
    subversion/branches/1.14.x/subversion/bindings/swig/ruby/svn/core.rb
    subversion/branches/1.14.x/subversion/bindings/swig/svn_wc.i

Propchange: subversion/branches/1.14.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1921506

Modified: subversion/branches/1.14.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/STATUS?rev=1921948&r1=1921947&r2=1921948&view=diff
==============================================================================
--- subversion/branches/1.14.x/STATUS (original)
+++ subversion/branches/1.14.x/STATUS Tue Nov 19 04:00:09 2024
@@ -50,13 +50,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1921506
-   Make swig-rb compatible with SWIG 4.3.0.
-   Justification:
-     Ditto.
-   Votes:
-     +1: jun66j5, astieger
-
  * r1921505
    Make swig-py compatible with SWIG 4.3.0.
    Justification:
@@ -71,4 +64,3 @@ Approved changes:
      Ditto.
    Votes:
      +1: jun66j5, jcorvel
-

Modified: 
subversion/branches/1.14.x/subversion/bindings/swig/include/svn_containers.swg
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/bindings/swig/include/svn_containers.swg?rev=1921948&r1=1921947&r2=1921948&view=diff
==============================================================================
--- 
subversion/branches/1.14.x/subversion/bindings/swig/include/svn_containers.swg 
(original)
+++ 
subversion/branches/1.14.x/subversion/bindings/swig/include/svn_containers.swg 
Tue Nov 19 04:00:09 2024
@@ -310,7 +310,7 @@
 
 %typemap(out) apr_hash_t *PROPHASH
 {
-  %append_output(svn_swig_rb_apr_hash_to_hash_svn_string($1));
+  $result = svn_swig_rb_apr_hash_to_hash_svn_string($1);
 }
 #endif
 
@@ -326,10 +326,8 @@
 #ifdef SWIGRUBY
 %typemap(out) apr_hash_t *CHANGED_PATH_HASH
 {
-  VALUE rb_changed_path_hash;
-  rb_changed_path_hash =
+  $result =
     svn_swig_rb_apr_hash_to_hash_swig_type($1, "svn_log_changed_path_t *");
-  %append_output(rb_changed_path_hash);
 }
 
 %apply apr_hash_t *CHANGED_PATH_HASH {
@@ -760,7 +758,7 @@
 
 %typemap(out) apr_array_header_t *PROP_LIST
 {
-  %append_output(svn_swig_rb_prop_apr_array_to_hash_prop($1));
+  $result = svn_swig_rb_prop_apr_array_to_hash_prop($1);
 }
 
 %typemap(in) apr_array_header_t *PROP_LIST_MAY_BE_NULL
@@ -778,7 +776,7 @@
 
 %typemap(out) apr_array_header_t *PROP_LIST_MAY_BE_NULL
 {
-  %append_output($1 ? svn_swig_rb_prop_apr_array_to_hash_prop($1) : Qnil);
+  $result = $1 ? svn_swig_rb_prop_apr_array_to_hash_prop($1) : Qnil;
 }
 
 %apply apr_array_header_t *PROP_LIST {

Modified: 
subversion/branches/1.14.x/subversion/bindings/swig/include/svn_types.swg
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/bindings/swig/include/svn_types.swg?rev=1921948&r1=1921947&r2=1921948&view=diff
==============================================================================
--- subversion/branches/1.14.x/subversion/bindings/swig/include/svn_types.swg 
(original)
+++ subversion/branches/1.14.x/subversion/bindings/swig/include/svn_types.swg 
Tue Nov 19 04:00:09 2024
@@ -462,14 +462,29 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
 #endif
 
 #ifdef SWIGRUBY
-%typemap(out) svn_error_t *
+%typemap(out) svn_error_t * (VALUE *svn_presult = NULL)
 {
   if ($1) {
     svn_swig_rb_destroy_pool(_global_svn_swig_rb_pool);
     svn_swig_rb_pop_pool(_global_svn_swig_rb_pool);
     svn_swig_rb_handle_svn_error($1);
   }
-  $result = Qnil;
+  $result = rb_ary_new();
+  svn_presult = &$result;
+}
+
+%typemap(ret) svn_error_t *
+{
+  if (TYPE(*svn_presult) == T_ARRAY) {
+    switch (rb_array_len(*svn_presult)) {
+      case 0:
+        *svn_presult = Qnil;
+        break;
+      case 1:
+        *svn_presult = rb_ary_entry(*svn_presult, 0);
+        break;
+    }
+  }
 }
 #endif
 

Modified: subversion/branches/1.14.x/subversion/bindings/swig/ruby/svn/core.rb
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/bindings/swig/ruby/svn/core.rb?rev=1921948&r1=1921947&r2=1921948&view=diff
==============================================================================
--- subversion/branches/1.14.x/subversion/bindings/swig/ruby/svn/core.rb 
(original)
+++ subversion/branches/1.14.x/subversion/bindings/swig/ruby/svn/core.rb Tue 
Nov 19 04:00:09 2024
@@ -812,7 +812,7 @@ module Svn
       def diff(to, consider_inheritance=false)
         result = Core.rangelist_diff(self, to, consider_inheritance)
         deleted = result.pop
-        added = result
+        added = result.pop
         [added, deleted].collect do |result|
           self.class.new(*result)
         end

Modified: subversion/branches/1.14.x/subversion/bindings/swig/svn_wc.i
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/bindings/swig/svn_wc.i?rev=1921948&r1=1921947&r2=1921948&view=diff
==============================================================================
--- subversion/branches/1.14.x/subversion/bindings/swig/svn_wc.i (original)
+++ subversion/branches/1.14.x/subversion/bindings/swig/svn_wc.i Tue Nov 19 
04:00:09 2024
@@ -242,6 +242,8 @@
 {
   $result = $1 ? svn_swig_rb_svn_error_to_rb_error($1) : Qnil;
 }
+
+%typemap(ret) svn_error_t *err "";
 #endif
 
 


Reply via email to