While I'm working through the SWIG bindings, I've come up with a few questions/issues about the c api.

1. GEOSGeomTypeId. This is both a method name in the CAPI and the name of an enum. This causes problems in the SWIG bindings because I have code that does this:

    GEOSGeomTypeIdgeomId = (GEOSGeomTypeId)GEOSGeomTypeId(geom);

    switch (geomId)
    {
    case GEOS_POINT:
    case GEOS_LINESTRING:
    etc.
    }

VC++ won't compile this code (haven't checked gcc). However, it seems like a bad idea to have the same identifier used for two different things. Can we change the name of the enum to something like GeomTypeID?

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?

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?

Thanks,

Charlie






Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
geos-devel mailing list
geos-devel@geos.refractions.net
http://geos.refractions.net/mailman/listinfo/geos-devel

Reply via email to