Reviewers: Mads Ager,
Description:
Add doc to OS::StrNCpy
Please review this at http://codereview.chromium.org/552042
Affected files:
M src/platform.h
Index: src/platform.h
diff --git a/src/platform.h b/src/platform.h
index
75e557cb443c0ff87228188c3c92c7fb8b358057..24cb1bdfefd3cb064a3cadbf836981346a3a1b67
100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -240,6 +240,11 @@ class OS {
va_list args);
static char* StrChr(char* str, int c);
+
+ // Calls strncpy in POSIX and strncpy_s in Windows. It means that
+ // depending on platform it may or may not set terminating 0 and
+ // it may or may not check length of dest buffer (dest must fit
+ // n bytes plus 1 terminating byte).
static void StrNCpy(Vector<char> dest, const char* src, size_t n);
// Support for profiler. Can do nothing, in which case ticks
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev