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

Side by Side Diff: src/vm/natives_windows.cc

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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
« no previous file with comments | « src/vm/natives_posix.cc ('k') | src/vm/object.h » ('j') | 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) 2016, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dartino 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #if defined(FLETCH_TARGET_OS_WIN) 5 #if defined(DARTINO_TARGET_OS_WIN)
6 6
7 #include "src/vm/natives.h" 7 #include "src/vm/natives.h"
8 8
9 #include <direct.h> 9 #include <direct.h>
10 10
11 #include "src/shared/platform.h" 11 #include "src/shared/platform.h"
12 12
13 #include "src/vm/process.h" 13 #include "src/vm/process.h"
14 14
15 namespace fletch { 15 namespace dartino {
16 16
17 BEGIN_NATIVE(UriBase) { 17 BEGIN_NATIVE(UriBase) {
18 char* buffer = reinterpret_cast<char*>(malloc(MAXPATHLEN + 1)); 18 char* buffer = reinterpret_cast<char*>(malloc(MAXPATHLEN + 1));
19 char* path = _getcwd(buffer, MAXPATHLEN); 19 char* path = _getcwd(buffer, MAXPATHLEN);
20 if (path == NULL) FATAL("Failed to get current working directory."); 20 if (path == NULL) FATAL("Failed to get current working directory.");
21 int length = strlen(path); 21 int length = strlen(path);
22 if (path[length - 1] != '\\') { 22 if (path[length - 1] != '\\') {
23 path[length++] = '\\'; 23 path[length++] = '\\';
24 path[length] = 0; 24 path[length] = 0;
25 } 25 }
26 Object* result = process->NewStringFromAscii(List<const char>(path, length)); 26 Object* result = process->NewStringFromAscii(List<const char>(path, length));
27 free(buffer); 27 free(buffer);
28 return result; 28 return result;
29 } 29 }
30 END_NATIVE() 30 END_NATIVE()
31 31
32 } // namespace fletch 32 } // namespace dartino
33 33
34 #endif // defined FLETCH_TARGET_OS_WIN 34 #endif // defined DARTINO_TARGET_OS_WIN
OLDNEW
« no previous file with comments | « src/vm/natives_posix.cc ('k') | src/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698