mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-15 01:10:53 -07:00
Extend the set of types supported by UFFI (Matthew Mondor).
This commit is contained in:
parent
48f2e91b4e
commit
b486b14e9e
6 changed files with 28 additions and 5 deletions
|
|
@ -95,6 +95,9 @@ and important fixes to let ECL work better with Slime.
|
|||
|
||||
- ECL now implements EXT:*INVOKE-DEBUGGER-HOOK*, which works like *DEBUGGER-HOOK*
|
||||
but is also observed by BREAK. (SBCL extension adopted by ECL)
|
||||
|
||||
- The UFFI interface now supports C99 types, such as :int8-t, :uint32-t, etc,
|
||||
but only when the corresponding types do exist in the underlying C environment.
|
||||
|
||||
;;; Local Variables: ***
|
||||
;;; mode:text ***
|
||||
|
|
|
|||
2
src/aclocal.m4
vendored
2
src/aclocal.m4
vendored
|
|
@ -424,9 +424,11 @@ dnl have the right size;
|
|||
dnl
|
||||
AC_DEFUN(ECL_INTEGER_TYPES,[
|
||||
ECL_STDINT_HEADER=""
|
||||
ECL_UINT8_T=""
|
||||
ECL_UINT16_T=""
|
||||
ECL_UINT32_T=""
|
||||
ECL_UINT64_T=""
|
||||
ECL_INT8_T=""
|
||||
ECL_INT16_T=""
|
||||
ECL_INT32_T=""
|
||||
ECL_INT64_T=""
|
||||
|
|
|
|||
16
src/c/ffi.d
16
src/c/ffi.d
|
|
@ -31,6 +31,10 @@ static const cl_object ecl_foreign_type_table[] = {
|
|||
@':unsigned-int',
|
||||
@':long',
|
||||
@':unsigned-long',
|
||||
#ifdef ecl_uint8_t
|
||||
@':int8-t',
|
||||
@':uint8-t',
|
||||
#endif
|
||||
#ifdef ecl_uint16_t
|
||||
@':int16-t',
|
||||
@':uint16-t',
|
||||
|
|
@ -73,6 +77,10 @@ static unsigned int ecl_foreign_type_size[] = {
|
|||
sizeof(unsigned int),
|
||||
sizeof(long),
|
||||
sizeof(unsigned long),
|
||||
#ifdef ecl_uint8_t
|
||||
sizeof(ecl_int8_t),
|
||||
sizeof(ecl_uint8_t),
|
||||
#endif
|
||||
#ifdef ecl_uint16_t
|
||||
sizeof(ecl_int16_t),
|
||||
sizeof(ecl_uint16_t),
|
||||
|
|
@ -126,13 +134,17 @@ static ffi_type *ecl_type_to_libffi_type[] = {
|
|||
&ffi_type_uint, /*@':unsigned-int',*/
|
||||
&ffi_type_slong, /*@':long',*/
|
||||
&ffi_type_ulong, /*@':unsigned-long',*/
|
||||
#ifdef ecl_uint8_t
|
||||
&ffi_type_sint8, /*@':int8-t',*/
|
||||
&ffi_type_uint8, /*@':uint8-t',*/
|
||||
#endif
|
||||
#ifdef ecl_uint16_t
|
||||
&ffi_type_sint16, /*@':int16-t',*/
|
||||
&ffi_type_uint16, /*@':uint16-t',*/
|
||||
#endif
|
||||
#ifdef ecl_uint32_t
|
||||
&ffi_type_sint32, /*@':int64-t',*/
|
||||
&ffi_type_uint32, /*@':uint64-t',*/
|
||||
&ffi_type_sint32, /*@':int32-t',*/
|
||||
&ffi_type_uint32, /*@':uint32-t',*/
|
||||
#endif
|
||||
#ifdef ecl_uint64_t
|
||||
&ffi_type_sint64, /*@':int64-t',*/
|
||||
|
|
|
|||
4
src/configure
vendored
4
src/configure
vendored
|
|
@ -2360,7 +2360,7 @@ fi
|
|||
if test "${enable_precisegc+set}" = set; then
|
||||
enableval=$enable_precisegc; enable_precisegc=${enableval}
|
||||
else
|
||||
enable_precisegc=no
|
||||
enable_precisegc=yes
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -8700,9 +8700,11 @@ fi
|
|||
$as_echo "${CL_FIXNUM_TYPE}" >&6; }
|
||||
|
||||
ECL_STDINT_HEADER=""
|
||||
ECL_UINT8_T=""
|
||||
ECL_UINT16_T=""
|
||||
ECL_UINT32_T=""
|
||||
ECL_UINT64_T=""
|
||||
ECL_INT8_T=""
|
||||
ECL_INT16_T=""
|
||||
ECL_INT32_T=""
|
||||
ECL_INT64_T=""
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ AC_ARG_ENABLE(precisegc,
|
|||
AS_HELP_STRING( [--enable-precisegc],
|
||||
[use type information during garbage collection. Requires Boehm-Weiser gc.]
|
||||
[(no|yes, default=NO)]),
|
||||
[enable_precisegc=${enableval}], [enable_precisegc=no] )
|
||||
[enable_precisegc=${enableval}], [enable_precisegc=yes] )
|
||||
|
||||
dnl AC_ARG_ENABLE(debug,
|
||||
dnl AS_HELP_STRING( [--enable-debug],
|
||||
|
|
|
|||
|
|
@ -63,7 +63,11 @@
|
|||
(member name '(:byte :unsigned-byte :short :unsigned-short
|
||||
:int :unsigned-int :char :unsigned-char
|
||||
:long :unsigned-long :pointer-void :object
|
||||
:float :double :cstring)
|
||||
:float :double :cstring
|
||||
:int8-t #+uint16-t :int16-t
|
||||
#+uint32-t :int32-t #+uint64-t :int64-t
|
||||
:uint8-t #+uint16-t :uint16-t
|
||||
#+uint32-t :uint32-t #+uint64-t :uint64-t)
|
||||
:test 'eq)))
|
||||
|
||||
(defmacro def-foreign-type (name definition)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue