mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
LibACPI: Add an evaluate overload for passing the path as StringView
This commit is contained in:
1 parent
e18c3fbcc5
commit
5d5f089490
2 files changed
+6
No files matched your search
@@ -531,6 +531,11 @@ ErrorOr<IterationDecision> Interpreter::cycle(TableStream& stream)
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
ErrorOr<Object> Interpreter::evaluate(StringView path)
|
||||
{
|
||||
return evaluate(TRY(NameString::from_string_view(path)));
|
||||
}
|
||||
|
||||
ErrorOr<Object> Interpreter::evaluate(NameString const& path)
|
||||
{
|
||||
auto node = TRY(find_node(path, m_namespace_root));
|
||||
|
||||
@@ -52,6 +52,7 @@ public:
|
||||
ErrorOr<void> load(ReadonlyBytes bytes);
|
||||
ErrorOr<void> print_namespace() const;
|
||||
|
||||
ErrorOr<Object> evaluate(StringView path);
|
||||
ErrorOr<Object> evaluate(NameString const& path);
|
||||
|
||||
private:
|
||||
|
||||
Reference in new issue
Block a user