[geos-devel] Thread safe error handling

Pepijn Van Eeckhoudt pepijn at vaneeckhoudt.net
Mon Sep 9 06:44:16 PDT 2013


On ma, 2013-09-09 at 15:29 +0200, Sandro Santilli wrote:
> You should need to change anything in the callers if you made
> "handle" an instance of GEOSContextHandleInternal_t class.
> It should be enough to change initGEOS_r to do
> 
>     extHandle = new GEOSContextHandleInternal_t();
> 
> instead of
> 
>     extHandle = malloc(sizeof(GEOSContextHandleInternal_t));
> 
> And finishGEOS_r to do:
> 
>     delete extHandle;
> 
> instead of 
> 
>     free(extHandle);
> 
> PS: if you're comfortable with git, consider forking from the official
>     git mirror: https://github.com/postgis/postgis/
You mean https://github.com/libgeos/libgeos.git right? That's what I
cloned from.

In the version of geos_ts_c.cpp I'm looking at
GEOSContextHandleInternal_t is a typedef for struct
GEOSContextHandleInternal. I can change it to be a class if you like.

Are we talking about the same GEOSContextHandleInternal_t?

Pepijn



More information about the geos-devel mailing list