[geos-devel] Interface changes

strk strk at keybit.net
Wed Jun 16 10:20:59 EDT 2004


On Wed, Jun 16, 2004 at 09:30:13AM -0400, Ferdinando Villa wrote:
> Yes please, add the version info - I think I originally put it at the
> very start of configure.in, with a matching AC_SUBST at the end - that
> should take care of it for geos-config and should propagate to the
> object files through a gcc command line define. Maybe I just thought I
> put it there :)

No geos headers appear in AC_SUBST.
Do you think geom.h is the right place ?

I think these would be useful to have:
	#define GEOS_MAJOR_VERSION 1
	#define GEOS_MINOR_VERSION 4
	#define GEOS_PATCHLEVEL 0
	#define GEOS_VERSION "1.4.0"
	int geos::geos_major_version();
	int geos::geos_minor_version();
	int geos::geos_patchlevel();
	string geos::geos_version();

Comments ?

BTW, to split version in major/minor/patchlevel configure.in should also
be modified..

> 
> One point about version numbers: the geos.m4 macro file that I added to
> the distribution (which defines GEOS_INIT(version) to be used in
> configure.in by any automake-based program that wants to check for geos)
> depends on having all three version numbers, and will not work correctly
> with two. So if we want that to keep working, we should have 1.4.0, not
> 1.4, or the m4 macro should be made smarter (probably a better idea).

probably a better idea...

--strk;

> 
> Ciao,
> ferdinando
> 
> On Wed, 2004-06-16 at 09:18, strk wrote:
> > I've updated GEOS interface to make all geometry constructors
> > copy given arguments (vector AND content).
> > 
> > As a side effect:
> > 
> >         o SegmentString constructor also copy given CoordinateList
> >           and deletes it at destruction time
> > 
> >         o SegmentString::getCoordinates() returns a copy of internal
> >           CoordinateList
> > 
> >         o new SegmentString::getCoordinatesRO() returns a pointer to
> >           the internal CoordinateList (no copy involved)
> > 
> >         o GeometryFactory::buildGeometry always returns a newly
> >           allocated geometry, so that the caller is free to delete
> >           arguments passed to it.
> > 
> >         o GeometryFactory geometry collection creators
> >           (createMulti*, createGeometryCollection) copy given
> >           vector AND content.
> > 
> > Reasoning about clients switched I've found that geos-config was 
> > broken in GEOS-1.0 (run with --version returned @@GEOS_VERSION@@
> > instead of actual version). I've fixed that, but I think a version
> > number (major,minor,patchlevel) should be put in some header for
> > ease of use. What do you think Frank ?
> > 
> > --strk;
> > _______________________________________________
> > geos-devel mailing list
> > geos-devel at geos.refractions.net
> > http://geos.refractions.net/mailman/listinfo/geos-devel
> -- 
> 
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel



More information about the geos-devel mailing list