summaryrefslogtreecommitdiff
path: root/subversion/bindings/swig/ruby/libsvn_swig_ruby
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/bindings/swig/ruby/libsvn_swig_ruby')
-rw-r--r--subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c55
-rw-r--r--subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h125
-rw-r--r--subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb__pre_ruby.h99
3 files changed, 139 insertions, 140 deletions
diff --git a/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c b/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
index 136d35c..a25ec5a 100644
--- a/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
+++ b/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
@@ -23,9 +23,16 @@
/* Tell swigutil_rb.h that we're inside the implementation */
#define SVN_SWIG_SWIGUTIL_RB_C
+/* Windows hack: Allow overriding some <ruby.h> defaults */
+#include "swigutil_rb__pre_ruby.h"
#include "swig_ruby_external_runtime.swg"
#include "swigutil_rb.h"
+
+#ifdef HAVE_RUBY_ST_H
+#include <ruby/st.h>
+#else
#include <st.h>
+#endif
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
@@ -474,9 +481,9 @@ static void
check_apr_status(apr_status_t status, VALUE exception_class, const char *format)
{
if (status != APR_SUCCESS) {
- char buffer[1024];
- apr_strerror(status, buffer, sizeof(buffer) - 1);
- rb_raise(exception_class, format, buffer);
+ char buffer[1024];
+ apr_strerror(status, buffer, sizeof(buffer) - 1);
+ rb_raise(exception_class, format, buffer);
}
}
@@ -519,8 +526,8 @@ svn_swig_rb_destroyer_destroy(VALUE self, VALUE target)
objects[0] = target;
if (find_swig_type_object(1, objects) && DATA_PTR(target)) {
- svn_swig_rb_destroy_internal_pool(target);
- DATA_PTR(target) = NULL;
+ svn_swig_rb_destroy_internal_pool(target);
+ DATA_PTR(target) = NULL;
}
return Qnil;
@@ -538,9 +545,9 @@ svn_swig_rb_initialize(void)
}
check_apr_status(apr_allocator_create(&swig_rb_allocator),
- rb_eLoadError, "failed to create allocator: %s");
+ rb_eLoadError, "failed to create allocator: %s");
apr_allocator_max_free_set(swig_rb_allocator,
- SVN_ALLOCATOR_RECOMMENDED_MAX_FREE);
+ SVN_ALLOCATOR_RECOMMENDED_MAX_FREE);
swig_rb_pool = svn_pool_create_ex(NULL, swig_rb_allocator);
apr_pool_tag(swig_rb_pool, "svn-ruby-pool");
@@ -549,8 +556,8 @@ svn_swig_rb_initialize(void)
apr_thread_mutex_t *mutex;
check_apr_status(apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT,
- swig_rb_pool),
- rb_eLoadError, "failed to create allocator: %s");
+ swig_rb_pool),
+ rb_eLoadError, "failed to create allocator: %s");
apr_allocator_mutex_set(swig_rb_allocator, mutex);
}
#endif
@@ -583,7 +590,7 @@ svn_swig_rb_initialize(void)
mSvnDestroyer = rb_define_module_under(rb_svn(), "Destroyer");
rb_define_module_function(mSvnDestroyer, "destroy",
- svn_swig_rb_destroyer_destroy, 1);
+ svn_swig_rb_destroyer_destroy, 1);
}
apr_pool_t *
@@ -736,7 +743,7 @@ static svn_boolean_t
rb_set_pool_if_swig_type_object(VALUE target, VALUE pool)
{
VALUE targets[1];
-
+
targets[0] = target;
if (!NIL_P(find_swig_type_object(1, targets))) {
@@ -862,7 +869,7 @@ svn_swig_rb_raise_svn_repos_already_close(void)
VALUE
svn_swig_rb_svn_error_new(VALUE code, VALUE message, VALUE file, VALUE line,
- VALUE child)
+ VALUE child)
{
return rb_funcall(rb_svn_error_svn_error(),
id_new_corresponding_error,
@@ -1598,7 +1605,7 @@ typedef struct callback_handle_error_baton_t {
} callback_handle_error_baton_t;
static VALUE
-callback(VALUE baton)
+callback(VALUE baton, ...)
{
callback_baton_t *cbb = (callback_baton_t *)baton;
VALUE result;
@@ -1610,7 +1617,7 @@ callback(VALUE baton)
}
static VALUE
-callback_rescue(VALUE baton)
+callback_rescue(VALUE baton, ...)
{
callback_rescue_baton_t *rescue_baton = (callback_rescue_baton_t*)baton;
@@ -1627,7 +1634,7 @@ callback_rescue(VALUE baton)
}
static VALUE
-callback_ensure(VALUE pool)
+callback_ensure(VALUE pool, ...)
{
svn_swig_rb_pop_pool(pool);
@@ -1638,17 +1645,17 @@ static VALUE
invoke_callback(VALUE baton, VALUE pool)
{
callback_baton_t *cbb = (callback_baton_t *)baton;
- VALUE sub_pool;
+ VALUE subpool;
VALUE argv[1];
argv[0] = pool;
- svn_swig_rb_get_pool(1, argv, Qnil, &sub_pool, NULL);
- cbb->pool = sub_pool;
- return rb_ensure(callback, baton, callback_ensure, sub_pool);
+ svn_swig_rb_get_pool(1, argv, Qnil, &subpool, NULL);
+ cbb->pool = subpool;
+ return rb_ensure(callback, baton, callback_ensure, subpool);
}
static VALUE
-callback_handle_error(VALUE baton)
+callback_handle_error(VALUE baton, ...)
{
callback_handle_error_baton_t *handle_error_baton;
handle_error_baton = (callback_handle_error_baton_t *)baton;
@@ -3231,7 +3238,8 @@ svn_swig_rb_make_stream(VALUE io)
pool_wrapper_p = &pool_wrapper;
r2c_swig_type2(rb_pool, "apr_pool_wrapper_t *", (void **)pool_wrapper_p);
stream = svn_stream_create((void *)io, pool_wrapper->pool);
- svn_stream_set_read(stream, read_handler_rbio);
+ svn_stream_set_read2(stream, NULL /* only full read support */,
+ read_handler_rbio);
svn_stream_set_write(stream, write_handler_rbio);
}
@@ -4025,4 +4033,7 @@ static svn_ra_reporter3_t rb_ra_reporter3 = {
svn_swig_rb_ra_reporter_abort_report
};
-svn_ra_reporter3_t *svn_swig_rb_ra_reporter3 = &rb_ra_reporter3;
+svn_ra_reporter3_t *svn_swig_rb_get_ra_reporter3()
+{
+ return &rb_ra_reporter3;
+}
diff --git a/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h b/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
index 1098c80..3dbc3ec 100644
--- a/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
+++ b/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
@@ -22,8 +22,14 @@
#ifndef SVN_SWIG_SWIGUTIL_RB_H
#define SVN_SWIG_SWIGUTIL_RB_H
+/* Windows hack: Allow overriding some <ruby.h> defaults */
+#include "swigutil_rb__pre_ruby.h"
#include <ruby.h>
+#ifdef HAVE_RUBY_REGEX_H
+#include <ruby/regex.h>
+#else
#include <regex.h>
+#endif
#if SIZEOF_VOIDP == SIZEOF_LONG
# define PTR2NUM(x) (ULONG2NUM((unsigned long)(x)))
@@ -45,17 +51,6 @@
#include "svn_client.h"
#include "svn_repos.h"
-/* Define DLL export magic on Windows. */
-#ifdef WIN32
-# ifdef SVN_SWIG_SWIGUTIL_RB_C
-# define SVN_RB_SWIG_SWIGUTIL_EXPORT __declspec(dllexport)
-# else
-# define SVN_RB_SWIG_SWIGUTIL_EXPORT __declspec(dllimport)
-# endif
-#else
-# define SVN_RB_SWIG_SWIGUTIL_EXPORT
-#endif
-
/* Ruby <=1.8.5 compatibility */
#ifndef RARRAY_LEN
#define RARRAY_LEN(x) RARRAY(x)->len
@@ -89,152 +84,98 @@ typedef struct apr_pool_wrapper_t
apr_array_header_t *children;
} apr_pool_wrapper_t;
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_initialize(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_pool_t *svn_swig_rb_pool(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_allocator_t *svn_swig_rb_allocator(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_svn_delta_editor(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_svn_delta_text_delta_window_handler(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_raise_svn_fs_already_close(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_raise_svn_repos_already_close(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_svn_error_new(VALUE code, VALUE message,
VALUE file, VALUE line, VALUE child);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_svn_error_to_rb_error(svn_error_t *error);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_handle_svn_error(svn_error_t *error);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void *svn_swig_rb_to_swig_type(VALUE value, const void *ctx, apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_from_swig_type(void *value, void *ctx);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_depth_t svn_swig_rb_to_depth(VALUE value);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_mergeinfo_inheritance_t svn_swig_rb_to_mergeinfo_inheritance(VALUE value);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_svn_date_string_to_time(const char *date);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_hash_to_hash_string(apr_hash_t *hash);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_hash_to_hash_svn_string(apr_hash_t *hash);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_hash_to_hash_swig_type(apr_hash_t *hash,
const char *type_name);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_hash_to_hash_merge_range(apr_hash_t *hash);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_hash_to_hash_merge_range_hash(apr_hash_t *hash);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_prop_hash_to_hash(apr_hash_t *prop_hash);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_revnum_key_hash_to_hash_string(apr_hash_t *hash);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_string(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_svn_string(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_svn_rev(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_proplist_item(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_external_item2(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_merge_range(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_auth_provider_object(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_prop_apr_array_to_hash_prop(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_rb_hash_to_apr_hash_string(VALUE hash, apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_rb_hash_to_apr_hash_svn_string(VALUE hash,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_rb_hash_to_apr_hash_swig_type(VALUE hash,
const char *typename,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_rb_hash_to_apr_hash_revnum(VALUE hash,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_rb_hash_to_apr_hash_merge_range(VALUE hash,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_strings_to_apr_array(VALUE strings,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *
svn_swig_rb_array_to_auth_provider_object_apr_array(VALUE array,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_array_to_apr_array_revnum(VALUE array,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_array_to_apr_array_merge_range(VALUE array,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_array_to_apr_array_copy_source(VALUE array,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_array_to_apr_array_revision_range(VALUE array,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_to_apr_array_prop(VALUE array_or_hash,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_to_apr_array_row_prop(VALUE array_or_hash,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_get_pool(int argc, VALUE *argv, VALUE self, VALUE *rb_pool, apr_pool_t **pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_boolean_t svn_swig_rb_set_pool(VALUE target, VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_set_pool_for_no_swig_type(VALUE target, VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_push_pool(VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_pop_pool(VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_destroy_pool(VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_destroy_internal_pool(VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_make_delta_editor(svn_delta_editor_t **editor,
void **edit_baton,
VALUE rb_editor,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_make_baton(VALUE proc, VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_set_baton(VALUE target, VALUE baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_log_receiver(void *baton,
apr_hash_t *changed_paths,
svn_revnum_t revision,
@@ -243,19 +184,16 @@ svn_error_t *svn_swig_rb_log_receiver(void *baton,
const char *message,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_log_entry_receiver(void *baton,
svn_log_entry_t *entry,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_repos_authz_func(svn_boolean_t *allowed,
svn_fs_root_t *root,
const char *path,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_repos_authz_callback(svn_repos_authz_access_t required,
svn_boolean_t *allowed,
svn_fs_root_t *root,
@@ -264,7 +202,6 @@ svn_error_t *svn_swig_rb_repos_authz_callback(svn_repos_authz_access_t required,
apr_pool_t *pool);
/* Implements the svn_client_get_commit_log3_t API. */
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_get_commit_log_func(const char **log_msg,
const char **tmp_file,
const apr_array_header_t *
@@ -272,76 +209,60 @@ svn_error_t *svn_swig_rb_get_commit_log_func(const char **log_msg,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_notify_func2(void *baton,
const svn_wc_notify_t *notify,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_conflict_resolver_func
(svn_wc_conflict_result_t **result,
const svn_wc_conflict_description_t *description,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_commit_callback(svn_revnum_t new_revision,
const char *date,
const char *author,
void *baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_commit_callback2(const svn_commit_info_t *commit_info,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_cancel_func(void *cancel_baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_info_receiver(void *baton,
const char *path,
const svn_info_t *info,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_boolean_t svn_swig_rb_config_enumerator(const char *name,
const char *value,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_boolean_t svn_swig_rb_config_section_enumerator(const char *name,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_delta_path_driver_cb_func(void **dir_baton,
void *parent_baton,
void *callback_baton,
const char *path,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_txdelta_window_handler(svn_txdelta_window_t *window,
void *baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_fs_warning_callback(void *baton, svn_error_t *err);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_fs_warning_callback_baton_register(VALUE baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_fs_get_locks_callback(void *baton,
svn_lock_t *lock,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_just_call(void *baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_setup_ra_callbacks(svn_ra_callbacks2_t **callbacks,
void **baton,
VALUE rb_callbacks,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_ra_lock_callback(void *baton,
const char *path,
svn_boolean_t do_lock,
@@ -349,7 +270,6 @@ svn_error_t *svn_swig_rb_ra_lock_callback(void *baton,
svn_error_t *ra_err,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_ra_file_rev_handler(void *baton,
const char *path,
svn_revnum_t rev,
@@ -359,13 +279,11 @@ svn_error_t *svn_swig_rb_ra_file_rev_handler(void *baton,
apr_array_header_t *prop_diffs,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_repos_history_func(void *baton,
const char *path,
svn_revnum_t revision,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_repos_file_rev_handler(void *baton,
const char *path,
svn_revnum_t rev,
@@ -375,7 +293,6 @@ svn_error_t *svn_swig_rb_repos_file_rev_handler(void *baton,
apr_array_header_t *prop_diffs,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_wc_relocation_validator3(void *baton,
const char *uuid,
const char *url,
@@ -384,14 +301,12 @@ svn_error_t *svn_swig_rb_wc_relocation_validator3(void *baton,
/* auth provider callbacks */
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t * svn_swig_rb_auth_gnome_keyring_unlock_prompt_func(
char **keyring_passwd,
const char *keyring_name,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_auth_simple_prompt_func(
svn_auth_cred_simple_t **cred,
void *baton,
@@ -400,7 +315,6 @@ svn_error_t *svn_swig_rb_auth_simple_prompt_func(
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_auth_username_prompt_func(
svn_auth_cred_username_t **cred,
void *baton,
@@ -408,7 +322,6 @@ svn_error_t *svn_swig_rb_auth_username_prompt_func(
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_auth_ssl_server_trust_prompt_func(
svn_auth_cred_ssl_server_trust_t **cred,
void *baton,
@@ -418,7 +331,6 @@ svn_error_t *svn_swig_rb_auth_ssl_server_trust_prompt_func(
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_auth_ssl_client_cert_prompt_func(
svn_auth_cred_ssl_client_cert_t **cred,
void *baton,
@@ -426,7 +338,6 @@ svn_error_t *svn_swig_rb_auth_ssl_client_cert_prompt_func(
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_auth_ssl_client_cert_pw_prompt_func(
svn_auth_cred_ssl_client_cert_pw_t **cred,
void *baton,
@@ -434,27 +345,20 @@ svn_error_t *svn_swig_rb_auth_ssl_client_cert_pw_prompt_func(
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_file_t *svn_swig_rb_make_file(VALUE file, apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_stream_t *svn_swig_rb_make_stream(VALUE io);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_filename_to_temp_file(const char *file_name);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_set_revision(svn_opt_revision_t *rev, VALUE value);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_adjust_arg_for_client_ctx_and_pool(int *argc, VALUE **argv);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_wc_status_func(void *baton,
const char *path,
svn_wc_status2_t *status);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_client_blame_receiver_func(void *baton,
apr_int64_t line_no,
svn_revnum_t revision,
@@ -464,39 +368,27 @@ svn_error_t *svn_swig_rb_client_blame_receiver_func(void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_wc_entry_callbacks2_t *svn_swig_rb_wc_entry_callbacks2(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_wc_diff_callbacks2_t *svn_swig_rb_wc_diff_callbacks2(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_make_txdelta_window_handler_wrapper(VALUE *rb_handler_pool,
apr_pool_t **handler_pool,
svn_txdelta_window_handler_t **handler,
void ***handler_baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_setup_txdelta_window_handler_wrapper(VALUE obj,
svn_txdelta_window_handler_t handler,
void *handler_baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
-svn_error_t *svn_swig_rb_invoke_txdelta_window_handler(VALUE window_handler,
- svn_txdelta_window_t *window,
- apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_invoke_txdelta_window_handler_wrapper(VALUE obj,
svn_txdelta_window_t *window,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_txdelta_window_t_ops_get(svn_txdelta_window_t *window);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_client_diff_summarize_func(const svn_client_diff_summarize_t *diff,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_client_list_func(void *baton,
const char *path,
const svn_dirent_t *dirent,
@@ -504,20 +396,17 @@ svn_error_t *svn_swig_rb_client_list_func(void *baton,
const char *abs_path,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_proplist_receiver(void *baton,
const char *path,
apr_hash_t *prop_hash,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_changelist_receiver(void *baton,
const char *path,
const char *changelist,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
-extern svn_ra_reporter3_t *svn_swig_rb_ra_reporter3;
+svn_ra_reporter3_t *svn_swig_rb_get_ra_reporter3();
#ifdef __cplusplus
}
diff --git a/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb__pre_ruby.h b/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb__pre_ruby.h
new file mode 100644
index 0000000..bc8eb6e
--- /dev/null
+++ b/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb__pre_ruby.h
@@ -0,0 +1,99 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#ifndef SVN_SWIG_SWIGUTIL_RB__PRE_RUBY_H
+#define SVN_SWIG_SWIGUTIL_RB__PRE_RUBY_H
+
+#if defined(SVN_SWIG_RUBY__CUSTOM_RUBY_CONFIG) && defined(_MSC_VER)
+/* The standard install of Ruby on Windows 1.9 expects to be build with MINGW,
+ a gcc compatible toolchain. Since 1.8 they removed much of the compatibility
+ with Visual C++, but we can't build with MingW as that would break APR
+ binary compatibility.
+ */
+
+#include <ruby/config.h>
+
+#undef NORETURN
+#undef DEPRECATED
+#undef FUNC_STDCALL
+#undef FUNC_CDECL
+#undef FUNC_FASTCALL
+#undef RUBY_ALIAS_FUNCTION_TYPE
+#undef RUBY_ALIAS_FUNCTION_VOID
+#undef HAVE_GCC_ATOMIC_BUILTINS
+#undef RUBY_FUNC_EXPORTED
+#undef RUBY_FUNC_EXPORTED
+#undef RUBY_EXTERN
+
+#define NORETURN(x) __declspec(noreturn) x
+#define RUBY_EXTERN extern __declspec(dllimport)
+
+/* Yuck. But this makes ruby happy */
+#undef pid_t
+#undef uid_t
+#undef gid_t
+typedef int pid_t;
+typedef int uid_t;
+typedef int gid_t;
+
+#if !defined(__cplusplus) && !defined(inline)
+#define inline __inline
+#endif
+typedef long ssize_t;
+
+/* Don't define iovec when including APR */
+#define APR_IOVEC_DEFINED
+
+/* Undefine headers that aren't available in Visual C++, but config.h says
+ are available. */
+#undef HAVE_UNISTD_H
+
+/* Visual C++ >= 2010 has <stdint.h> */
+#if _MSC_VER < 1600
+#undef HAVE_STDINT_H
+
+typedef signed __int8 int8_t;
+typedef signed __int16 int16_t;
+typedef signed __int32 int32_t;
+typedef signed __int64 int64_t;
+typedef unsigned __int8 uint8_t;
+typedef unsigned __int16 uint16_t;
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int64 uint64_t;
+#endif
+
+/* Visual C++ >= 2013 has <inttypes.h> */
+#if _MSC_VER < 1800
+#undef HAVE_INTTYPES_H
+#endif
+
+/* Visual Studio >= 2015 has timespec defined */
+#if _MSC_VER >= 1900
+#define HAVE_STRUCT_TIMESPEC
+#endif
+
+#ifdef _MSC_VER
+#pragma warning(disable: 4702) /* warning C4702: unreachable code */
+#endif
+
+#endif /* defined(SVN_SWIG_RUBY__CUSTOM_RUBY_CONFIG) && defined(_MSC_VER) */
+
+#endif /* SVN_SWIG_SWIGUTIL_RB__PRE_RUBY_H */