summaryrefslogtreecommitdiff
path: root/src/wasm-binary-writer.c
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2016-01-05 11:13:50 -0800
committerDerek Schuff <dschuff@chromium.org>2016-01-05 11:13:50 -0800
commit0b039cdd94ba166b83a37fcbff3b6d50ae4faf07 (patch)
tree5f6c318482ea7b7c04945451f4eefa33cb23cf29 /src/wasm-binary-writer.c
parente833f46a5ff354901878d31e863a7989ab875329 (diff)
downloadwabt-0b039cdd94ba166b83a37fcbff3b6d50ae4faf07.tar.gz
wabt-0b039cdd94ba166b83a37fcbff3b6d50ae4faf07.tar.bz2
wabt-0b039cdd94ba166b83a37fcbff3b6d50ae4faf07.zip
Support use of parser and AST in C++ programs
Rename 'export' field of WasmModuleField because 'export' is a reserved word in C++ (and regenerate the parser). Wrap functions declared in wasm.h in extern "C"
Diffstat (limited to 'src/wasm-binary-writer.c')
-rw-r--r--src/wasm-binary-writer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wasm-binary-writer.c b/src/wasm-binary-writer.c
index a62b668e..f94cd632 100644
--- a/src/wasm-binary-writer.c
+++ b/src/wasm-binary-writer.c
@@ -1338,7 +1338,7 @@ static WasmModuleField* append_module_field_and_fixup(
WasmExportPtr* export_ptr = wasm_append_export_ptr(&module->exports);
if (!export_ptr)
goto fail;
- *export_ptr = &result->export;
+ *export_ptr = &result->wasm_export;
break;
}
case WASM_MODULE_FIELD_TYPE_FUNC_TYPE: {
@@ -1380,7 +1380,7 @@ static WasmModuleField* append_module_field_and_fixup(
break;
case WASM_MODULE_FIELD_TYPE_EXPORT:
assert(num_exports < module->exports.size);
- module->exports.data[num_exports++] = &field->export;
+ module->exports.data[num_exports++] = &field->wasm_export;
break;
case WASM_MODULE_FIELD_TYPE_TABLE:
module->table = &field->table;
@@ -1435,7 +1435,7 @@ static WasmFunc* append_nullary_func(WasmModule* module,
/* leave the func field, it will be cleaned up later */
return NULL;
}
- WasmExport* export = &export_field->export;
+ WasmExport* export = &export_field->wasm_export;
export->var.type = WASM_VAR_TYPE_INDEX;
export->var.index = func_index;
export->name = export_name;