From: Ludwig Jäck Date: Fri, 31 May 2024 09:55:12 +0000 (+0200) Subject: Update preprocessor macros useful for clang X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=a70965cd27ce21e0a1d7090c11b02ce6c9481ec1;p=libt2n 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 --- 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