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

Unified Diff: src/shared/utils.cc

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 11 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 | « src/shared/utils.h ('k') | src/shared/utils_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/utils.cc
diff --git a/src/shared/utils.cc b/src/shared/utils.cc
index f74158bd246918059e9b049550a6c89c3dc8cd5c..a8de8e43c61c77d942ce2756a310bbfae2f54ec5 100644
--- a/src/shared/utils.cc
+++ b/src/shared/utils.cc
@@ -9,17 +9,17 @@
#include "src/shared/platform.h"
-namespace fletch {
+namespace dartino {
Atomic<bool> Print::standard_output_enabled_(true);
-#ifdef FLETCH_ENABLE_PRINT_INTERCEPTORS
+#ifdef DARTINO_ENABLE_PRINT_INTERCEPTORS
Mutex* Print::mutex_ = Platform::CreateMutex();
PrintInterceptor* Print::interceptor_ = NULL;
#endif
void Print::Out(const char* format, ...) {
-#ifdef FLETCH_ENABLE_PRINT_INTERCEPTORS
+#ifdef DARTINO_ENABLE_PRINT_INTERCEPTORS
va_list args;
va_start(args, format);
int size = vsnprintf(NULL, 0, format, args);
@@ -46,11 +46,11 @@ void Print::Out(const char* format, ...) {
vfprintf(stdout, format, args);
va_end(args);
}
-#endif // FLETCH_ENABLE_PRINT_INTERCEPTORS
+#endif // DARTINO_ENABLE_PRINT_INTERCEPTORS
}
void Print::Error(const char* format, ...) {
-#ifdef FLETCH_ENABLE_PRINT_INTERCEPTORS
+#ifdef DARTINO_ENABLE_PRINT_INTERCEPTORS
va_list args;
va_start(args, format);
int size = vsnprintf(NULL, 0, format, args);
@@ -77,22 +77,22 @@ void Print::Error(const char* format, ...) {
vfprintf(stderr, format, args);
va_end(args);
}
-#endif // FLETCH_ENABLE_PRINT_INTERCEPTORS
+#endif // DARTINO_ENABLE_PRINT_INTERCEPTORS
}
void Print::RegisterPrintInterceptor(PrintInterceptor* interceptor) {
-#ifdef FLETCH_ENABLE_PRINT_INTERCEPTORS
+#ifdef DARTINO_ENABLE_PRINT_INTERCEPTORS
ScopedLock scope(mutex_);
ASSERT(!interceptor->next_);
interceptor->next_ = interceptor_;
interceptor_ = interceptor;
#else
UNIMPLEMENTED();
-#endif // FLETCH_ENABLE_PRINT_INTERCEPTORS
+#endif // DARTINO_ENABLE_PRINT_INTERCEPTORS
}
void Print::UnregisterPrintInterceptor(PrintInterceptor* interceptor) {
-#ifdef FLETCH_ENABLE_PRINT_INTERCEPTORS
+#ifdef DARTINO_ENABLE_PRINT_INTERCEPTORS
ScopedLock scope(mutex_);
if (interceptor == interceptor_) {
interceptor_ = interceptor->next_;
@@ -108,15 +108,15 @@ void Print::UnregisterPrintInterceptor(PrintInterceptor* interceptor) {
interceptor->next_ = NULL;
#else
UNIMPLEMENTED();
-#endif // FLETCH_ENABLE_PRINT_INTERCEPTORS
+#endif // DARTINO_ENABLE_PRINT_INTERCEPTORS
}
void Print::UnregisterPrintInterceptors() {
-#ifdef FLETCH_ENABLE_PRINT_INTERCEPTORS
+#ifdef DARTINO_ENABLE_PRINT_INTERCEPTORS
ScopedLock scope(mutex_);
delete interceptor_;
interceptor_ = NULL;
-#endif // FLETCH_ENABLE_PRINT_INTERCEPTORS
+#endif // DARTINO_ENABLE_PRINT_INTERCEPTORS
}
uint32 Utils::StringHash(const uint8* data, int length, int char_width) {
@@ -170,4 +170,4 @@ uint32 Utils::StringHash(const uint8* data, int length, int char_width) {
return hash;
}
-} // namespace fletch
+} // namespace dartino
« no previous file with comments | « src/shared/utils.h ('k') | src/shared/utils_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698