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

Unified Diff: runtime/vm/os.h

Issue 1331623002: Uses SNPRINT macro where possible. Otherwise uses #define for format. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add missing include Created 5 years, 3 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 | « runtime/vm/object.cc ('k') | runtime/vm/os_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os.h
diff --git a/runtime/vm/os.h b/runtime/vm/os.h
index 60456e4200add3ae15ecf75667a1e2ab1d291b5a..871b23e2670852257e7caacabad237a0e291770b 100644
--- a/runtime/vm/os.h
+++ b/runtime/vm/os.h
@@ -14,6 +14,7 @@ namespace dart {
// Forward declarations.
class Isolate;
+class Zone;
// Interface to the underlying OS platform.
class OS {
@@ -120,6 +121,13 @@ class OS {
const char* format,
va_list args);
+ // Allocate a string and print formatted output into the buffer.
+ // Uses the zone for allocation if one if provided, and otherwise uses
+ // malloc.
+ static char* SCreate(Zone* zone, const char* format, ...)
+ PRINTF_ATTRIBUTE(2, 3);
+ static char* VSCreate(Zone* zone, const char* format, va_list args);
+
// Converts a C string which represents a valid dart integer into a 64 bit
// value.
// Returns false if it is unable to convert the string to a 64 bit value,
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/os_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698