Index: subversion/bindings/swig/svn_ra.i =================================================================== --- subversion/bindings/swig/svn_ra.i (revision 19602) +++ subversion/bindings/swig/svn_ra.i (working copy) @@ -53,6 +56,7 @@ }; %apply apr_hash_t **PROPHASH { apr_hash_t **props }; +%apply apr_hash_t **DIRENTHASH { apr_hash_t **dirents }; %apply const char *MAY_BE_NULL { const char *comment, Index: subversion/bindings/swig/include/apr.swg =================================================================== --- subversion/bindings/swig/include/apr.swg (revision 19602) +++ subversion/bindings/swig/include/apr.swg (working copy) @@ -146,14 +146,21 @@ /* ----------------------------------------------------------------------- create an OUTPUT argument defn for an apr_hash_t ** which is storing + dirent values +*/ +%typemap(python,in,numinputs=0) apr_hash_t **DIRENTHASH = apr_hash_t **OUTPUT; +%typemap(python,argout,fragment="t_output_helper") apr_hash_t **DIRENTHASH { + $result = t_output_helper($result, svn_swig_py_convert_hash(*$1, SWIGTYPE_p_svn_dirent_t, NULL)); +} + +/* ----------------------------------------------------------------------- + create an OUTPUT argument defn for an apr_hash_t ** which is storing property values */ %typemap(python,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); - $result = svn_swig_py_prophash_to_dict(*$1); +%typemap(python,argout,fragment="t_output_helper") apr_hash_t **PROPHASH { + $result = t_output_helper($result, svn_swig_py_prophash_to_dict(*$1)); } %typemap(perl5,in,numinputs=0) apr_hash_t **PROPHASH = apr_hash_t **OUTPUT;