diff options
author | Ben Smith <binji@chromium.org> | 2016-05-03 14:59:32 -0700 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2016-05-03 15:39:57 -0700 |
commit | 65a4e0d29a5bea9057bbb4a1e5bd7d7299ff5f55 (patch) | |
tree | 9be30968e04d35979bdc4608fbbb833424cb76ae /src/wasm-binary-writer-spec.c | |
parent | 0dd2d7f2374f422d344255f77450fb1616fd2fb9 (diff) | |
download | wabt-65a4e0d29a5bea9057bbb4a1e5bd7d7299ff5f55.tar.gz wabt-65a4e0d29a5bea9057bbb4a1e5bd7d7299ff5f55.tar.bz2 wabt-65a4e0d29a5bea9057bbb4a1e5bd7d7299ff5f55.zip |
remove wasm prefix from non-extern stuff
Stuff includes functions, macros, enums and structs, but that won't fit
nicely on the commit line.
Diffstat (limited to 'src/wasm-binary-writer-spec.c')
-rw-r--r-- | src/wasm-binary-writer-spec.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/wasm-binary-writer-spec.c b/src/wasm-binary-writer-spec.c index e009e6c3..e32075a2 100644 --- a/src/wasm-binary-writer-spec.c +++ b/src/wasm-binary-writer-spec.c @@ -44,7 +44,7 @@ #define CHECK_ALLOC_(cond) \ do { \ - if (!(cond)) { \ + if (!(cond)) { \ ALLOC_FAILURE; \ ctx->result = WASM_ERROR; \ return; \ @@ -54,14 +54,14 @@ #define CHECK_ALLOC(e) CHECK_ALLOC_(WASM_SUCCEEDED(e)) #define CHECK_ALLOC_NULL(v) CHECK_ALLOC_((v) != NULL) -typedef struct WasmWriteSpecContext { +typedef struct Context { WasmAllocator* allocator; WasmWriter* writer; size_t writer_offset; const WasmWriteBinaryOptions* options; const WasmWriteBinarySpecOptions* spec_options; WasmResult result; -} WasmWriteSpecContext; +} Context; static WasmBool is_nan_f32(uint32_t bits) { return (bits & 0x7f800000) == 0x7f800000 && (bits & 0x007fffff) != 0; @@ -327,9 +327,7 @@ static WasmFunc* append_nullary_func(WasmAllocator* allocator, return module->funcs.data[func_index]; } -static void write_module(WasmWriteSpecContext* ctx, - uint32_t index, - WasmModule* module) { +static void write_module(Context* ctx, uint32_t index, WasmModule* module) { WasmResult result; WasmWriter* writer = NULL; CALLBACK(ctx, on_module_before_write, index, &writer); @@ -344,7 +342,7 @@ static void write_module(WasmWriteSpecContext* ctx, CALLBACK(ctx, on_module_end, index, result); } -static void write_commands(WasmWriteSpecContext* ctx, WasmScript* script) { +static void write_commands(Context* ctx, WasmScript* script) { uint32_t i; uint32_t num_modules = 0; WasmModule* last_module = NULL; @@ -509,7 +507,7 @@ WasmResult wasm_write_binary_spec_script( WasmScript* script, const WasmWriteBinaryOptions* options, const WasmWriteBinarySpecOptions* spec_options) { - WasmWriteSpecContext ctx; + Context ctx; WASM_ZERO_MEMORY(ctx); ctx.allocator = allocator; ctx.options = options; |