Skip to content

Commit e45937e

Browse files
authored
Add documentation for complexes on MSVC (#58)
1 parent 4d660b1 commit e45937e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/source/ref.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,17 @@ allowed.
951951
take directly as argument types or return type a complex type cannot
952952
be called by CFFI, unless they are directly using the API mode.
953953

954+
*New in version 1.17:* CFFI now supports complex numbers with MSVC
955+
on Windows. The types are called ``_Fcomplex`` (with floats) and
956+
``_Dcomplex`` (with doubles). You can use these types or still use
957+
``float _Complex`` and ``double _Complex`` for cross-platform convenience
958+
in all places except ``set_source()``. With MSVC, the C code you pass to
959+
``set_source()`` must use ``_Fcomplex`` and ``_Dcomplex`` and
960+
it must contain directly or indirectly ``#include <complex.h>``, like
961+
normal C code. (CFFI also defines semi-internal macros
962+
``_cffi_float_complex_t`` and ``_cffi_double_complex_t`` which could
963+
possibly be directly used.)
964+
954965
`[8]` ``wchar_t``, ``char16_t`` and ``char32_t``
955966

956967
See `Unicode character types`_ below.

0 commit comments

Comments
 (0)