Browse Source

FFI: Add ssize_t declaration.

Mike Pall 10 years ago
parent
commit
52ea1a30af
3 changed files with 5 additions and 0 deletions
  1. 1 0
      doc/changes.html
  2. 2 0
      doc/ext_ffi_semantics.html
  3. 2 0
      src/lj_ctype.c

+ 1 - 0
doc/changes.html

@@ -123,6 +123,7 @@ Please take a look at the commit history for more details.
 <li>FFI: Compile lightuserdata to <tt>void *</tt> conversion.</li>
 <li>FFI: Compile lightuserdata to <tt>void *</tt> conversion.</li>
 <li>FFI: Compile <tt>ffi.gc(cdata, nil)</tt>, too.</li>
 <li>FFI: Compile <tt>ffi.gc(cdata, nil)</tt>, too.</li>
 <li>FFI: Add <tt>ffi.typeinfo()</tt>.</li>
 <li>FFI: Add <tt>ffi.typeinfo()</tt>.</li>
+<li>FFI: Add <tt>ssize_t</tt> declaration.</li>
 </ul></li>
 </ul></li>
 </ul>
 </ul>
 </div>
 </div>

+ 2 - 0
doc/ext_ffi_semantics.html

@@ -185,6 +185,8 @@ a <tt>typedef</tt>, except re-declarations will be ignored):
 <tt>uint16_t</tt>, <tt>uint32_t</tt>, <tt>uint64_t</tt>,
 <tt>uint16_t</tt>, <tt>uint32_t</tt>, <tt>uint64_t</tt>,
 <tt>intptr_t</tt>, <tt>uintptr_t</tt>.</li>
 <tt>intptr_t</tt>, <tt>uintptr_t</tt>.</li>
 
 
+<li>From <tt>&lt;unistd.h&gt;</tt> (POSIX): <tt>ssize_t</tt>.</li>
+
 </ul>
 </ul>
 <p>
 <p>
 You're encouraged to use these types in preference to
 You're encouraged to use these types in preference to

+ 2 - 0
src/lj_ctype.c

@@ -38,6 +38,8 @@
   _("uint64_t",			UINT64) \
   _("uint64_t",			UINT64) \
   _("intptr_t",			INT_PSZ) \
   _("intptr_t",			INT_PSZ) \
   _("uintptr_t",		UINT_PSZ) \
   _("uintptr_t",		UINT_PSZ) \
+  /* From POSIX. */ \
+  _("ssize_t",			INT_PSZ) \
   /* End of typedef list. */
   /* End of typedef list. */
 
 
 /* Keywords (only the ones we actually care for). */
 /* Keywords (only the ones we actually care for). */