GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — string_bytes: export GetExternalParts · juliens/node@63fc6a6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • string_bytes.cc
    • string_bytes.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/string_bytes.cc‎

Copy file name to clipboardExpand all lines: src/string_bytes.cc
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,13 @@ size_t hex_decode(char* buf,
230230
}
231231

232232

233-
bool GetExternalParts(Handle<Value> val, const char** data, size_t* len) {
233+
bool StringBytes::GetExternalParts(Handle<Value> val,
234+
const char** data,
235+
size_t* len) {
234236
if (Buffer::HasInstance(val)) {
235237
*data = Buffer::Data(val);
236238
*len = Buffer::Length(val);
237239
return true;
238-
239240
}
240241

241242
assert(val->IsString());
Collapse file

‎src/string_bytes.h‎

Copy file name to clipboardExpand all lines: src/string_bytes.h
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ class StringBytes {
4444
// very much slower for UTF-8
4545
static size_t Size(v8::Handle<v8::Value> val, enum encoding enc);
4646

47+
// If the string is external then assign external properties to data and len,
48+
// then return true. If not return false.
49+
static bool GetExternalParts(v8::Handle<v8::Value> val,
50+
const char** data,
51+
size_t* len);
52+
4753
// Write the bytes from the string or buffer into the char*
4854
// returns the number of bytes written, which will always be
4955
// <= buflen. Use StorageSize/Size first to know how much

0 commit comments

Comments
0 (0)
You are visitor 01402792 — 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.