Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: include/v8.h

Issue 7706002: Slight API change enabling opting out from null termination in String::Write*(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 46e4f0db0e3a6478605e2a02943dd994c468cb48..751d56914feb0c5cdfad5fa61ecc48363f21485b 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1039,29 +1039,30 @@ class String : public Primitive {
* \param length The number of characters to copy from the string. For
* WriteUtf8 the number of bytes in the buffer.
* \param nchars_ref The number of characters written, can be NULL.
- * \param hints Various hints that might affect performance of this or
+ * \param options Various hints that might affect performance of this or
Vitaly Repeshko 2011/08/23 10:55:40 Various options?
* subsequent operations.
* \return The number of characters copied to the buffer excluding the null
* terminator. For WriteUtf8: The number of bytes copied to the buffer
- * including the null terminator.
+ * including the null terminator (if written).
*/
enum WriteHints {
Vitaly Repeshko 2011/08/23 10:55:40 WriteOptions?
- NO_HINTS = 0,
- HINT_MANY_WRITES_EXPECTED = 1
+ NO_OPTIONS = 0,
+ MANY_WRITES_EXPECTED = 1,
Vitaly Repeshko 2011/08/23 10:55:40 Keep HINT_?
+ WRITE_NO_NULL_TERMINATION = 2
Vitaly Repeshko 2011/08/23 10:55:40 Drop WRITE_?
};
V8EXPORT int Write(uint16_t* buffer,
int start = 0,
int length = -1,
- WriteHints hints = NO_HINTS) const; // UTF-16
+ int options = NO_OPTIONS) const; // UTF-16
V8EXPORT int WriteAscii(char* buffer,
int start = 0,
int length = -1,
- WriteHints hints = NO_HINTS) const; // ASCII
+ int options = NO_OPTIONS) const; // ASCII
V8EXPORT int WriteUtf8(char* buffer,
int length = -1,
int* nchars_ref = NULL,
- WriteHints hints = NO_HINTS) const; // UTF-8
+ int options = NO_OPTIONS) const; // UTF-8
/**
* A zero length string.
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698