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

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 back assembler functions 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
Index: runtime/vm/os.h
diff --git a/runtime/vm/os.h b/runtime/vm/os.h
index 60456e4200add3ae15ecf75667a1e2ab1d291b5a..8b60df4eaf7cb85adcbb5829fe7129bfb10cd120 100644
--- a/runtime/vm/os.h
+++ b/runtime/vm/os.h
@@ -7,6 +7,7 @@
#include "vm/globals.h"
+
// Forward declarations.
struct tm;
@@ -14,6 +15,7 @@ namespace dart {
// Forward declarations.
class Isolate;
+class Zone;
// Interface to the underlying OS platform.
class OS {
@@ -120,6 +122,12 @@ 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* SNCreate(Zone* zone, const char* format, ...)
+ PRINTF_ATTRIBUTE(2, 3);
+
// 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') | runtime/vm/os_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698