-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RESTINIO_VERSION and related macros added.
- Loading branch information
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* RESTinio | ||
*/ | ||
|
||
/*! | ||
* @file | ||
* @brief Definition of RESTINIO_VERSION macro | ||
* | ||
* @since v.0.6.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
// The current version is 0.6.0 | ||
// | ||
/*! | ||
* The major part of version number. | ||
* | ||
* If RESTinio's version is 0.6.0 then RESTINIO_VERSION_MAJOR==0. | ||
* If RESTinio's version is 1.2.4 then RESTINIO_VERSION_MAJOR==1. | ||
*/ | ||
#define RESTINIO_VERSION_MAJOR 0ull | ||
|
||
/*! | ||
* The minon part of version number. | ||
* | ||
* If RESTinio's version is 0.6.0 then RESTINIO_VERSION_MINOR==6. | ||
*/ | ||
#define RESTINIO_VERSION_MINOR 6ull | ||
|
||
/*! | ||
* The patch part of version number. | ||
* | ||
* If RESTinio's version is 0.6.23 then RESTINIO_VERSION_PATCH==23. | ||
*/ | ||
#define RESTINIO_VERSION_PATCH 0ull | ||
|
||
/*! | ||
* Helper macro for make single number representation of RESTinio's version. | ||
* | ||
* It can be used that way: | ||
* \code | ||
* // Some feature is available only from 1.2.4 | ||
* #if RESTINIO_VERSION >= RESTINIO_VERSION_MAKE(1, 2, 4) | ||
* ... // Some 1.2.4 (or above) specific code. | ||
* #endif | ||
* \endcode | ||
*/ | ||
#define RESTINIO_VERSION_MAKE(major, minor, patch) \ | ||
(((major) * 1000000ull) + \ | ||
((minor) * 1000ull) + \ | ||
(patch)) | ||
|
||
/*! | ||
* A single number representation of RESTinio version. | ||
* | ||
* For example it can be 6003ull for RESTinio-0.6.3. | ||
* Or 1004023ull for RESTinio-1.4.23. | ||
*/ | ||
#define RESTINIO_VERSION RESTINIO_VERSION_MAKE( \ | ||
RESTINIO_VERSION_MAJOR,\ | ||
RESTINIO_VERSION_MINOR,\ | ||
RESTINIO_VERSION_PATCH) | ||
|