Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/bindings/swig/core.i view on Meta::CPAN
svn_rangelist_t **rangelist_inout
}
/* -----------------------------------------------------------------------
input mergeinfo hash
*/
%apply apr_hash_t *MERGEINFO {
apr_hash_t *mergefrom,
apr_hash_t *mergeto,
apr_hash_t *mergein1,
apr_hash_t *mergein2,
apr_hash_t *mergeinfo,
apr_hash_t *mergeinput,
apr_hash_t *eraser,
apr_hash_t *whiteboard,
apr_hash_t *changes
}
/* -----------------------------------------------------------------------
output mergeinfo
*/
#if defined(SWIGPYTHON) || defined(SWIGRUBY)
%apply apr_hash_t **MERGEINFO_INOUT {
apr_hash_t **mergeinfo_inout
}
%apply apr_hash_t **MERGEINFO {
apr_hash_t **mergeinfo,
apr_hash_t **inheritable_mergeinfo,
apr_hash_t **deleted,
apr_hash_t **added
}
#endif
/* -----------------------------------------------------------------------
output mergeinfo hash
*/
#if defined(SWIGRUBY) || defined(SWIGPYTHON)
%apply apr_hash_t **MERGEINFO_CATALOG {
apr_hash_t **catalog
};
#endif
/* -----------------------------------------------------------------------
allowable null values
*/
%apply const char *MAY_BE_NULL {
/* svn_config_get */
const char *default_value,
/* svn_config_read_auth_data */
const char *config_dir,
/* svn_diff_file_output_merge */
const char *conflict_original,
const char *conflict_modified,
const char *conflict_latest,
const char *conflict_separator,
/* svn_cmdline_create_auth_baton */
const char *username,
const char *password
};
/* -----------------------------------------------------------------------
fix up the svn_stream_read() ptr/len arguments
*/
#ifdef SWIGPYTHON
%typemap(in) (char *buffer, apr_size_t *len) ($*2_type temp) {
if (PyLong_Check($input)) {
temp = PyLong_AsLong($input);
}
else if (PyInt_Check($input)) {
temp = PyInt_AsLong($input);
}
else {
PyErr_SetString(PyExc_TypeError,
"expecting an integer for the buffer size");
SWIG_fail;
}
if (temp < 0) {
PyErr_SetString(PyExc_ValueError,
"buffer size must be a positive integer");
SWIG_fail;
}
$1 = malloc(temp);
$2 = ($2_ltype)&temp;
}
#endif
#ifdef SWIGPERL
%typemap(in) (char *buffer, apr_size_t *len) ($*2_type temp) {
temp = SvIV($input);
$1 = malloc(temp);
$2 = ($2_ltype)&temp;
}
#endif
#ifdef SWIGRUBY
%typemap(in) (char *buffer, apr_size_t *len) ($*2_type temp) {
temp = NUM2LONG($input);
$1 = malloc(temp);
$2 = ($2_ltype)&temp;
}
#endif
/* ### need to use freearg or somesuch to ensure the string is freed.
### watch out for 'return' anywhere in the binding code. */
#ifdef SWIGPYTHON
%typemap(argout) (char *buffer, apr_size_t *len) {
%append_output(PyString_FromStringAndSize($1, *$2));
free($1);
}
#endif
#ifdef SWIGPERL
%typemap(argout) (char *buffer, apr_size_t *len) {
%append_output(sv_2mortal(newSVpvn($1, *$2)));
free($1);
}
#endif
#ifdef SWIGRUBY
%typemap(argout) (char *buffer, apr_size_t *len) {
%append_output(*$2 == 0 ? Qnil : rb_str_new($1, *$2));
src/subversion/subversion/bindings/swig/core.i view on Meta::CPAN
#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)
%include svn_md5_h.swg
#endif
#ifdef SWIGPERL
/* The apr_file_t* 'in' typemap can't cope with struct members, and there
is no reason to change this one. */
%immutable svn_patch_t::patch_file;
%include svn_diff_h.swg
%include svn_error_h.swg
%{
#include "svn_private_config.h"
%}
%init %{
#if defined(SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK)
svn_swig_pl_bind_current_pool_fns (&svn_swig_pl_get_current_pool,
&svn_swig_pl_set_current_pool);
#endif
%}
#endif
#ifdef SWIGPYTHON
void svn_swig_py_set_application_pool(PyObject *py_pool, apr_pool_t *pool);
void svn_swig_py_clear_application_pool();
%init %{
/* Theoretically, we should be checking for errors here,
but I do not know of any useful way to signal an error to Python
from within a module initialization function. */
svn_swig_py_initialize();
%}
/* Proxy classes for APR classes */
%include proxy_apr.swg
#endif
#ifdef SWIGRUBY
%init %{
svn_swig_rb_initialize();
rb_define_const(mCore, "SVN_ALLOCATOR_MAX_FREE_UNLIMITED",
( run in 0.826 second using v1.01-cache-2.11-cpan-524268b4103 )