[mapserver-dev] mapserver.h and SWIG

Seth G sethg at geographika.co.uk
Tue May 19 15:09:26 PDT 2020


Hi all,

I've opened a new pull request at https://github.com/mapserver/mapserver/pull/6071 which adds docstrings for the classObj properties available in MapScript. These can then be used to generate automated API docs for MapScript using Sphinx. 

When adding the docstrings it would seem to make sense to regroup the struct properties. 
I'm unsure if there is currently a logical grouping or ordering, or if properties have been organically added over the years. 

It would make sense while adding docstrings to reduce the number of SWIG guards, and regroup similar to below:

  struct classObj {

#ifdef SWIG
    %immutable;
#endif

..all SWIG immutable properties
#ifdef SWIG
    %mutable;
#endif

.. all SWIG mutable properties

#ifndef SWIG
    all non-SWIG properties
#endif /* not SWIG */

};

Does anyone see any issues with this, or reservations in general to adding the docstrings?
I've read through https://stackoverflow.com/questions/26818011/does-the-order-of-members-in-a-struct-matter but there are no array properties (at least for classObj).

Regards,

Seth

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


More information about the mapserver-dev mailing list