Skip to content

Commit bf829e5

Browse files
authored
move getContext into null_plugin namespace (proxy-wasm#30)
Signed-off-by: Pengyuan Bian <[email protected]>
1 parent 1de015a commit bf829e5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/null/null_plugin.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,18 +486,21 @@ void NullPlugin::onDelete(uint64_t context_id) {
486486
context_map_.erase(context_id);
487487
}
488488

489-
null_plugin::RootContext *nullVmGetRoot(string_view root_id) {
489+
namespace null_plugin {
490+
491+
RootContext *nullVmGetRoot(string_view root_id) {
490492
auto null_vm = static_cast<NullVm *>(current_context_->wasmVm());
491493
return static_cast<NullPlugin *>(null_vm->plugin_.get())->getRoot(root_id);
492494
}
493495

494-
null_plugin::Context *nullVmGetContext(uint32_t context_id) {
496+
Context *nullVmGetContext(uint32_t context_id) {
495497
auto null_vm = static_cast<NullVm *>(current_context_->wasmVm());
496498
return static_cast<NullPlugin *>(null_vm->plugin_.get())->getContext(context_id);
497499
}
498500

499-
null_plugin::RootContext *getRoot(string_view root_id) { return nullVmGetRoot(root_id); }
501+
RootContext *getRoot(string_view root_id) { return nullVmGetRoot(root_id); }
500502

501-
null_plugin::Context *getContext(uint32_t context_id) { return nullVmGetContext(context_id); }
503+
Context *getContext(uint32_t context_id) { return nullVmGetContext(context_id); }
502504

505+
} // namespace null_plugin
503506
} // namespace proxy_wasm

0 commit comments

Comments
 (0)