You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/07/24 14:36:22 UTC

svn commit: r1506520 - in /subversion/trunk/subversion/bindings/swig: perl/libsvn_swig_perl/swigutil_pl.c perl/libsvn_swig_perl/swigutil_pl.h ruby/libsvn_swig_ruby/swigutil_rb.c ruby/libsvn_swig_ruby/swigutil_rb.h svn_delta.i svn_ra.i

Author: rhuijben
Date: Wed Jul 24 12:36:22 2013
New Revision: 1506520

URL: http://svn.apache.org/r1506520
Log:
Various fixes to help the usage of shared libraries in the swig bindings.

No functional changes.

This allows compiling and using the libsvn_swig_* libraries as proper
shared libraries on Windows, but I'll enable that in a separate patch.

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
  (svn_delta_wrap_window_handler): Rename to ...
  (svn_swig_pl_wrap_window_handler): ... this.
  (svn_delta_make_editor): Rename to ...
  (svn_swig_pl_make_editor): ... this.
  (svn_ra_make_callbacks): Rename to ...
  (svn_swig_pl_make_callbacks): ... this.

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
  (svn_swig_pl_convert_hash_of_revnum_t,
   svn_swig_pl_ints_to_list): Remove unneeded protoypes.

  (svn_delta_wrap_window_handler): Rename to ...
  (svn_swig_pl_wrap_window_handler): ... this.
  (svn_delta_make_editor): Rename to ...
  (svn_swig_pl_make_editor): ... this.
  (svn_ra_make_callbacks): Rename to ...
  (svn_swig_pl_make_callbacks): ... this.

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
  (svn_swig_rb_ra_reporter3): Replace by...
  (svn_swig_rb_get_ra_reporter3): ... this.

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
  (svn_swig_rb_invoke_txdelta_window_handler): Remove unimplemented prototype.
  (svn_swig_rb_ra_reporter3): Replace by...
  (svn_swig_rb_get_ra_reporter3): ... this.

* subversion/bindings/swig/svn_delta.i
  (svn_swig_py_make_editor): Remove duplicated prototype from swigutil_py.h.
  (const svn_delta_editor_t *EDITOR, void *BATON): Update caller.
  (svn_delta_wrap_window_handler): Remove duplicated prototype from swigutil_pl.h.

* subversion/bindings/swig/svn_ra.i
  (const svn_ra_callbacks_t *, void *): Update caller.
  (const svn_ra_reporter3_t *, void *): Update caller.

Modified:
    subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
    subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
    subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
    subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
    subversion/trunk/subversion/bindings/swig/svn_delta.i
    subversion/trunk/subversion/bindings/swig/svn_ra.i

Modified: subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c?rev=1506520&r1=1506519&r2=1506520&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c (original)
+++ subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c Wed Jul 24 12:36:22 2013
@@ -962,10 +962,10 @@ static svn_error_t * thunk_abort_edit(vo
 
 
 void
-svn_delta_wrap_window_handler(svn_txdelta_window_handler_t *handler,
-                              void **h_baton,
-                              SV *callback,
-                              apr_pool_t *pool)
+svn_swig_pl_wrap_window_handler(svn_txdelta_window_handler_t *handler,
+                                void **h_baton,
+                                SV *callback,
+                                apr_pool_t *pool)
 {
     *handler = thunk_window_handler;
     *h_baton = callback;
@@ -973,10 +973,10 @@ svn_delta_wrap_window_handler(svn_txdelt
     svn_swig_pl_hold_ref_in_pool(pool, callback);
 }
 
-void svn_delta_make_editor(svn_delta_editor_t **editor,
-                           void **edit_baton,
-                           SV *perl_editor,
-                           apr_pool_t *pool)
+void svn_swig_pl_make_editor(svn_delta_editor_t **editor,
+                             void **edit_baton,
+                             SV *perl_editor,
+                             apr_pool_t *pool)
 {
   svn_delta_editor_t *thunk_editor = svn_delta_default_editor(pool);
 
@@ -1184,10 +1184,10 @@ svn_error_t *thunk_get_wc_prop(void *bat
 }
 
 
-svn_error_t *svn_ra_make_callbacks(svn_ra_callbacks_t **cb,
-                                   void **c_baton,
-                                   SV *perl_callbacks,
-                                   apr_pool_t *pool)
+svn_error_t *svn_swig_pl_make_callbacks(svn_ra_callbacks_t **cb,
+                                        void **c_baton,
+                                        SV *perl_callbacks,
+                                        apr_pool_t *pool)
 {
     SV *auth_baton;
 

Modified: subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h?rev=1506520&r1=1506519&r2=1506520&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h (original)
+++ subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h Wed Jul 24 12:36:22 2013
@@ -83,8 +83,6 @@ svn_error_t *svn_swig_pl_callback_thunk(
 SV *svn_swig_pl_prophash_to_hash(apr_hash_t *hash);
 SV *svn_swig_pl_convert_hash(apr_hash_t *hash, swig_type_info *tinfo);
 
-SV *svn_swig_pl_convert_hash_of_revnum_t(apr_hash_t *hash);
-
 apr_array_header_t *svn_swig_pl_strings_to_array(SV *source,
                                                        apr_pool_t *pool);
 
@@ -105,9 +103,6 @@ apr_array_header_t *svn_swig_pl_array_to
         SV *source, apr_pool_t *pool);
 
 SV *svn_swig_pl_array_to_list(const apr_array_header_t *array);
-/* Formerly used by pre-1.0 APIs. Now unused
-SV *svn_swig_pl_ints_to_list(const apr_array_header_t *array);
-*/
 SV *svn_swig_pl_convert_array(const apr_array_header_t *array,
                               swig_type_info *tinfo);
 
@@ -162,10 +157,10 @@ svn_error_t *svn_swig_pl_thunk_authz_fun
                                           apr_pool_t *pool);
 
 /* ra callbacks. */
-svn_error_t *svn_ra_make_callbacks(svn_ra_callbacks_t **cb,
-				   void **c_baton,
-				   SV *perl_callbacks,
-				   apr_pool_t *pool);
+svn_error_t *svn_swig_pl_make_callbacks(svn_ra_callbacks_t **cb,
+                                        void **c_baton,
+                                        SV *perl_callbacks,
+                                        apr_pool_t *pool);
 
 /* thunked gnome_keyring_unlock_prompt callback function */
 svn_error_t *svn_swig_pl_thunk_gnome_keyring_unlock_prompt(char **keyring_password,
@@ -277,15 +272,15 @@ svn_error_t *svn_swig_pl_blame_func(void
 svn_boolean_t svn_swig_pl_thunk_config_enumerator(const char *name, const char *value, void *baton);
 
 /* helper for making the editor */
-void svn_delta_make_editor(svn_delta_editor_t **editor,
-                           void **edit_baton,
-                           SV *perl_editor,
-                           apr_pool_t *pool);
-
-void svn_delta_wrap_window_handler(svn_txdelta_window_handler_t *handler,
-                                   void **h_baton,
-                                   SV *callback,
-                                   apr_pool_t *pool);
+void svn_swig_pl_make_editor(svn_delta_editor_t **editor,
+                             void **edit_baton,
+                             SV *perl_editor,
+                             apr_pool_t *pool);
+
+void svn_swig_pl_wrap_window_handler(svn_txdelta_window_handler_t *handler,
+                                     void **h_baton,
+                                     SV *callback,
+                                     apr_pool_t *pool);
 
 /* svn_stream_t helpers */
 svn_error_t *svn_swig_pl_make_stream(svn_stream_t **stream, SV *obj);

Modified: subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c?rev=1506520&r1=1506519&r2=1506520&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c (original)
+++ subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c Wed Jul 24 12:36:22 2013
@@ -4033,4 +4033,7 @@ static svn_ra_reporter3_t rb_ra_reporter
   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;
+}

Modified: subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h?rev=1506520&r1=1506519&r2=1506520&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h (original)
+++ subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h Wed Jul 24 12:36:22 2013
@@ -486,10 +486,6 @@ VALUE svn_swig_rb_setup_txdelta_window_h
                                                        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);
@@ -523,7 +519,7 @@ svn_error_t *svn_swig_rb_changelist_rece
                                              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
 }

Modified: subversion/trunk/subversion/bindings/swig/svn_delta.i
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/svn_delta.i?rev=1506520&r1=1506519&r2=1506520&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/svn_delta.i (original)
+++ subversion/trunk/subversion/bindings/swig/svn_delta.i Wed Jul 24 12:36:22 2013
@@ -62,23 +62,10 @@
    thunk editors for the various language bindings.
 */
 
-#ifdef SWIGPYTHON
-void svn_swig_py_make_editor(const svn_delta_editor_t **editor,
-                             void **edit_baton,
-                             PyObject *py_editor,
-                             apr_pool_t *pool);
-#endif
-
 #ifdef SWIGPERL
 %typemap(in) (const svn_delta_editor_t *EDITOR, void *BATON) {
-    svn_delta_make_editor(&$1, &$2, $input, _global_pool);
+    svn_swig_pl_make_editor(&$1, &$2, $input, _global_pool);
 }
-
-void svn_delta_wrap_window_handler(svn_txdelta_window_handler_t *handler,
-                                   void **handler_baton,
-                                   SV *callback,
-                                   apr_pool_t *pool);
-
 #endif
 
 #ifdef SWIGRUBY

Modified: subversion/trunk/subversion/bindings/swig/svn_ra.i
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/svn_ra.i?rev=1506520&r1=1506519&r2=1506520&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/svn_ra.i (original)
+++ subversion/trunk/subversion/bindings/swig/svn_ra.i Wed Jul 24 12:36:22 2013
@@ -65,7 +65,7 @@
 #ifdef SWIGPERL
 /* FIXME: svn_ra_callbacks2_t ? */
 %typemap(in) (const svn_ra_callbacks_t *callbacks, void *callback_baton) {
-  svn_ra_make_callbacks(&$1, &$2, $input, _global_pool);
+  svn_swig_pl_make_callbacks(&$1, &$2, $input, _global_pool);
 }
 #endif
 #ifdef SWIGRUBY
@@ -90,7 +90,7 @@
 %callback_typemap(const svn_ra_reporter3_t *reporter, void *report_baton,
                   ,
                   ,
-                  svn_swig_rb_ra_reporter3)
+                  svn_swig_rb_get_ra_reporter3())
 #endif
 
 #ifndef SWIGPERL