From d9479b4b4ca343e06886902d3a43eaf5a238fb9b Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sun, 26 Jun 2011 20:47:44 +0300 Subject: [PATCH] export SIZE-T and OFF-T from SB-ALIEN They're pretty common interface types. --- NEWS | 1 + doc/manual/ffi.texinfo | 18 +++++++++++------- package-data-list.lisp-expr | 11 ++++++++--- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index e48394e..42ccd76 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ changes relative to sbcl-1.0.49: the thunk, as a keyword argument, :arguments. * enhancement: constraint propagation is simplified (and sped up) when COMPILATION-SPEED > SPEED. + * enhancement: SB-ALIEN exports alien type specifiers SIZE-T and OFF-T. * optimization: extracting bits of a single-float on x86-64 has been optimized. (lp#555201) * optimization: MAP and MAP-INTO are more efficient for non-simple vectors, diff --git a/doc/manual/ffi.texinfo b/doc/manual/ffi.texinfo index 95390dd..78267ca 100644 --- a/doc/manual/ffi.texinfo +++ b/doc/manual/ffi.texinfo @@ -342,13 +342,17 @@ the variable. @item @code{sb-alien} also exports translations of these C type -specifiers as foreign type specifiers: @code{sb-alien:char}, -@code{sb-alien:short}, @code{sb-alien:int}, -@code{sb-alien:long}, @code{sb-alien:unsigned-char}, -@code{sb-alien:unsigned-short}, -@code{sb-alien:unsigned-int}, -@code{sb-alien:unsigned-long}, @code{sb-alien:float}, and -@code{sb-alien:double}. +specifiers as foreign type specifiers: +@code{char}, +@code{short}, +@code{int}, +@code{long}, +@code{unsigned-char}, +@code{unsigned-short}, +@code{unsigned-int}, +@code{unsigned-long}, +@code{float}, @code{double}, +@code{size-t}, and @code{off-t}. @end itemize diff --git a/package-data-list.lisp-expr b/package-data-list.lisp-expr index 0444ebb..51ba784 100644 --- a/package-data-list.lisp-expr +++ b/package-data-list.lisp-expr @@ -55,7 +55,10 @@ of SBCL which maintained the CMU-CL-style split into two packages.)" "MAKE-ALIEN" "MAKE-ALIEN-STRING" "NULL-ALIEN" - "SAP-ALIEN" "SHORT" "SIGNED" "SLOT" "STRUCT" + "OFF-T" + "SAP-ALIEN" "SHORT" "SIGNED" + "SIZE-T" + "SLOT" "STRUCT" "UNDEFINED-ALIEN-ERROR" "UNLOAD-SHARED-OBJECT" "UNSIGNED" @@ -2381,6 +2384,8 @@ This package only tries to implement what happens to be needed by the current implementation of SBCL, and makes no guarantees of interface stability." :use ("CL" "SB!ALIEN" "SB!EXT" "SB!INT" "SB!SYS") + :reexport ("OFF-T" + "SIZE-T") :export ( ;; wrappers around Unix stuff to give just what Lisp needs "NANOSLEEP" "UID-USERNAME" @@ -2398,7 +2403,7 @@ no guarantees of interface stability." "INO-T" "UNIX-ACCESS" "UNIX-SETITIMER" "UNIX-GETITIMER" "KBDCGET" "KBDCRESET" "KBDCRST" "KBDCSET" "KBDCSSTD" "KBDGCLICK" "KBDSCLICK" "KBDSGET" - "L_INCR" "L_SET" "L_XTND" "OFF-T" "O_APPEND" "O_CREAT" "O_EXCL" + "L_INCR" "L_SET" "L_XTND" "O_APPEND" "O_CREAT" "O_EXCL" "O_RDONLY" "O_RDWR" "O_TRUNC" "O_WRONLY" "POSIX-GETCWD" "POSIX-GETCWD/" "READGRP" "READOTH" "READOWN" "RLIM-CUR" "RLIM-MAX" "RU-IDRSS" "RU-INBLOCK" "RU-ISRSS" "RU-IXRSS" @@ -2409,7 +2414,7 @@ no guarantees of interface stability." "S-IFREG" "S-IFSOCK" "S-IREAD" "S-ISGID" "S-ISUID" "S-ISVTX" "S-IWRITE" "SAVETEXT" "SB-MKSTEMP" "SC-MASK" "SC-ONSTACK" "SETUIDEXEC" "SG-ERASE" "SG-FLAGS" "SG-ISPEED" "SG-KILL" - "SG-OSPEED" "SGTTYB" "SIZE-T" "ST-ATIME" "ST-BLKSIZE" "ST-BLOCKS" + "SG-OSPEED" "SGTTYB" "ST-ATIME" "ST-BLKSIZE" "ST-BLOCKS" "ST-CTIME" "ST-DEV" "ST-GID" "ST-MODE" "ST-MTIME" "ST-NLINK" "ST-RDEV" "ST-SIZE" "ST-UID" "STAT" "TERMINAL-SPEEDS" "TIME-T" "TIMEVAL" "TIMEZONE" "TIOCFLUSH" "TIOCGETC" "TIOCGETP" "TIOCGLTC" -- 1.7.10.4