You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2005/10/22 18:41:27 UTC

Re: svn commit: r16914 - trunk/subversion/bindings/swig/include

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.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r16914 - trunk/subversion/bindings/swig/include

Posted by Max Bowsher <ma...@ukf.net>.
Daniel Berlin wrote:
> I should note, of course, that you can't legally do #if <something> ==
> <string>
> 
> It doesn't work.
> :)

In SWIG interface files it does.

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r16914 - trunk/subversion/bindings/swig/include

Posted by Daniel Berlin <db...@dberlin.org>.
On Sat, 2005-10-22 at 19:41 +0100, Philip Martin 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.
> 

I should note, of course, that you can't legally do #if <something> ==
<string>

It doesn't work.
:)



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r16914 - trunk/subversion/bindings/swig/include

Posted by David James <ja...@gmail.com>.
On 10/22/05, Philip Martin <ph...@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