[geos-devel] Thread safe error handling

Pepijn Van Eeckhoudt pepijn at vaneeckhoudt.net
Mon Sep 9 03:37:02 PDT 2013


On ma, 2013-09-09 at 10:49 +0200, Sandro Santilli wrote:
> On Mon, Sep 09, 2013 at 09:43:51AM +0200, Pepijn Van Eeckhoudt wrote:
> Can't we turn NOTICE_MESSAGE and ERROR_MESSAGE into variadic methods
> of the GEOSContextHandlerInternal class ? We could print to a string
> and always pass a single string to the user-provided function, using
> an hardcoded "%s" format for it.
Not sure if I understand this correctly. Do you mean you would do the
actual formatting on the geos side and pass the formatted string as
'fmt' then? That would work if you're ok with the subtle behavioural
change. Seems unlikely that anyone would count on the exact contents of
'fmt' and the parameter list, but you never know...

Memory allocation for the formatted string shifts to geos then as well;
do you think that's an issue?

Pepijn



More information about the geos-devel mailing list