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

Side by Side Diff: bin/builtin.cc

Issue 8347023: - Fix which headers are included. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <string> 5 #include <stdio.h>
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 10
11 // Implementation of native functions which are used for some 11 // Implementation of native functions which are used for some
12 // test/debug functionality in standalone dart mode. 12 // test/debug functionality in standalone dart mode.
13 13
14 void PrintString(FILE* out, Dart_Handle string) { 14 void PrintString(FILE* out, Dart_Handle str) {
15 Dart_Result result = Dart_StringToCString(string); 15 Dart_Result result = Dart_StringToCString(str);
16 const char* cstring = Dart_IsValidResult(result) ? 16 const char* cstring = Dart_IsValidResult(result) ?
17 Dart_GetResultAsCString(result) : Dart_GetErrorCString(result); 17 Dart_GetResultAsCString(result) : Dart_GetErrorCString(result);
18 fprintf(out, "%s\n", cstring); 18 fprintf(out, "%s\n", cstring);
19 fflush(out); 19 fflush(out);
20 } 20 }
21 21
22 22
23 void FUNCTION_NAME(Logger_PrintString)(Dart_NativeArguments args) { 23 void FUNCTION_NAME(Logger_PrintString)(Dart_NativeArguments args) {
24 Dart_EnterScope(); 24 Dart_EnterScope();
25 PrintString(stdout, Dart_GetNativeArgument(args, 0)); 25 PrintString(stdout, Dart_GetNativeArgument(args, 0));
26 Dart_ExitScope(); 26 Dart_ExitScope();
27 } 27 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698