style cleanups
This commit is contained in:
@@ -60,20 +60,21 @@ const typeof( ((const type *)0)->member ) *__mptr = (ptr); \
|
|||||||
/**
|
/**
|
||||||
* Test if x is a power of 2
|
* Test if x is a power of 2
|
||||||
*
|
*
|
||||||
* @param x value
|
* @param x value, must be an unsigned type
|
||||||
* @return 1 if x is a power of 20, 0 if it is not
|
* @return 1 if x is a power of 20, 0 if it is not
|
||||||
*/
|
*/
|
||||||
#define UC_IS_POW2(x) ((x) && !((x) & (x) - 1))
|
#define UC_IS_POW2(x) ((x) && !((x) & (x) - 1))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* * Expands @x and turns it into a string.
|
* Expands @x and turns it into a string.
|
||||||
* */
|
*/
|
||||||
#define UC_STRINGIFY(x) UC_STRINGIFY_HLP(x)
|
#define UC_STRINGIFY(x) UC_STRINGIFY_HLP(x)
|
||||||
#define UC_STRINGIFY_HLP(x) #x
|
#define UC_STRINGIFY_HLP(x) #x
|
||||||
|
|
||||||
/** Macro that expands to a string for the current file:line
|
/** Macro that expands to a string for the current file:line
|
||||||
*/
|
*/
|
||||||
#define UC_SRC_LOCATION __FILE__ ":" UC_STRINGIFY(__LINE__)
|
#define UC_SRC_LOCATION __FILE__ ":" UC_STRINGIFY(__LINE__)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* assert() that is not affected by NDEBUG define
|
* assert() that is not affected by NDEBUG define
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user