| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #if !defined(DART_IO_DISABLED) | 5 #if !defined(DART_IO_DISABLED) |
| 6 | 6 |
| 7 #include "bin/platform.h" | 7 #include "bin/platform.h" |
| 8 | 8 |
| 9 #include "bin/file.h" | 9 #include "bin/file.h" |
| 10 #include "bin/utils.h" | 10 #include "bin/utils.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 } | 102 } |
| 103 Dart_SetReturnValue(args, result); | 103 Dart_SetReturnValue(args, result); |
| 104 } | 104 } |
| 105 } | 105 } |
| 106 | 106 |
| 107 | 107 |
| 108 void FUNCTION_NAME(Platform_GetVersion)(Dart_NativeArguments args) { | 108 void FUNCTION_NAME(Platform_GetVersion)(Dart_NativeArguments args) { |
| 109 Dart_SetReturnValue(args, Dart_NewStringFromCString(Dart_VersionString())); | 109 Dart_SetReturnValue(args, Dart_NewStringFromCString(Dart_VersionString())); |
| 110 } | 110 } |
| 111 | 111 |
| 112 |
| 113 void FUNCTION_NAME(Platform_LocaleName)(Dart_NativeArguments args) { |
| 114 const char* locale = Platform::LocaleName(); |
| 115 if (locale == NULL) { |
| 116 Dart_SetReturnValue(args, DartUtils::NewDartOSError()); |
| 117 } else { |
| 118 Dart_SetReturnValue(args, Dart_NewStringFromCString(locale)); |
| 119 } |
| 120 } |
| 121 |
| 112 } // namespace bin | 122 } // namespace bin |
| 113 } // namespace dart | 123 } // namespace dart |
| 114 | 124 |
| 115 #endif // !defined(DART_IO_DISABLED) | 125 #endif // !defined(DART_IO_DISABLED) |
| OLD | NEW |