[geos-devel] Splitting _r and non _r functions in 2 different .h ?
strk at keybit.net
Wed Jun 18 03:52:08 PDT 2014
On Wed, Jun 18, 2014 at 12:24:48PM +0200, Even Rouault wrote:
> Thinking more about this, for the sake of simplicity of user code of GEOS, I'd
> rather suggest
> #ifndef USE_ONLY_GEOS_R_API
> Here go normal declarations (non XXXXX_r symbols)
> Here go declarations of XXXXX_r symbols
> end of file
> So user code would do
> #define USE_ONLY_GEOS_R_API
> #include <geos_c.h>
> That way it would work with both newer GEOS versions and older ones without
> trying to figure out which GEOS version is included. Which requires including
> geos_c.h ....
I prefer this one, less headers are better for me.
But maybe use a GEOS prefix for the define
As you work on this you might find some surprises (function with no _r suffix
that are indeed needed for the re-entrant api).
More information about the geos-devel