GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — ios/NativeScript/runtime/OneByteStringResource.cpp at main · NativeScript/ios Expand file tree/ Copy pathOneByteStringResource.cppMore file actions 39 lines (30 loc) · 1.1 KB / Copy pathOneByteStringResource.cppFile metadata and controls39 lines (30 loc) · 1.1 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 #include "OneByteStringResource.h" #include <cstdlib> #include <new> using namespace v8; namespace tns { OneByteStringResource* OneByteStringResource::NewUtf8Copy(Isolate* isolate, Local<String> str) { size_t byteLength = str->Utf8LengthV2(isolate); void* block = std::malloc(sizeof(OneByteStringResource) + byteLength + 1); OneByteStringResource* resource = new (block) OneByteStringResource(byteLength + 1); // Same flags as String::Utf8Value. str->WriteUtf8V2(isolate, reinterpret_cast<char*>(resource + 1), byteLength + 1, String::WriteFlags::kNullTerminate | String::WriteFlags::kReplaceInvalidUtf8); return resource; } OneByteStringResource::OneByteStringResource(size_t length) : length_(length) {} void OneByteStringResource::Dispose() { this->~OneByteStringResource(); std::free(this); } const char* OneByteStringResource::data() const { return reinterpret_cast<const char*>(this + 1); } size_t OneByteStringResource::length() const { return this->length_; } } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |