diff options
author | Ben Smith <binjimin@gmail.com> | 2017-03-02 23:14:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-02 23:14:31 -0800 |
commit | 2759d4646d9ec9fdb37a4b0b7ba40a972dd509de (patch) | |
tree | 986d11d9fd431ae53b6eab17757aa7e32d3af39f /src/binary.h | |
parent | 73fc2e25a9d49aa2188ed1ca25260ba76a475df3 (diff) | |
download | wabt-2759d4646d9ec9fdb37a4b0b7ba40a972dd509de.tar.gz wabt-2759d4646d9ec9fdb37a4b0b7ba40a972dd509de.tar.bz2 wabt-2759d4646d9ec9fdb37a4b0b7ba40a972dd509de.zip |
Replace the Wabt/wabt prefix with a C++ namespace (#331)
Diffstat (limited to 'src/binary.h')
-rw-r--r-- | src/binary.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/binary.h b/src/binary.h index 31c1dd54..4e64f2b1 100644 --- a/src/binary.h +++ b/src/binary.h @@ -40,8 +40,10 @@ V(Code, code, 10) \ V(Data, data, 11) +namespace wabt { + /* clang-format off */ -enum class WabtBinarySection { +enum class BinarySection { #define V(Name, name, code) Name = code, WABT_FOREACH_BINARY_SECTION(V) #undef V @@ -51,15 +53,15 @@ enum class WabtBinarySection { Last = Data, }; /* clang-format on */ -static const int kWabtBinarySectionCount = WABT_ENUM_COUNT(WabtBinarySection); +static const int kBinarySectionCount = WABT_ENUM_COUNT(BinarySection); -WABT_EXTERN_C_BEGIN -extern const char* g_wabt_section_name[]; +extern const char* g_section_name[]; -static WABT_INLINE const char* wabt_get_section_name(WabtBinarySection sec) { - assert(static_cast<int>(sec) < kWabtBinarySectionCount); - return g_wabt_section_name[static_cast<size_t>(sec)]; +static WABT_INLINE const char* get_section_name(BinarySection sec) { + assert(static_cast<int>(sec) < kBinarySectionCount); + return g_section_name[static_cast<size_t>(sec)]; } -WABT_EXTERN_C_END + +} // namespace wabt #endif /* WABT_BINARY_H_ */ |