From daaffd7edb0acd90056543f07a56ccdb49074a7c Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 2 Sep 2015 00:15:05 +0300 Subject: [PATCH] select: Switch to ffilib. --- select/metadata.txt | 4 ++-- select/select.py | 6 +++--- select/setup.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/select/metadata.txt b/select/metadata.txt index 370e866a..6a15f99e 100644 --- a/select/metadata.txt +++ b/select/metadata.txt @@ -1,5 +1,5 @@ srctype = micropython-lib type = module -version = 0.1.5 +version = 0.1.6 author = Paul Sokolovsky -depends = os, libc +depends = os, ffilib diff --git a/select/select.py b/select/select.py index 84c657a8..e7de109d 100644 --- a/select/select.py +++ b/select/select.py @@ -2,10 +2,10 @@ import ffi import ustruct as struct import os import errno -import _libc +import ffilib -libc = _libc.get() +libc = ffilib.libc() #int epoll_create(int size); epoll_create = libc.func("i", "epoll_create", "i") @@ -32,7 +32,7 @@ EPOLL_CTL_MOD = 3 # Until uctypes module can assign native struct offset, use dirty hack # below. # TODO: Get rid of all this dirtiness, move it on C side -if _libc.bitness > 32: +if ffilib.bitness > 32: # On x86_64, epoll_event is packed struct epoll_event = "