| Index: runtime/bin/file.cc
|
| diff --git a/runtime/bin/file.cc b/runtime/bin/file.cc
|
| index 75e9d9232665eefa961714fc6b3cb026108eef72..9eedc8579206a092f6931360747e25c844317c87 100644
|
| --- a/runtime/bin/file.cc
|
| +++ b/runtime/bin/file.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| @@ -324,3 +324,21 @@ void FUNCTION_NAME(File_FullPath)(Dart_NativeArguments args) {
|
| }
|
| Dart_ExitScope();
|
| }
|
| +
|
| +
|
| +void FUNCTION_NAME(File_OpenStdio)(Dart_NativeArguments args) {
|
| + Dart_EnterScope();
|
| + int fd = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 0));
|
| + File* file = File::OpenStdio(fd);
|
| + Dart_SetReturnValue(args, Dart_NewInteger(reinterpret_cast<intptr_t>(file)));
|
| + Dart_ExitScope();
|
| +}
|
| +
|
| +
|
| +void FUNCTION_NAME(File_GetStdioHandleType)(Dart_NativeArguments args) {
|
| + Dart_EnterScope();
|
| + int fd = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 0));
|
| + File::StdioHandleType type = File::GetStdioHandleType(fd);
|
| + Dart_SetReturnValue(args, Dart_NewInteger(type));
|
| + Dart_ExitScope();
|
| +}
|
|
|