| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2024-04-18 02:30:16 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2024-04-18 02:30:16 UTC |
| parent | 6fbe2bdf6025495176afa9dfd3ecca6a8813ef34 |
| HaxeCBridge.hx | +4 | -2 |
diff --git a/HaxeCBridge.hx b/HaxeCBridge.hx index 6fb9239..2f267cd 100644 --- a/HaxeCBridge.hx +++ b/HaxeCBridge.hx @@ -536,7 +536,7 @@ class HaxeCBridge { return code(' /** - * snikket.h the Snikket SDK for C + * \\file snikket.h the Snikket SDK for C * * Everything returned from an SDK procedure or passed to a function * pointer, both strings and opaque types, must be passed to @@ -545,6 +545,8 @@ class HaxeCBridge { #ifndef __${hx.strings.Strings.toUpperUnderscore(namespace)}_H #define __${hx.strings.Strings.toUpperUnderscore(namespace)}_H + + #ifndef MKDOCS ') + (if (includes.length > 0) includes.map(CPrinter.printInclude).join('\n') + '\n\n'; else '') + (if (ctx.macros.length > 0) ctx.macros.join('\n') + '\n' else '') @@ -562,7 +564,7 @@ class HaxeCBridge { '); } else '') - + 'typedef void (*snikket_panic_callback) (const char *info);\n\n' + + '#endif\n\ntypedef void (*snikket_panic_callback) (const char *info);\n\n' + (if (ctx.supportTypeDeclarations.length > 0) ctx.supportTypeDeclarations.map(d -> CPrinter.printDeclaration(d, true)).join(';\n\n') + ';\n\n'; else '') + (if (ctx.typeDeclarations.length > 0) ctx.typeDeclarations.map(d -> CPrinter.printDeclaration(d, true)).join(';\n\n') + ';\n'; else '')