[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r22818 - trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-12-28 07:34:52 CET

>
> > > > +#if SIZEOF_LONG_LONG == 8
> > >
> > > The current equivalent of this comparison is:
> > > sizeof(apr_int64_t) == sizeof(long long)
> > >
> > > You have hardcoded 8 instead of apr_int64_t. Is this intentional?
> Why? If so, I think you should make a note of it in the log.
> >
> > apr_int64_t's size must be 64bits and 64bits is 8bytes.
> > I think sizeof(apr_int64_t) == 8 is clear. Should I add a note?
>
> I understand the correctness of the value, but isnt it better to
> maintain it as sizeof(apr_int64_t) instead. It would be more generic,
> and would still be applicable if (in a rare case) the definition of
> apr_int64_t changes.
>
In some sense, I would say that 'apr_int64_t' is also kind of hardcoding
(see 64 in it). Any change that would make sizeof(apr_int64_t) to other
than 8 is next to impossible as it is part of apr(which should promise
portable runtime, which is not possible by changing the sizeof
apr_int64_t or some such).

So we can better live with
#if SIZEOF_LONG_LONG == 8

With regards
Kamesh Jayachandran

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Dec 28 07:34:36 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.