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

Unified Diff: lib/io/system_macos.dart

Issue 1209033003: Work in progres, please take a look and give early feedback if this is the way we want to structure… (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: address comments Created 5 years, 6 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 | « lib/io/system_linux.dart ('k') | lib/io/system_posix.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/io/system_macos.dart
diff --git a/lib/io/system_macos.dart b/lib/io/system_macos.dart
index a5c851eff2400cc1ec769b2e2da3e4aeb4d767a3..a43b03bb9532da8ec5562f78edf6121131a2a58a 100644
--- a/lib/io/system_macos.dart
+++ b/lib/io/system_macos.dart
@@ -24,9 +24,9 @@ class MacOSAddrInfo extends AddrInfo {
return getWord(offset);
}
- Foreign get ai_addr {
+ ForeignMemory get ai_addr {
int offset = _addrlenOffset + wordSize * 2;
- return new Foreign.fromAddress(getWord(offset), ai_addrlen);
+ return new ForeignMemory.fromAddress(getWord(offset), ai_addrlen);
}
AddrInfo get ai_next {
@@ -66,9 +66,9 @@ class KEvent extends Struct {
}
class MacOSSystem extends PosixSystem {
- static final Foreign _kevent = Foreign.lookup("kevent");
- static final Foreign _lseekMac = Foreign.lookup("lseek");
- static final Foreign _openMac = Foreign.lookup("open");
+ static final ForeignFunction _kevent = ForeignLibrary.main.lookup("kevent");
+ static final ForeignFunction _lseekMac = ForeignLibrary.main.lookup("lseek");
+ static final ForeignFunction _openMac = ForeignLibrary.main.lookup("open");
final KEvent _kEvent = new KEvent();
@@ -78,8 +78,8 @@ class MacOSSystem extends PosixSystem {
int get SO_REUSEADDR => 0x4;
- Foreign get _lseek => _lseekMac;
- Foreign get _open => _openMac;
+ ForeignFunction get _lseek => _lseekMac;
+ ForeignFunction get _open => _openMac;
int _setEvents(bool read, bool write) {
int eh = System.eventHandler;
@@ -89,18 +89,18 @@ class MacOSSystem extends PosixSystem {
status = _retry(() => _kevent.icall$6(eh,
_kEvent,
1,
- Foreign.NULL,
+ ForeignPointer.NULL,
0,
- Foreign.NULL));
+ ForeignPointer.NULL));
}
if (status != -1 && write) {
_kEvent.filter = EVFILT_WRITE;
status = _retry(() => _kevent.icall$6(eh,
_kEvent,
1,
- Foreign.NULL,
+ ForeignPointer.NULL,
0,
- Foreign.NULL));
+ ForeignPointer.NULL));
}
return status;
}
« no previous file with comments | « lib/io/system_linux.dart ('k') | lib/io/system_posix.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698