Skip to content

Commit 87d12c2

Browse files
irmenkripken
authored andcommitted
Move WASM_DEPRECATED so that binaryen-c.h is selfcontained. Fixes #2054 (#2399)
1 parent d255089 commit 87d12c2

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/binaryen-c.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@
4747
#include <stddef.h>
4848
#include <stdint.h>
4949

50-
#include "compiler-support.h"
50+
#ifdef __GNUC__
51+
#define WASM_DEPRECATED __attribute__((deprecated))
52+
#elif defined(_MSC_VER)
53+
#define WASM_DEPRECATED __declspec(deprecated)
54+
#else
55+
#define WASM_DEPRECATED
56+
#endif
5157

5258
#if defined(_MSC_VER) && !defined(BUILD_STATIC_LIBRARY)
5359
#define BINARYEN_API __declspec(dllexport)

src/compiler-support.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,10 @@
5050

5151
#ifdef __GNUC__
5252
#define WASM_NORETURN __attribute__((noreturn))
53-
#define WASM_DEPRECATED __attribute__((deprecated))
5453
#elif defined(_MSC_VER)
5554
#define WASM_NORETURN __declspec(noreturn)
56-
#define WASM_DEPRECATED __declspec(deprecated)
5755
#else
5856
#define WASM_NORETURN
59-
#define WASM_DEPRECATED
6057
#endif
6158

6259
// The code might contain TODOs or stubs that read some values but do nothing

0 commit comments

Comments
 (0)