From 60e9de56fd5b0417af1b0f70dd60074eb2171937 Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Thu, 8 Feb 2024 13:59:07 +0100 Subject: [PATCH] Add documentation for complexes on MSVC --- doc/source/ref.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/source/ref.rst b/doc/source/ref.rst index 6c7e017c..a0e537b2 100644 --- a/doc/source/ref.rst +++ b/doc/source/ref.rst @@ -951,6 +951,17 @@ allowed. take directly as argument types or return type a complex type cannot be called by CFFI, unless they are directly using the API mode. + *New in version 1.17:* CFFI now supports complex numbers with MSVC + on Windows. The types are called ``_Fcomplex`` (with floats) and + ``_Dcomplex`` (with doubles). You can use these types or still use + ``float _Complex`` and ``double _Complex`` for cross-platform convenience + in all places except ``set_source()``. With MSVC, the C code you pass to + ``set_source()`` must use ``_Fcomplex`` and ``_Dcomplex`` and + it must contain directly or indirectly ``#include ``, like + normal C code. (CFFI also defines semi-internal macros + ``_cffi_float_complex_t`` and ``_cffi_double_complex_t`` which could + possibly be directly used.) + `[8]` ``wchar_t``, ``char16_t`` and ``char32_t`` See `Unicode character types`_ below.