On 10/22/05, Philip Martin <philip@codematters.co.uk> wrote:
> djames@tigris.org writes:
>
> > Author: djames
> > Date: Sat Oct 22 13:17:29 2005
> > New Revision: 16914
> >
> > Modified:
> > trunk/subversion/bindings/swig/include/svn_types.swg
> >
> > Log:
> > * subversion/bindings/swig/include/svn_types.swg
> > (apr_int64_t, svn_filesize_t): Use long long typemaps
> > on all platforms.
> >
> >
> > Modified: trunk/subversion/bindings/swig/include/svn_types.swg
> > Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/bindings/swig/include/svn_types.swg?rev=16914&p1=trunk/subversion/bindings/swig/include/svn_types.swg&p2=trunk/subversion/bindings/swig/include/svn_types.swg&r1=16913&r2=16914
> > ==============================================================================
> > --- trunk/subversion/bindings/swig/include/svn_types.swg (original)
> > +++ trunk/subversion/bindings/swig/include/svn_types.swg Sat Oct 22 13:17:29 2005
> > @@ -67,11 +67,7 @@
> > %apply long *OUTPUT { svn_node_kind_t * };
> >
> > /* svn_config_get_server_setting_int() */
> > -#if APR_INT64_T_FMT == "ld"
> > -%apply long *OUTPUT { apr_int64_t * };
> > -#else
> > %apply long long *OUTPUT { apr_int64_t * };
> > -#endif
>
> I don't know how the binding work, but there are compilers that don't
> support "long long" (it was added in C99). I think Visual C++ 6 is
> one such compiler.
We do have to be careful to avoid using "long long" in the bindings.
In this cse, the usage of the "long long" typemap is OK, because the
"long long" typemap is implemented using "apr_int64_t" and
"PY_LONG_LONG", which are both portable across operating systems.
TODO: Rename the "long long" typemap to "apr_int64_t", in order to
make clear that the typemap is portable across operating systems.
Cheers,
David
--
David James -- http://www.cs.toronto.edu/~james
Received on Mon Oct 24 06:49:30 2005