mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
core: remove unused function StrBufNullAllocPtr()
This commit is contained in:
parent
8978870808
commit
abdb98a251
1 changed files with 0 additions and 11 deletions
|
@ -54,17 +54,6 @@ deno_buf strbuf(const char* str) {
|
|||
return buf;
|
||||
}
|
||||
|
||||
// Same as strbuf but with null alloc_ptr.
|
||||
deno_buf StrBufNullAllocPtr(const char* str) {
|
||||
auto len = strlen(str);
|
||||
deno_buf buf;
|
||||
buf.alloc_ptr = nullptr;
|
||||
buf.alloc_len = 0;
|
||||
buf.data_ptr = reinterpret_cast<uint8_t*>(strdup(str));
|
||||
buf.data_len = len;
|
||||
return buf;
|
||||
}
|
||||
|
||||
void assert_null(deno_buf b) {
|
||||
EXPECT_EQ(b.alloc_ptr, nullptr);
|
||||
EXPECT_EQ(b.alloc_len, 0u);
|
||||
|
|
Loading…
Reference in a new issue