Opened 6 years ago
Closed 5 years ago
#7190 closed defect (wontfix)
API: Two copies of GDALCheckVersion and GDALVersionInfo
Reported by: | Kurt Schwehr | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | api |
Cc: |
Description
GDALCheckVersion and GDALVersionInfo are in two header locations. Can we copy the docs to gdal.h and remove the one in ogr_core.h?
gdal.h:
/* Note to developers : please keep this section in sync with ogr_core.h */ #ifndef GDAL_VERSION_INFO_DEFINED #ifndef DOXYGEN_SKIP #define GDAL_VERSION_INFO_DEFINED #endif const char CPL_DLL * CPL_STDCALL GDALVersionInfo( const char * ); #endif #ifndef GDAL_CHECK_VERSION int CPL_DLL CPL_STDCALL GDALCheckVersion( int nVersionMajor, int nVersionMinor, const char* pszCallingComponentName); /** Helper macro for GDALCheckVersion() @see GDALCheckVersion() */ #define GDAL_CHECK_VERSION(pszCallingComponentName) \ GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName) #endif
ogr_core.h
/* ------------------------------------------------------------------- */ /* Version checking */ /* -------------------------------------------------------------------- */ #ifndef DOXYGEN_SKIP /* Note to developers : please keep this section in sync with gdal.h */ #ifndef GDAL_VERSION_INFO_DEFINED #define GDAL_VERSION_INFO_DEFINED const char CPL_DLL * CPL_STDCALL GDALVersionInfo( const char * ); #endif #ifndef GDAL_CHECK_VERSION /** Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor. The purpose of this method is to ensure that calling code will run with the GDAL version it is compiled for. It is primarily indented for external plugins. @param nVersionMajor Major version to be tested against @param nVersionMinor Minor version to be tested against @param pszCallingComponentName If not NULL, in case of version mismatch, the method will issue a failure mentioning the name of the calling component. */ int CPL_DLL CPL_STDCALL GDALCheckVersion( int nVersionMajor, int nVersionMinor, const char* pszCallingComponentName); /** Helper macro for GDALCheckVersion */ #define GDAL_CHECK_VERSION(pszCallingComponentName) \ GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName) #endif #endif /* #ifndef DOXYGEN_SKIP */
Change History (3)
comment:1 by , 6 years ago
Keywords: | api added |
---|---|
Summary: | Two copies of GDALCheckVersion and GDALVersionInfo → API: Two copies of GDALCheckVersion and GDALVersionInfo |
comment:2 by , 6 years ago
comment:3 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.
Note:
See TracTickets
for help on using tickets.
I gave an initial try at this, but my first attempt melted.