Skip to content

Commit a074af8

Browse files
author
Roderich Schupp
committed
* subversion/bindings/swig/include/svn_types.swg:
Bracket calls with PUTBACK/SPAGAIN to helper functions that call back into Perl: - svn_swig_pl_make_stream - svn_swig_pl_from_stream - svn_swig_pl_from_md5 Note: calls in typemaps need only SPAGAIN. git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1683266 13f79535-47bb-0310-9956-ffa450edef68
1 parent e879416 commit a074af8

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

subversion/bindings/swig/include/svn_types.swg

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -935,15 +935,24 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
935935
#ifdef SWIGPERL
936936
%typemap(in) svn_stream_t * {
937937
svn_swig_pl_make_stream (&$1, $input);
938+
SPAGAIN;
938939
}
939940

940941
%typemap(out) svn_stream_t * {
941-
$result = svn_swig_pl_from_stream ($1);
942+
SV* tmp;
943+
PUTBACK;
944+
tmp = svn_swig_pl_from_stream ($1);
945+
SPAGAIN;
946+
$result = tmp;
942947
argvi++;
943948
}
944949

945950
%typemap(argout) svn_stream_t ** {
946-
%append_output(svn_swig_pl_from_stream(*$1));
951+
SV *tmp;
952+
PUTBACK;
953+
tmp = svn_swig_pl_from_stream(*$1);
954+
SPAGAIN;
955+
%append_output(tmp);
947956
}
948957
#endif
949958

@@ -1116,7 +1125,11 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
11161125
}
11171126

11181127
%typemap(argout) unsigned char *result_digest {
1119-
%append_output(svn_swig_pl_from_md5($1));
1128+
SV *tmp;
1129+
PUTBACK;
1130+
tmp = svn_swig_pl_from_md5($1);
1131+
SPAGAIN;
1132+
%append_output(tmp);
11201133
}
11211134
#endif
11221135

0 commit comments

Comments
 (0)