summaryrefslogtreecommitdiff
path: root/subversion/bindings/swig/include/svn_types.swg
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/bindings/swig/include/svn_types.swg')
-rw-r--r--subversion/bindings/swig/include/svn_types.swg98
1 files changed, 54 insertions, 44 deletions
diff --git a/subversion/bindings/swig/include/svn_types.swg b/subversion/bindings/swig/include/svn_types.swg
index b2c7fb5..e6f5bb1 100644
--- a/subversion/bindings/swig/include/svn_types.swg
+++ b/subversion/bindings/swig/include/svn_types.swg
@@ -71,8 +71,8 @@
#ifdef SWIGPYTHON
%typemap(argout) SWIGTYPE **OUTPARAM {
- %append_output(svn_swig_NewPointerObj(*$1, $*1_descriptor,
- _global_py_pool, args));
+ %append_output(svn_swig_py_new_pointer_obj(*$1, $*1_descriptor,
+ _global_py_pool, args));
}
#else
%typemap(argout) SWIGTYPE **OUTPARAM {
@@ -146,7 +146,8 @@
/* svn_repos */
svn_authz_t **,
svn_repos_t **,
- const svn_repos_parse_fns2_t **,
+ const svn_repos_parse_fns3_t **,
+ const svn_repos_parser_fns2_t **,
const svn_repos_parser_fns_t **,
void **parse_baton,
void **revision_baton,
@@ -262,7 +263,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
%define %callback_typemap(CallbackFunction, CallbackBaton,
PythonThunk, PerlThunk, RubyThunk)
%typemap(in) (CallbackFunction, CallbackBaton) {
- $1 = PythonThunk;
+ $1 = ($1_ltype) PythonThunk;
$2 = $input;
}
%enddef
@@ -270,7 +271,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
PythonThunk, PerlThunk, RubyThunk)
%typemap(in) (CallbackFunction, CallbackBaton) {
/* FIXME: Handle the NULL case. */
- $1 = PythonThunk;
+ $1 = ($1_ltype) PythonThunk;
$2 = $input;
}
%enddef
@@ -280,7 +281,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
%define %callback_typemap(CallbackFunction, CallbackBaton,
PythonThunk, PerlThunk, RubyThunk)
%typemap(in) (CallbackFunction, CallbackBaton) {
- $1 = PerlThunk;
+ $1 = ($1_ltype) PerlThunk;
$2 = $input;
}
%enddef
@@ -288,10 +289,10 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
PythonThunk, PerlThunk, RubyThunk)
%typemap(in) (CallbackFunction, CallbackBaton) {
if (SvOK($input)) {
- $1 = PerlThunk;
+ $1 = ($1_ltype) PerlThunk;
$2 = $input;
} else {
- $1 = NULL;
+ $1 = ($1_ltype) NULL;
$2 = NULL;
}
}
@@ -302,7 +303,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
%define %callback_typemap(CallbackFunction, CallbackBaton,
PythonThunk, PerlThunk, RubyThunk)
%typemap(in) (CallbackFunction, CallbackBaton) {
- $1 = RubyThunk;
+ $1 = ($1_ltype) RubyThunk;
$2 = (void *)svn_swig_rb_make_baton($input, _global_svn_swig_rb_pool);
}
%enddef
@@ -310,10 +311,10 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
PythonThunk, PerlThunk, RubyThunk)
%typemap(in) (CallbackFunction, CallbackBaton) {
if (NIL_P($input)) {
- $1 = NULL;
+ $1 = ($1_ltype) NULL;
$2 = NULL;
} else {
- $1 = RubyThunk;
+ $1 = ($1_ltype) RubyThunk;
$2 = (void *)svn_swig_rb_make_baton($input, _global_svn_swig_rb_pool);
}
}
@@ -508,15 +509,15 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
%typemap(in) POINTER_TYPES
{
- $1 = ($1_ltype)svn_swig_MustGetPtr($input, $descriptor, $svn_argnum);
+ $1 = ($1_ltype)svn_swig_py_must_get_ptr($input, $descriptor, $svn_argnum);
if (PyErr_Occurred()) {
SWIG_fail;
}
}
%typemap(out) POINTER_TYPES
- "$result = svn_swig_NewPointerObj((void*)($1), $descriptor,
- _global_py_pool, args);";
+ "$result = svn_swig_py_new_pointer_obj((void*)($1), $descriptor,
+ _global_py_pool, args);";
%apply POINTER_TYPES { void *, SWIGTYPE *, SWIGTYPE [] };
@@ -547,6 +548,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
%typemap(in) apr_pool_t *pool "";
%typemap(default) apr_pool_t *pool(apr_pool_t *_global_pool) {
_global_pool = $1 = svn_swig_pl_make_pool (ST(items-1));
+ SPAGAIN;
}
#endif
#ifdef SWIGRUBY
@@ -635,8 +637,8 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
*/
%typemap(argout) CALLABLE_CALLBACK * {
- %append_output(svn_swig_NewPointerObj($1, $descriptor,
- _global_py_pool, args));
+ %append_output(svn_swig_py_new_pointer_obj($1, $descriptor,
+ _global_py_pool, args));
}
/* Convert the pointer to a function pointer back into a regular
@@ -645,7 +647,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
%typemap(in) CALLABLE_CALLBACK {
$&ltype tmp =
- svn_swig_MustGetPtr($input, $&descriptor, $svn_argnum);
+ svn_swig_py_must_get_ptr($input, $&descriptor, $svn_argnum);
if (tmp == NULL || PyErr_Occurred()) {
SWIG_fail;
}
@@ -675,8 +677,8 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
SWIG_fail;
}
*tmp = ($ltype) $1;
- $result = svn_swig_NewPointerObj(tmp, $&1_descriptor,
- py_pool, args);
+ $result = svn_swig_py_new_pointer_obj(tmp, $&1_descriptor,
+ py_pool, args);
}
}
@@ -694,7 +696,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
*tmp = ($ltype) $value;
%set_constant("$symname",
- svn_swig_NewPointerObj(tmp, $&descriptor, NULL, NULL)
+ svn_swig_py_new_pointer_obj(tmp, $&descriptor, NULL, NULL)
);
}
@@ -806,20 +808,12 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
Callback: svn_cancel_func_t
*/
-#ifdef SWIGPYTHON
-%typemap(in) (svn_cancel_func_t cancel_func, void *cancel_baton) {
- $1 = svn_swig_py_cancel_func;
- $2 = $input; /* our function is the baton. */
-}
-#endif
+%callback_typemap(svn_cancel_func_t cancel_func, void *cancel_baton,
+ svn_swig_py_cancel_func,
+ svn_swig_pl_cancel_func,
+ svn_swig_rb_cancel_func)
#ifdef SWIGRUBY
-%typemap(in) (svn_cancel_func_t cancel_func, void *cancel_baton)
-{
- $1 = svn_swig_rb_cancel_func;
- $2 = (void *)svn_swig_rb_make_baton($input, _global_svn_swig_rb_pool);
-}
-
%typemap(argout) (svn_cancel_func_t cancel_func, void *cancel_baton)
{
svn_swig_rb_set_baton($result, (VALUE)$2);
@@ -942,15 +936,24 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
#ifdef SWIGPERL
%typemap(in) svn_stream_t * {
svn_swig_pl_make_stream (&$1, $input);
+ SPAGAIN;
}
%typemap(out) svn_stream_t * {
- $result = svn_swig_pl_from_stream ($1);
+ SV* tmp;
+ PUTBACK;
+ tmp = svn_swig_pl_from_stream ($1);
+ SPAGAIN;
+ $result = tmp;
argvi++;
}
%typemap(argout) svn_stream_t ** {
- %append_output(svn_swig_pl_from_stream(*$1));
+ SV *tmp;
+ PUTBACK;
+ tmp = svn_swig_pl_from_stream(*$1);
+ SPAGAIN;
+ %append_output(tmp);
}
#endif
@@ -1003,8 +1006,8 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
/* We don't know the type of this reference, so we'll have to
* treat it as an opaque void pointer.
*/
- $result = svn_swig_NewPointerObj($1, $descriptor,
- _global_py_pool, args);
+ $result = svn_swig_py_new_pointer_obj($1, $descriptor,
+ _global_py_pool, args);
}
}
@@ -1123,11 +1126,11 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
}
%typemap(argout) unsigned char *result_digest {
- /* FIXME: This code is clearly buggy. The return value of sv_newmortal()
- is immediately overwritten by the return value
- of svn_swig_pl_from_md5(). */
- ST(argvi) = sv_newmortal();
- ST(argvi++) = svn_swig_pl_from_md5($1);
+ SV *tmp;
+ PUTBACK;
+ tmp = svn_swig_pl_from_md5($1);
+ SPAGAIN;
+ %append_output(tmp);
}
#endif
@@ -1147,6 +1150,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
#endif
#ifdef SWIGPYTHON
+/* ### Verify if this should use '[]' like perl and ruby */
%typemap(in) const unsigned char *digest {
if ($input == Py_None) {
$1 = NULL;
@@ -1158,7 +1162,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
#endif
#ifdef SWIGRUBY
-%typemap(in) const unsigned char *digest
+%typemap(in) const unsigned char digest[]
{
if (NIL_P($input)) {
$1 = NULL;
@@ -1178,8 +1182,14 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self)
useful convertors for svn_opt_revision_t
*/
#ifdef SWIGPERL
-%typemap(in) svn_opt_revision_t * (svn_opt_revision_t rev) {
- $1 = svn_swig_pl_set_revision(&rev, $input, TRUE);
+%typemap(in) svn_opt_revision_t *
+ (svn_opt_revision_t rev, apr_pool_t *_global_pool = NULL)
+{
+ if (_global_pool == NULL) {
+ _global_pool = svn_swig_pl_make_pool((SV *)NULL);
+ SPAGAIN;
+ }
+ $1 = svn_swig_pl_set_revision(&rev, $input, TRUE, _global_pool);
}
#endif