From a70965cd27ce21e0a1d7090c11b02ce6c9481ec1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ludwig=20J=C3=A4ck?= Date: Fri, 31 May 2024 11:55:12 +0200 Subject: [PATCH] Update preprocessor macros useful for clang Clang does not support the 'gccxml' attribute. User defined string attributes need to use the 'annotate' attribute. See Github issue: https://github.com/CastXML/CastXML/issues/25 --- codegen/codegen-stubhead.hxx | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/codegen/codegen-stubhead.hxx b/codegen/codegen-stubhead.hxx index d55f323..3009da1 100644 --- a/codegen/codegen-stubhead.hxx +++ b/codegen/codegen-stubhead.hxx @@ -30,7 +30,7 @@ on this file might be covered by the GNU General Public License. #include #include -#ifdef __GCCXML__ +#ifdef __castxml__ // used during parsing run with gccxml /** @brief mark a function to export it via libt2n @@ -42,7 +42,7 @@ on this file might be covered by the GNU General Public License. } @endcode */ -#define LIBT2N_EXPORT __attribute((gccxml("libt2n-default"))) +#define LIBT2N_EXPORT __attribute__((annotate("libt2n-default"))) /** @brief tell libt2n about a default argument @@ -58,11 +58,10 @@ on this file might be covered by the GNU General Public License. @remarks Codegen gets default arguments via this define (gccxml-attribute) because gccxml does not correctly output them (e.g. the namespace is ambiguous) */ -#define LIBT2N_DEFAULT_ARG(type,value) __attribute((gccxml("libt2n-default-arg",#value))) type = value +#define LIBT2N_DEFAULT_ARG(type,value) __attribute__((annotate("libt2n-default-arg,"#value))) type = value #else // used during regular compile - #define LIBT2N_EXPORT #define LIBT2N_DEFAULT_ARG(type,value) type = value -- 1.7.1