| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4cc84c9 commit 4d748ad
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -260,7 +260,7 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo<Value>& args) { | |||
| 260 | 260 | result.emplace_back(OneByteString(isolate, ip)); | |
| 261 | 261 | result.emplace_back(OneByteString(isolate, netmask)); | |
| 262 | 262 | result.emplace_back(family); | |
| 263 | - result.emplace_back(FIXED_ONE_BYTE_STRING(isolate, mac)); | ||
| 263 | + result.emplace_back(OneByteString(isolate, mac.data(), mac.size() - 1)); | ||
| 264 | 264 | result.emplace_back( | |
| 265 | 265 | Boolean::New(env->isolate(), interfaces[i].is_internal)); | |
| 266 | 266 | if (interfaces[i].address.address4.sin_family == AF_INET6) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -355,14 +355,6 @@ inline v8::Local<v8::String> FIXED_ONE_BYTE_STRING(v8::Isolate* isolate, | |||
| 355 | 355 | return OneByteString(isolate, data, N - 1); | |
| 356 | 356 | } | |
| 357 | 357 | ||
| 358 | - template <std::size_t N> | ||
| 359 | - requires(N > 0) | ||
| 360 | - inline v8::Local<v8::String> FIXED_ONE_BYTE_STRING( | ||
| 361 | - v8::Isolate* isolate, const std::array<char, N>& arr) { | ||
| 362 | - CHECK_EQ(arr[N - 1], '\0'); | ||
| 363 | - return OneByteString(isolate, arr.data(), N - 1); | ||
| 364 | - } | ||
| 365 | - | ||
| 366 | 358 | // tolower() is locale-sensitive. Use ToLower() instead. | |
| 367 | 359 | inline char ToLower(char c); | |
| 368 | 360 | inline std::string ToLower(const std::string& in); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments