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

Unified Diff: src/allocation.h

Issue 48127: Introducing a new StrNDup function that uses new[] for when we dispose the re... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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/allocation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/allocation.h
===================================================================
--- src/allocation.h (revision 1525)
+++ src/allocation.h (working copy)
@@ -119,10 +119,11 @@
}
-// The normal strdup function uses malloc. This version of StrDup
-// uses new and calls the FatalProcessOutOfMemory handler if
-// allocation fails.
+// The normal strdup functions use malloc. These versions of StrDup
+// and StrNDup uses new and calls the FatalProcessOutOfMemory handler
+// if allocation fails.
char* StrDup(const char* str);
+char* StrNDup(const char* str, size_t n);
// Allocation policy for allocating in the C free store using malloc
« no previous file with comments | « no previous file | src/allocation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698