[prev in list] [next in list] [prev in thread] [next in thread]
List: subversion-cvs
Subject: svn commit: rev 7584 - in trunk: . subversion/bindings/swig
From: jerenkrantz () tigris ! org
Date: 2003-10-31 9:52:49
[Download RAW message or body]
Author: jerenkrantz
Date: Fri Oct 31 03:52:48 2003
New Revision: 7584
Modified:
trunk/Makefile.in
trunk/subversion/bindings/swig/swigutil_java.c
Log:
Assorted SWIG Java binding fixes.
* Makefile.in: Need to add in the $(srcdir) copies of the SWIG wrappers;
Need to hack around different SWIG versions outputting the .java files
in different locations (1.3.16 does in cwd and 1.3.19 does in -o dir).
* subversion/bindings/swig/swigutil_java.c
(close_baton_checksum): Used for the close_file call back that has 3 params.
(thunk_apply_textdelta): Adjust for new prototype.
(thunk_close_file): Adjust for new prototype and call new stub.
Modified: trunk/Makefile.in
==============================================================================
--- trunk/Makefile.in (original)
+++ trunk/Makefile.in Fri Oct 31 03:52:48 2003
@@ -181,15 +181,21 @@
SWIG_JAVA_DIR = $(abs_builddir)/subversion/bindings/swig/java
# These are the 'extra' classes which complement SWIG's generated bindings
SWIG_EXTRA_JAVA_DIR = $(abs_srcdir)/subversion/bindings/java
+SWIG_EXTRA_SWIG_DIR = $(abs_srcdir)/subversion/bindings/swig/java
SWIG_JAVA_SOURCES = $(SWIG_EXTRA_JAVA_DIR)/org/tigris/subversion/*.java \
$(SWIG_EXTRA_JAVA_DIR)/org/tigris/subversion/auth/*.java \
$(SWIG_EXTRA_JAVA_DIR)/org/tigris/subversion/client/*.java \
$(SWIG_EXTRA_JAVA_DIR)/org/tigris/subversion/opt/*.java \
$(SWIG_EXTRA_JAVA_DIR)/org/tigris/subversion/wc/*.java \
+ $(SWIG_EXTRA_SWIG_DIR)/org/tigris/subversion/util/*.java \
+ $(SWIG_EXTRA_SWIG_DIR)/org/tigris/subversion/client/*.java \
$(SWIG_JAVA_DIR)/org/tigris/subversion/swig/*.java
+# Have to work around different versions of SWIG that output the java files
+# in different directories.
INSTALL_EXTRA_SWIG_JAVA=\
if [ ! -d $(SWIG_JAVA_DIR)/build ]; then mkdir $(SWIG_JAVA_DIR)/build; fi; \
+ if [ ! -f $(SWIG_JAVA_DIR)/org/tigris/subversion/swig/clientJNI.java ]; then mv \
$(SWIG_JAVA_DIR)/*.java $(SWIG_JAVA_DIR)/org/tigris/subversion/swig; fi; \ $(JAVAC) \
-g -d $(SWIG_JAVA_DIR)/build $(SWIG_JAVA_SOURCES); \ $(JAR) cf \
$(SWIG_JAVA_DIR)/build/svn-api.jar -C $(SWIG_JAVA_DIR)/build org; \ $(INSTALL_DATA) \
$(SWIG_JAVA_DIR)/build/svn-api.jar $(DESTDIR)$(swig_javadir);
Modified: trunk/subversion/bindings/swig/swigutil_java.c
==============================================================================
--- trunk/subversion/bindings/swig/swigutil_java.c (original)
+++ trunk/subversion/bindings/swig/swigutil_java.c Fri Oct 31 03:52:48 2003
@@ -413,6 +413,40 @@
return SVN_NO_ERROR;
}
+static svn_error_t * close_baton_checksum(void *baton,
+ const char *text_checksum,
+ const char *method)
+{
+ item_baton *ib = baton;
+ jobject result;
+ JNIEnv *jenv = ib->jenv;
+ jclass cls = JCALL1(GetObjectClass, jenv, ib->editor);
+ jmethodID methodID;
+
+ methodID = JCALL3(GetMethodID, jenv, cls, method,
+ "(Ljava/lang/Object;)Ljava/lang/Object;");
+ result = JCALL4(CallObjectMethod, jenv, ib->editor, methodID, ib->baton,
+ text_checksum);
+
+ if (result == NULL)
+ return convert_exception(ib->jenv, ib->pool);
+
+ /* there is no return value, so just toss this object */
+ JCALL1(DeleteGlobalRef, ib->jenv, result);
+
+ /* We're now done with the baton. Since there isn't really a free, all
+ we need to do is note that its objects are no longer referenced by
+ the baton. */
+ JCALL1(DeleteGlobalRef, ib->jenv, ib->editor);
+ JCALL1(DeleteGlobalRef, ib->jenv, ib->baton);
+
+#ifdef SVN_DEBUG
+ ib->editor = ib->baton = NULL;
+#endif
+
+ return SVN_NO_ERROR;
+}
+
static svn_error_t * thunk_set_target_revision(void *edit_baton,
svn_revnum_t target_revision,
apr_pool_t *pool)
@@ -655,7 +689,6 @@
static svn_error_t * thunk_apply_textdelta(
void *file_baton,
const char *base_checksum,
- const char *result_checksum,
apr_pool_t *pool,
svn_txdelta_window_handler_t *handler,
void **h_baton)
@@ -720,9 +753,11 @@
return SVN_NO_ERROR;
}
-static svn_error_t * thunk_close_file(void *file_baton, apr_pool_t *pool)
+static svn_error_t * thunk_close_file(void *file_baton,
+ const char *text_checksum,
+ apr_pool_t *pool)
{
- return close_baton(file_baton, "close_file");
+ return close_baton_checksum(file_baton, text_checksum, "close_file");
}
static svn_error_t * thunk_close_edit(void *edit_baton, apr_pool_t *pool)
---------------------------------------------------------------------
To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
For additional commands, e-mail: svn-help@subversion.tigris.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic