summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorNathan Scott <natoscott@users.noreply.github.com>2020-08-14 21:45:34 +1000
committerGitHub <noreply@github.com>2020-08-14 14:45:34 +0300
commit11cd983d58199b6ac7fa54049734457bd767a0b5 (patch)
tree048258d2df0d38901c9bad3475db1e051fca8550 /deps
parentd10b2f3173ebfcc673d4ec36efef512802e3a535 (diff)
downloadredis-11cd983d58199b6ac7fa54049734457bd767a0b5.tar.gz
Annotate module API functions in redismodule.h for use with -fno-common (#6900)
In order to keep the redismodule.h self-contained but still usable with gcc v10 and later, annotate each API function tentative definition with the __common__ attribute. This avoids the 'multiple definition' errors modules will otherwise see for all API functions at link time. Further details at gcc.gnu.org/gcc-10/porting_to.html Turn the existing __attribute__ ((unused)), ((__common__)) and ((print)) annotations into conditional macros for any compilers not accepting this syntax. These macros only expand to API annotations under gcc. Provide a pre- and post- macro for every API function, so that they can be defined differently by the file that includes redismodule.h. Removing REDISMODULE_API_FUNC in the interest of keeping the function declarations readable. Co-authored-by: Yossi Gottlieb <yossigo@gmail.com> Co-authored-by: Oran Agra <oran@redislabs.com>
Diffstat (limited to 'deps')
0 files changed, 0 insertions, 0 deletions