From 52ea1a30afc204553c99126ab43c2b16f2bd0182 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 20 Sep 2015 19:25:39 +0200 Subject: [PATCH] FFI: Add ssize_t declaration. --- doc/changes.html | 1 + doc/ext_ffi_semantics.html | 2 ++ src/lj_ctype.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/doc/changes.html b/doc/changes.html index 125b58b4..82d3c140 100644 --- a/doc/changes.html +++ b/doc/changes.html @@ -123,6 +123,7 @@ Please take a look at the commit history for more details.
  • FFI: Compile lightuserdata to void * conversion.
  • FFI: Compile ffi.gc(cdata, nil), too.
  • FFI: Add ffi.typeinfo().
  • +
  • FFI: Add ssize_t declaration.
  • diff --git a/doc/ext_ffi_semantics.html b/doc/ext_ffi_semantics.html index 889d44d8..f65fe8f3 100644 --- a/doc/ext_ffi_semantics.html +++ b/doc/ext_ffi_semantics.html @@ -185,6 +185,8 @@ a typedef, except re-declarations will be ignored): uint16_t, uint32_t, uint64_t, intptr_t, uintptr_t. +
  • From <unistd.h> (POSIX): ssize_t.
  • +

    You're encouraged to use these types in preference to diff --git a/src/lj_ctype.c b/src/lj_ctype.c index 2e23c994..eda070ce 100644 --- a/src/lj_ctype.c +++ b/src/lj_ctype.c @@ -38,6 +38,8 @@ _("uint64_t", UINT64) \ _("intptr_t", INT_PSZ) \ _("uintptr_t", UINT_PSZ) \ + /* From POSIX. */ \ + _("ssize_t", INT_PSZ) \ /* End of typedef list. */ /* Keywords (only the ones we actually care for). */