Hi!
I tried compile svn-3575 against swig-1.3.16, but that led to troubles:
1) Swig complained that there is not anymore typemap(ignore)
(svn_types.i:33: Warning(119): %typemap(ignore) has been replaced by
%typemap(in,numinputs=0).) and compilation failed.
I fixed those instances and compilation continued.
However:
2) Swig tries link against apr-0 what I don't have that (I have
libapr.so (apr from cvs)), I changed apr-0 to apr, and after that
linking also succeed
I tried the produced stuff by svnlook.py, and some of commands
are working and some not (svnlook.py is out of date?):
File "./svnlook.py", line 131, in _print_tree
wrap_editor, wrap_baton = delta.svn_delta_compat_wrap(e_ptr, e_baton,
AttributeError: 'svn.delta' module has no attribute 'svn_delta_compat_wrap'
Summa summarum, I don't have the faintest idea about swig, so please take
deep look at this. Also there is need for change in ac-helper/swig.m4, but
that is trivial. I don't know if these typemap changes are backward
compatible, but I guess they aren't.
BR, Jani
P.S. If anybody has objection about what I have been done, I heard them
very nicely, because I am going to convert my cvs repositories to svn
using those bindings!
Log:
* setup.py: changed apr-0 to apr
svn_types.i, svn_string.i, svn_fs.i, svn_client.i, util.i, apr.i:
changed %typemap(ignore) to %typemap(in,numinputs=0)
Swig 1.3.16 insist on that.
Index: subversion/bindings/swig/python/setup.py
===================================================================
--- subversion/bindings/swig/python/setup.py (revision 3576)
+++ subversion/bindings/swig/python/setup.py (working copy)
@@ -165,7 +165,7 @@
),
core.Extension("_util",
[source_dir + "/util.i"],
- libraries=['svn_subr-1', 'svn_swig_py-1', 'swigpy', 'apr-0'],
+ libraries=['svn_subr-1', 'svn_swig_py-1', 'swigpy', 'apr'],
library_dirs=library_dirs,
),
Index: subversion/bindings/swig/svn_types.i
===================================================================
--- subversion/bindings/swig/svn_types.i (revision 3576)
+++ subversion/bindings/swig/svn_types.i (working copy)
@@ -28,7 +28,7 @@
typemap will be applied onto a "real" type.
*/
-%typemap(ignore) SWIGTYPE **OUTPARAM ($*1_type temp) {
+%typemap(in,numinputs=0) SWIGTYPE **OUTPARAM ($*1_type temp) {
$1 = ($1_ltype)&temp;
}
%typemap(python, argout, fragment="t_output_helper") SWIGTYPE **OUTPARAM {
Index: subversion/bindings/swig/svn_string.i
===================================================================
--- subversion/bindings/swig/svn_string.i (revision 3576)
+++ subversion/bindings/swig/svn_string.i (working copy)
@@ -63,7 +63,7 @@
}
/* svn_stringbuf_t ** is always an output parameter */
-%typemap(ignore) svn_stringbuf_t ** (svn_stringbuf_t *temp) {
+%typemap(in,numinputs=0) svn_stringbuf_t ** (svn_stringbuf_t *temp) {
$1 = &temp;
}
%apply RET_STRING { svn_stringbuf_t ** };
@@ -99,7 +99,7 @@
}
/* svn_string_t ** is always an output parameter */
-%typemap(ignore) svn_string_t ** (svn_string_t *temp) {
+%typemap(in,numinputs=0) svn_string_t ** (svn_string_t *temp) {
$1 = &temp;
}
%apply RET_STRING { svn_string_t ** };
Index: subversion/bindings/swig/svn_fs.i
===================================================================
--- subversion/bindings/swig/svn_fs.i (revision 3576)
+++ subversion/bindings/swig/svn_fs.i (working copy)
@@ -64,7 +64,7 @@
list_transaction's "apr_array_header_t **" is returning a list of strings.
*/
-%typemap(ignore) apr_array_header_t ** (apr_array_header_t *temp) {
+%typemap(in,numinputs=0) apr_array_header_t ** (apr_array_header_t *temp) {
$1 = &temp;
}
%typemap(python, argout, fragment="t_output_helper")
@@ -95,7 +95,7 @@
except for svn_fs_dir_entries, which returns svn_fs_dirent_t structures
*/
-%typemap(ignore) apr_hash_t **entries_p = apr_hash_t **OUTPUT;
+%typemap(in,numinputs=0) apr_hash_t **entries_p = apr_hash_t **OUTPUT;
%typemap(python,argout,fragment="t_output_helper") apr_hash_t **entries_p {
$result = t_output_helper(
$result,
Index: subversion/bindings/swig/svn_client.i
===================================================================
--- subversion/bindings/swig/svn_client.i (revision 3576)
+++ subversion/bindings/swig/svn_client.i (working copy)
@@ -82,7 +82,7 @@
handle the return value for svn_client_proplist()
*/
-%typemap(ignore) apr_array_header_t ** (apr_array_header_t *temp) {
+%typemap(in,numinputs=0) apr_array_header_t ** (apr_array_header_t *temp) {
$1 = &temp;
}
%typemap(python,argout,fragment="t_output_helper") apr_array_header_t ** {
@@ -138,7 +138,7 @@
/* -----------------------------------------------------------------------
handle the "statushash" OUTPUT param for svn_client_status()
*/
-%typemap(ignore) apr_hash_t **statushash = apr_hash_t **OUTPUT;
+%typemap(in,numinputs=0) apr_hash_t **statushash = apr_hash_t **OUTPUT;
%typemap(python,argout,fragment="t_output_helper") apr_hash_t **statushash {
$result = t_output_helper(
$result,
Index: subversion/bindings/swig/util.i
===================================================================
--- subversion/bindings/swig/util.i (revision 3576)
+++ subversion/bindings/swig/util.i (working copy)
@@ -146,7 +146,7 @@
the second argument to svn_parse_date is unused: always pass NULL
*/
-%typemap(ignore) struct getdate_time *now {
+%typemap(in,numinputs=0) struct getdate_time *now {
$1 = NULL;
}
Index: subversion/bindings/swig/apr.i
===================================================================
--- subversion/bindings/swig/apr.i (revision 3576)
+++ subversion/bindings/swig/apr.i (working copy)
@@ -56,7 +56,7 @@
%apply long long { apr_time_t };
/* 'apr_time_t *' will always be an OUTPUT parameter */
-%typemap(ignore) apr_time_t * (apr_time_t temp) {
+%typemap(in,numinputs=0) apr_time_t * (apr_time_t temp) {
$1 = &temp;
}
%typemap(python,argout,fragment="t_output_helper") apr_time_t * {
@@ -78,7 +78,7 @@
create an OUTPUT argument typemap for an apr_hash_t **
*/
-%typemap(ignore) apr_hash_t **OUTPUT (apr_hash_t *temp) {
+%typemap(in,numinputs=0) apr_hash_t **OUTPUT (apr_hash_t *temp) {
$1 = &temp;
}
@@ -87,7 +87,7 @@
property values
*/
-%typemap(ignore) apr_hash_t **PROPHASH = apr_hash_t **OUTPUT;
+%typemap(in,numinputs=0) apr_hash_t **PROPHASH = apr_hash_t **OUTPUT;
%typemap(python,argout) apr_hash_t **PROPHASH {
/* toss prior result, get new result from the hash */
Py_DECREF($result);
@@ -106,7 +106,7 @@
apr_file_t ** is always an OUT param
*/
-%typemap(ignore) apr_file_t ** (apr_file_t *temp) {
+%typemap(in,numinputs=0) apr_file_t ** (apr_file_t *temp) {
$1 = &temp;
}
%typemap(python,argout,fragment="t_output_helper") apr_file_t ** {
--
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 30 14:49:14 2002