mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-07 00:20:24 +01:00
Minor fixups of test_bitmapset.c
The macro's comment had become outdated from a prior version and there's now no longer a need for the do/while loop (or my misplaced semi-colon). Author: David Rowley <dgrowleyml@gmail.com> Discussion: https://postgr.es/m/CAApHDvr+P454SP_LDvB=bViPAbDQhV1Jmg5M55GEKz0d3z25NA@mail.gmail.com
This commit is contained in:
parent
9952f6c05a
commit
3a66158068
|
|
@ -95,15 +95,11 @@ PG_FUNCTION_INFO_V1(test_random_operations);
|
||||||
(PG_ARGISNULL(n) ? NULL : TEXT_TO_BITMAPSET(PG_GETARG_TEXT_PP(n)))
|
(PG_ARGISNULL(n) ? NULL : TEXT_TO_BITMAPSET(PG_GETARG_TEXT_PP(n)))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper macro to handle converting sets back to text, freeing the set and
|
* Helper macro to handle converting sets back to text, returning the
|
||||||
* returning the resulting text representation of the set. Beware of double
|
* resulting text representation of the set.
|
||||||
* evaluation hazard of 'bms'.
|
|
||||||
*/
|
*/
|
||||||
#define PG_RETURN_BITMAPSET_AS_TEXT(bms) \
|
#define PG_RETURN_BITMAPSET_AS_TEXT(bms) \
|
||||||
do { \
|
PG_RETURN_TEXT_P(BITMAPSET_TO_TEXT(bms))
|
||||||
text *result = BITMAPSET_TO_TEXT(bms); \
|
|
||||||
PG_RETURN_TEXT_P(result); \
|
|
||||||
} while (0);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Individual test functions for each bitmapset API function
|
* Individual test functions for each bitmapset API function
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user