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

Unified Diff: lib/io/system_linux.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: indentation 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
Index: lib/io/system_linux.dart
diff --git a/lib/io/system_linux.dart b/lib/io/system_linux.dart
index 95cf24c837fbc6971f46f598b06ae74dc3ad9b27..4978596444951da3ae8713a410cc26b77f9218f3 100644
--- a/lib/io/system_linux.dart
+++ b/lib/io/system_linux.dart
@@ -19,9 +19,9 @@ class LinuxAddrInfo extends AddrInfo {
LinuxAddrInfo() : super._();
LinuxAddrInfo.fromAddress(int address) : super._fromAddress(address);
- Foreign get ai_addr {
+ ForeignMemory get ai_addr {
int offset = _addrlenOffset + wordSize;
- return new Foreign.fromAddress(getWord(offset), ai_addrlen);
+ return new ForeignMemory.fromAddress(getWord(offset), ai_addrlen);
}
get ai_canonname {
@@ -35,7 +35,7 @@ class LinuxAddrInfo extends AddrInfo {
}
}
-class EpollEvent extends Foreign {
+class EpollEvent extends ForeignMemory {
// epoll_event is packed on ia32/x64, but not on arm.
static int eventSize = Foreign.architecture == Foreign.ARM ? 8 : 4;
@@ -53,9 +53,12 @@ class EpollEvent extends Foreign {
}
class LinuxSystem extends PosixSystem {
- static final Foreign _epollCtl = Foreign.lookup("epoll_ctl");
- static final Foreign _lseekLinux = Foreign.lookup("lseek64");
- static final Foreign _openLinux = Foreign.lookup("open64");
+ static final ForeignFunction _epollCtl =
+ ForeignLibrary.standard.lookup("epoll_ctl");
+ static final ForeignFunction _lseekLinux =
+ ForeignLibrary.standard.lookup("lseek64");
+ static final ForeignFunction _openLinux =
+ ForeignLibrary.standard.lookup("open64");
final EpollEvent _epollEvent = new EpollEvent();
@@ -65,8 +68,8 @@ class LinuxSystem extends PosixSystem {
int get SO_REUSEADDR => 2;
- Foreign get _lseek => _lseekLinux;
- Foreign get _open => _openLinux;
+ ForeignFunction get _lseek => _lseekLinux;
+ ForeignFunction get _open => _openLinux;
int addToEventHandler(int fd) {
_epollEvent.events = 0;

Powered by Google App Engine
This is Rietveld 408576698