kopia lustrzana https://github.com/micropython/micropython-lib
all: Tighten up typecodes for FFI module.
rodzic
4016f0664c
commit
56454eba33
|
@ -4,9 +4,9 @@ import ffi
|
||||||
libc = ffi.open("libc.so.6")
|
libc = ffi.open("libc.so.6")
|
||||||
|
|
||||||
fcntl_l = libc.func("i", "fcntl", "iil")
|
fcntl_l = libc.func("i", "fcntl", "iil")
|
||||||
fcntl_s = libc.func("i", "fcntl", "iis")
|
fcntl_s = libc.func("i", "fcntl", "iip")
|
||||||
ioctl_l = libc.func("i", "ioctl", "iil")
|
ioctl_l = libc.func("i", "ioctl", "iil")
|
||||||
ioctl_s = libc.func("i", "ioctl", "iis")
|
ioctl_s = libc.func("i", "ioctl", "iip")
|
||||||
|
|
||||||
|
|
||||||
def fcntl(fd, op, arg):
|
def fcntl(fd, op, arg):
|
||||||
|
|
2
os/os.py
2
os/os.py
|
@ -5,7 +5,7 @@ libc = ffi.open("libc.so.6")
|
||||||
|
|
||||||
errno = libc.var("i", "errno")
|
errno = libc.var("i", "errno")
|
||||||
mkdir_ = libc.func("i", "mkdir", "si")
|
mkdir_ = libc.func("i", "mkdir", "si")
|
||||||
read_ = libc.func("i", "read", "iPi")
|
read_ = libc.func("i", "read", "ipi")
|
||||||
write_ = libc.func("i", "write", "iPi")
|
write_ = libc.func("i", "write", "iPi")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,11 @@ pcre_compile = pcre.func("p", "pcre_compile", "sipps")
|
||||||
# int pcre_exec(const pcre *code, const pcre_extra *extra,
|
# int pcre_exec(const pcre *code, const pcre_extra *extra,
|
||||||
# const char *subject, int length, int startoffset,
|
# const char *subject, int length, int startoffset,
|
||||||
# int options, int *ovector, int ovecsize);
|
# int options, int *ovector, int ovecsize);
|
||||||
pcre_exec = pcre.func("i", "pcre_exec", "ppsiiipi")
|
pcre_exec = pcre.func("i", "pcre_exec", "PPsiiipi")
|
||||||
|
|
||||||
# int pcre_fullinfo(const pcre *code, const pcre_extra *extra,
|
# int pcre_fullinfo(const pcre *code, const pcre_extra *extra,
|
||||||
# int what, void *where);
|
# int what, void *where);
|
||||||
pcre_fullinfo = pcre.func("i", "pcre_fullinfo", "ppip")
|
pcre_fullinfo = pcre.func("i", "pcre_fullinfo", "PPip")
|
||||||
|
|
||||||
|
|
||||||
IGNORECASE = I = 1
|
IGNORECASE = I = 1
|
||||||
|
|
|
@ -9,7 +9,7 @@ libc = ffi.open("libc.so.6")
|
||||||
#int epoll_create(int size);
|
#int epoll_create(int size);
|
||||||
epoll_create = libc.func("i", "epoll_create", "i")
|
epoll_create = libc.func("i", "epoll_create", "i")
|
||||||
#int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
|
#int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
|
||||||
epoll_ctl = libc.func("i", "epoll_ctl", "iiip")
|
epoll_ctl = libc.func("i", "epoll_ctl", "iiiP")
|
||||||
#int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout);
|
#int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout);
|
||||||
epoll_wait = libc.func("i", "epoll_wait", "ipii")
|
epoll_wait = libc.func("i", "epoll_wait", "ipii")
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue