src: add `string_view` overload to snapshot FromBlob · nodejs/node@43fa6a1 · GitHub
Skip to content

Commit 43fa6a1

Browse files
addaleaxaduh95
authored andcommitted
src: add string_view overload to snapshot FromBlob
The `const std::vector<char>&` variant only delegates to a method that converts it to a `std::string_view` anyway, but adding this capability to the public API as well means that it’s easier to store snapshot data in embedding applications (because using `std::vector<>` enforces heap allocation and `std::string_view` does not). PR-URL: #52595 Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent b2f754c commit 43fa6a1

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/api/embed_helpers.cc

Lines changed: 5 additions & 0 deletions

src/node.h

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)