Move version entry point into MODULE_INFO
The MODULE_INFO can easily hold the version information of the module. This removes the need for a explicit version entry point.
This commit is contained in:
@ -46,7 +46,8 @@ MODULE_INFO info =
|
||||
MODULE_API_PROTOCOL,
|
||||
MODULE_GA,
|
||||
GWPROTOCOL_VERSION,
|
||||
"A maxscale protocol for the administration interface"
|
||||
"A maxscale protocol for the administration interface",
|
||||
"V2.0.0"
|
||||
};
|
||||
/*lint +e14 */
|
||||
|
||||
@ -64,8 +65,6 @@ MODULE_INFO info =
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
static char *version_str = "V2.0.0";
|
||||
|
||||
#define GETPWUID_BUF_LEN 255
|
||||
|
||||
static int maxscaled_read_event(DCB* dcb);
|
||||
@ -192,20 +191,6 @@ static GWPROTOCOL MyObject =
|
||||
NULL /**< Connection limit reached */
|
||||
};
|
||||
|
||||
/**
|
||||
* Implementation of the mandatory version entry point
|
||||
*
|
||||
* @return version string of the module
|
||||
*
|
||||
* @see function load_module in load_utils.c for explanation of the following
|
||||
* lint directives.
|
||||
*/
|
||||
/*lint -e14 */
|
||||
char* version()
|
||||
{
|
||||
return version_str;
|
||||
}
|
||||
|
||||
/**
|
||||
* The module initialisation routine, called when the module
|
||||
* is first loaded.
|
||||
|
||||
Reference in New Issue
Block a user