From e335663da08eddc77545755e6a97818428163bdb Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Sun, 17 Feb 2019 21:33:54 +0100 Subject: [PATCH] eolian gen: emit doxygen references to constants in uppercase Since these are made into macros in C, they get uppercase names. Reflect this in documentation generation. Fixes T7691. --- src/bin/eolian/docs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c index 60ccf1b1b2..5690594230 100644 --- a/src/bin/eolian/docs.c +++ b/src/bin/eolian/docs.c @@ -28,6 +28,13 @@ _generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf, char *n = strdup(eolian_object_name_get(decl)); char *p = n; while ((p = strchr(p, '.'))) *p = '_'; + if (eolian_object_type_get(decl) == EOLIAN_OBJECT_VARIABLE) + { + const Eolian_Variable *v = (const Eolian_Variable *)decl; + /* constants are emitted as macros */ + if (eolian_variable_type_get(v) == EOLIAN_VAR_CONSTANT) + eina_str_toupper(&n); + } eina_strbuf_append(wbuf, n); free(n); return;