[geos-devel] c api questions for SWIG

Charlie Savage cfis at savagexi.com
Mon Jul 10 17:30:38 EDT 2006


> I already renamed the enum to GEOSGeomTypes.

Hmm, let me resync again then.

> 
>> 2.  Message handlers have this signature:
>>
>>    typedef void (*GEOSMessageHandler)(const char *fmt, ...);
>>
>> Are the ... parameters ever used (I didn't see any place where they 
>> were).  If they are used, what are they?  If not, should they be removed?
> 
> '...' is for variable args.

Yes, I know.  Is it used though, and if so, how?  I'm just trying to get 
the exception handler correct.

> It's the same signature of printf from stdio.h.
> 
> I would not change this as it would break existing code.

Ok.

>> 3.  Init/Finish.  In SWIG I can automatically call initGEOS and install 
>> the message handlers.  But I don't know of a way to call finishGEOS 
>> automatically.  What happens if the SWIG bindings don't call it?
> 
> In HEAD finishGEOS() is a no-op. In 2.2 deletes a GeometryFactory.
> At worst you'll leak.

Good, that should be ok I think since on unload the whole dll or shared 
library will be unloaded.

Thanks,

Charlie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20060710/6cd3321e/smime.bin


More information about the geos-devel mailing list