1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00

core: remove unused function StrBufNullAllocPtr()

This commit is contained in:
Bert Belder 2019-04-28 22:38:40 +02:00
parent 8978870808
commit abdb98a251
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461

View file

@ -54,17 +54,6 @@ deno_buf strbuf(const char* str) {
return buf; 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) { void assert_null(deno_buf b) {
EXPECT_EQ(b.alloc_ptr, nullptr); EXPECT_EQ(b.alloc_ptr, nullptr);
EXPECT_EQ(b.alloc_len, 0u); EXPECT_EQ(b.alloc_len, 0u);