Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/bindings/swig/core.i view on Meta::CPAN
#ifdef SWIGPYTHON
/* pl and rb aren't yet implemented */
%callback_typemap_maybenull(svn_config_auth_walk_func_t walk_func,
void *walk_baton,
svn_swig_py_config_auth_walk_func,
svn_swig_pl_config_auth_walk_func,
svn_swig_rb_config_auth_walk_func)
#endif
/* -----------------------------------------------------------------------
* For all the various functions that set a callback baton create a reference
* for the baton (which in this case is an SV pointing to the callback)
* and make that a return from the function. The perl side should
* then store the return in the object the baton is attached to.
* If the function already returns a value then this value is follows that
* function. In the case of the prompt functions auth_open_helper in Core.pm
* is used to split up these values.
*/
#ifdef SWIGPERL
%typemap(argout) void *CALLBACK_BATON (SV * _global_callback) {
/* callback baton */
%append_output(sv_2mortal(newRV_inc(_global_callback)));
}
%typemap(in) void *CALLBACK_BATON (SV * _global_callback) {
_global_callback = $input;
$1 = (void *) _global_callback;
}
%apply void *CALLBACK_BATON {
void *prompt_baton
};
#endif
/* -----------------------------------------------------------------------
These APIs take an "inout" parameter that necessitates more careful
definition.
*/
%ignore svn_mergeinfo_merge;
%ignore svn_mergeinfo_sort;
%ignore svn_rangelist_merge;
%ignore svn_rangelist_reverse;
#ifdef SWIGRUBY
%ignore svn_auth_open;
%ignore svn_diff_file_options_create;
%ignore svn_create_commit_info;
%ignore svn_commit_info_dup;
%ignore svn_opt_args_to_target_array2;
%ignore svn_opt_args_to_target_array3;
%ignore svn_opt_parse_num_args;
%ignore svn_opt_parse_all_args;
#endif
#ifdef SWIGPYTHON
# The auth baton depends on the providers, so we preserve a
# reference to them inside the wrapper. This way, if all external
# references to the providers are gone, they will still be alive,
# keeping the baton valid.
%feature("pythonappend") svn_auth_open %{
val.__dict__["_deps"] = list(args[0])
%}
#endif
/* ----------------------------------------------------------------------- */
%include svn_error_codes_h.swg
%include svn_time_h.swg
%include svn_types_h.swg
%include svn_pools_h.swg
%include svn_version_h.swg
/* The constant SVN_PROP_REVISION_ALL_PROPS is a C fragment, not a single
data value, so the SWIG parser will raise a 305 warning if we don't
suppress it. */
#pragma SWIG nowarn=305
%include svn_props_h.swg
#pragma SWIG nowarn=+305
%include svn_opt_h.swg
%include svn_cmdline_h.swg
%include svn_auth_h.swg
%include svn_config_h.swg
%include svn_utf_h.swg
%include svn_nls_h.swg
%include svn_path_h.swg
%include svn_dirent_uri_h.swg
%include svn_mergeinfo_h.swg
%include svn_io_h.swg
%include svn_checksum_h.swg
%inline %{
/* Helper function to set the gnome-keyring unlock prompt function. This
* C function accepts an auth baton, a function and a prompt baton, but
* the below callback_typemap uses both the function and the prompt
* baton, so the resulting binding has just two arguments: The auth
* baton and the prompt function.
* The prompt function should again have two arguments: The keyring name
* (string) and a pool (except for the ruby version, which doesn't have
* the pool argument). It should return the entered password (string).
* This binding generated for this function generates a reference to the
* prompt function that was passed into this. The caller should store
* that reference somewhere, to prevent the function from being garbage
* collected...
*/
static void svn_auth_set_gnome_keyring_unlock_prompt_func(svn_auth_baton_t *ab,
svn_auth_gnome_keyring_unlock_prompt_func_t prompt_func,
void *prompt_baton) {
svn_auth_set_parameter(ab, SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC,
prompt_func);
svn_auth_set_parameter(ab, SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_BATON,
prompt_baton);
}
%}
#if defined(SWIGPERL) || defined(SWIGRUBY)
( run in 0.554 second using v1.01-cache-2.11-cpan-df04353d9ac )