[gdal-dev] GIntBig in the bindings
Even Rouault
even.rouault at spatialys.com
Fri May 22 02:49:46 PDT 2015
Le vendredi 22 mai 2015 11:25:48, Ari Jolma a écrit :
> 22.05.2015, 11:38, Ari Jolma kirjoitti:
> > It seems that there are quite a few interface methods with two
> > versions where the only difference is whether GIntBig is used or not.
> > Also some methods do not have GIntBig when they actually should use it
> > since it is in the GDAL API.
> >
> > I found out that at least in Swig Perl default typemaps have long long
> > and unsigned long long. Thus using GIntBig should mostly be just the
> > case of saying
> >
> > %apply (long long) { GIntBig };
> >
> > At least Python, Java and CSharp seem to have default typemaps for
> > long long and unsigned long long.
> >
> > However, what GIntBig really is, is a configure time decision. That
> > should be somehow propagated to the bindings.
>
> It is a compile time decision. It can be propagated like this (in
> interface file) (copied a piece of cpl_port.h):
>
> %include "../../port/cpl_config.h"
> #if defined(WIN32) && defined(_MSC_VER)
> typedef __int64 GIntBig;
> typedef unsigned __int64 GUIntBig;
> #elif HAVE_LONG_LONG
> typedef long long GIntBig;
> typedef unsigned long long GUIntBig;
> #else
> typedef long GIntBig;
> typedef unsigned long GUIntBig;
> #endif
Was wondering if SWIG would recognize __int64 on Windows. According to
http://www.swig.org/Doc1.3/SWIGDocumentation.html §3.4, %include <windows.i>
would be needed
>
> Ari
>
> > Ari
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list