David James wrote:
>Here's what Patrick wrote on Tuesday:
>>I would not considering it upgrading for javahl to use SWIG. From my
>>point of view generating the JNI header is no problem at all. I use an
>>ant script in my java ide for it. If I had to regenerate the SWIG code,
>>I always had to start a new working copy. That is much more of a problem.
>But doesn't SWIG offer benefits beyond generating the JNI headers?
>A quote from the SWIG documentation: http://www.swig.org/Doc1.3/Java.html
>"[Using SWIG] is different to using the 'javah' tool as SWIG will wrap
>existing C/C++ code, whereas javah takes 'native' Java function
>declarations and creates C/C++ function prototypes. SWIG wraps C/C++
>code using Java proxy classes and is very useful if you want to have
>access to large amounts of C/C++ code from Java. "
>The question is, how much will those capabilities benefit us?
I do not think very much for javahl. If you want to access the working
copy, file system or repository access libraries, it would be helpfull,
because you would have a much larger interface to cover. But do not see
that a target for javahl. I think that the clients for javahl will
mainly be gui's and ide plugin's.
When I started working on a java binding to subversion for svnup some
time ago, there was a very early swig binding by Alex Müller (xela). It
was not compileable and the generated classes did not look
object-oriented to me. There was a C++ binding also by Alex Müller in
the rapidsvn project, which I did like much better. Since I have written
JNI-interfaces in other projects, it was much easier and faster for me
to write a JNI-layer above the C++ binding, which I modified. For using
SWIG in that phase, I would have had to understand much more about swig
and the subversion client library. Like how to define a callback baton
in java, which will be called back by the client library or how to read
and write an apr-array.
The problem I have with SWIG lies mostly in the building system on
Windows, which did not seam to rebuild the generate code (C) after an
change in the source. This may be only a fixable problem. But for the
last time I have tried to compile any SWIG binding, it was a drag.
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Sun Sep 5 15:22:48 2004