diff options
author | David Young <dyoung@hdfgroup.org> | 2020-04-16 20:21:09 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-04-16 20:21:09 (GMT) |
commit | c69d756f7514cdd8fdb3a18d3975144a91cefcbb (patch) | |
tree | 305752208fa1e1fb69c880134f05ab1a3681e0b7 /src | |
parent | aebeeada3106247e74f3106a76c3cc0919aebdc7 (diff) | |
download | hdf5-c69d756f7514cdd8fdb3a18d3975144a91cefcbb.zip hdf5-c69d756f7514cdd8fdb3a18d3975144a91cefcbb.tar.gz hdf5-c69d756f7514cdd8fdb3a18d3975144a91cefcbb.tar.bz2 |
Oops, properly the outlet symbol-name prefix with the rest of the symbol
name, so the symbols are not prefixed with `HLOG_PREFIX` but with
`hlog_gbl_`.
Diffstat (limited to 'src')
-rw-r--r-- | src/hlog.h | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -70,9 +70,11 @@ void hlog_undefined_##__sym(void) _constructor #define HLOG_OUTLET_DECL1(__sym) extern struct hlog_outlet __sym -#define HLOG_PREFIX hlog_gbl_ +#define HLOG_JOIN_SYMS(x, y) x ## y -#define HLOG_OUTLET_DECL(__name) HLOG_OUTLET_DECL1(HLOG_PREFIX##__name) +#define HLOG_PREFIX(_sfx) HLOG_JOIN_SYMS(hlog_gbl_, _sfx) + +#define HLOG_OUTLET_DECL(__name) HLOG_OUTLET_DECL1(HLOG_PREFIX(__name)) #define HLOG_OUTLET_DEFN(__sym, __name, __parent, __state) \ struct hlog_outlet __sym = { \ @@ -83,23 +85,23 @@ void hlog_undefined_##__sym(void) _constructor HLOG_CONSTRUCTOR(__sym) #define HLOG_OUTLET_MEDIUM_DEFN(__name, __parent, __state) \ - HLOG_OUTLET_DEFN(HLOG_PREFIX##__name, #__name, &HLOG_PREFIX##__parent, \ + HLOG_OUTLET_DEFN(HLOG_PREFIX(__name), #__name, &HLOG_PREFIX(__parent), \ __state) #define HLOG_OUTLET_SHORT_DEFN(__name, __parent) \ HLOG_OUTLET_MEDIUM_DEFN(__name, __parent, HLOG_OUTLET_S_PASS) #define HLOG_OUTLET_TOP_DEFN(__name) \ - HLOG_OUTLET_DEFN(HLOG_PREFIX##__name, #__name, NULL, HLOG_OUTLET_S_PASS) + HLOG_OUTLET_DEFN(HLOG_PREFIX(__name), #__name, NULL, HLOG_OUTLET_S_PASS) HLOG_OUTLET_DECL(all); #define hlog(_name, _fmt, ...) \ - hlog_impl(&HLOG_PREFIX##_name, _fmt, __VA_ARGS__) + hlog_impl(&HLOG_PREFIX(_name), _fmt, __VA_ARGS__) #define hlog_fast(_name, ...) \ do { \ - hlog_outlet_t *_ls0 = &HLOG_PREFIX##_name; \ + hlog_outlet_t *_ls0 = &HLOG_PREFIX(_name); \ \ if (_ls0->ls_resolved == HLOG_OUTLET_S_OFF) \ break; \ |