[mapserver-dev] typedef struct versus struct in mapserver.h

Seth G sethg at geographika.co.uk
Sun May 24 12:33:25 PDT 2020


Hi all,

While going through documenting the various objects available in MapScript I notice some objects in mapserver.h are declared:

typedef struct {
..
} symbolSetObj;

and some are declared:

struct styleObj{
...
}

The former has the minor benefit the class can be documented by SWIG within the struct, whereas the latter must be documented before it. Does anyone know if there is a reason for the differences?

It would be nice to have them using a consistent declaration but changing classObj to the first style breaks the code (see branch at [1]) due to redefinitions in the mapserver-api.h (which is the "public MapServer API" as described on the mailing list post [2]). Maybe best to leave alone if this API is used throughout other projects [3]? Or is there a way to easily update the public API?

Seth

[1] https://github.com/mapserver/mapserver/compare/master...geographika:classObj-typedef
[2] http://osgeo-org.1560.x6.nabble.com/RFC92-implementation-caused-breaking-changes-in-SWIG-bindings-td5043826.html
[3] https://github.com/search?q=mapserver-api.c&type=Code

--
web:http://geographika.co.uk
twitter: @geographika


More information about the mapserver-dev mailing list