diff options
author | Daniel Llorens <lloda@sarc.name> | 2021-11-11 15:47:42 +0100 |
---|---|---|
committer | Daniel Llorens <lloda@sarc.name> | 2021-11-15 11:34:09 +0100 |
commit | 496f69dba2fdf1720b40349932fcdecd444107c3 (patch) | |
tree | dc850c5afca668788a24350c0464f1eb817ea353 /doc/ref | |
parent | 24116be822c96741eacd667e4e3507300c596cba (diff) | |
download | guile-496f69dba2fdf1720b40349932fcdecd444107c3.tar.gz |
Support C99 complex types in (system foreign)
* libguile/foreign.h (SCM_FOREIGN_TYPE_COMPLEX_FLOAT,
SCM_FOREIGN_TYPE_COMPLEX_DOUBLE): New enums.
* module/system/foreign.scm (complex-float, complex-double): Export new types.
(make-c-struct, parse-c-struct): Support the new types.
* libguile/foreign.c (complex-float, complex-double): Define new types.
(alignof, sizeof, pack, unpack): Support the new types.
* test-suite/tests/foreign.test: Test.
Diffstat (limited to 'doc/ref')
-rw-r--r-- | doc/ref/api-foreign.texi | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/ref/api-foreign.texi b/doc/ref/api-foreign.texi index a1a1016b0..540fbbaf5 100644 --- a/doc/ref/api-foreign.texi +++ b/doc/ref/api-foreign.texi @@ -465,8 +465,11 @@ C types. @defvrx {Scheme Variable} int64 @defvrx {Scheme Variable} float @defvrx {Scheme Variable} double +@defvrx {Scheme Variable} complex-double +@defvrx {Scheme Variable} complex-float These values represent the C numeric types of the specified sizes and -signednesses. +signednesses. @code{complex-float} and @code{complex-double} stand for +C99 @code{float _Complex} and @code{double _Complex} respecively. @end defvr In addition there are some convenience bindings for indicating types of |