From 4e1ff2e62f60e8a4e2e3843b896004590334293b Mon Sep 17 00:00:00 2001 From: Pengyuan Bian Date: Mon, 29 Jun 2020 17:49:23 +0000 Subject: [PATCH] move getContext into null_plugin namespace fix Signed-off-by: Pengyuan Bian --- src/null/null_plugin.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/null/null_plugin.cc b/src/null/null_plugin.cc index d96c62ef3..4b981b34b 100644 --- a/src/null/null_plugin.cc +++ b/src/null/null_plugin.cc @@ -486,18 +486,21 @@ void NullPlugin::onDelete(uint64_t context_id) { context_map_.erase(context_id); } -null_plugin::RootContext *nullVmGetRoot(string_view root_id) { +namespace null_plugin { + +RootContext *nullVmGetRoot(string_view root_id) { auto null_vm = static_cast(current_context_->wasmVm()); return static_cast(null_vm->plugin_.get())->getRoot(root_id); } -null_plugin::Context *nullVmGetContext(uint32_t context_id) { +Context *nullVmGetContext(uint32_t context_id) { auto null_vm = static_cast(current_context_->wasmVm()); return static_cast(null_vm->plugin_.get())->getContext(context_id); } -null_plugin::RootContext *getRoot(string_view root_id) { return nullVmGetRoot(root_id); } +RootContext *getRoot(string_view root_id) { return nullVmGetRoot(root_id); } -null_plugin::Context *getContext(uint32_t context_id) { return nullVmGetContext(context_id); } +Context *getContext(uint32_t context_id) { return nullVmGetContext(context_id); } +} // namespace null_plugin } // namespace proxy_wasm