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:
@ -45,7 +45,8 @@ MODULE_INFO info =
|
||||
MODULE_API_ROUTER,
|
||||
MODULE_BETA_RELEASE,
|
||||
ROUTER_VERSION,
|
||||
"A database sharding router for simple sharding"
|
||||
"A database sharding router for simple sharding",
|
||||
"V1.0.0"
|
||||
};
|
||||
|
||||
|
||||
@ -64,8 +65,6 @@ MODULE_INFO info =
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
static char *version_str = "V1.0.0";
|
||||
|
||||
static ROUTER* createInstance(SERVICE *service, char **options);
|
||||
static void* newSession(ROUTER *instance, SESSION *session);
|
||||
static void closeSession(ROUTER *instance, void *session);
|
||||
@ -608,16 +607,6 @@ bool check_shard_status(ROUTER_INSTANCE* router, char* shard)
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of the mandatory version entry point
|
||||
*
|
||||
* @return version string of the module
|
||||
*/
|
||||
char* version()
|
||||
{
|
||||
return version_str;
|
||||
}
|
||||
|
||||
/**
|
||||
* The module initialisation routine, called when the module
|
||||
* is first loaded.
|
||||
|
Reference in New Issue
Block a user