#2279 closed defect (fixed)
Add msGetVersionInt()
Reported by: | dmorissette | Owned by: | dmorissette |
---|---|---|---|
Priority: | normal | Milestone: | 5.0 release |
Component: | MapServer C Library | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | |
Cc: | sdlime, hobu, warmerdam, assefa, tomkralidis |
Description
We need a msGetVersionInt() function that returns the current MapServer version number in an integer format easy to use for version checks. This is necessary for MapScript code that has to deal with changes between releases of MapServer. Since MapServer 5.0 introduced a good round of changes and we expect there may be more changes in 5.2 related to rendering, now would be a good time to introduce this function.
I propose that we create a msGetVersionInt() function in the mapserver core that returns the current version number (x.y.z) as an integer (x*0x10000 + y*0x100 + z). For instance, v5.0.0 would be 0x050000 and v4.10.3 would have been 0x040a03.
The function would be exposed to MapScript via SWIG.
It would be called ms_GetVersionInt() in PHP MapScript for consistency with the existing ms_GetVersion() function name.
Change History (2)
comment:1 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
Cc: | added |
---|
Both Steve and Tom made comments about the use of hex notation for the verison number. they have convinced me and I have decided to revert to using real decimals instead of hex notation.
Changed in r6752
The function now returns version number (x.y.z) as an integer (x*10000 + y*100 + z). For instance, v5.0.0 would be 50000 and v4.10.3 would have been 41003.
Done in r6749