swig/Source
William S Fulton 3159de3e9f Add support for Python variable annotations as a feature.
Both function annotations and variable annotations are turned on using the
"python:annotations" feature. Example:

  %feature("python:annotations", "c");

  struct V {
    float val;
  };

The generated code contains a variable annotation containing the C float type:

  class V(object):
      val: "float" = property(_example.V_val_get, _example.V_val_set)
      ...

Python 3.5 and earlier do not support variable annotations, so variable
annotations can be turned off with a "python:annotations:novar" feature flag.
Example turning on function annotations but not variable annotations globally:

  %feature("python:annotations", "c");
  %feature("python:annotations:novar");

or via the command line:

  -features python:annotations=c,python:annotations:novar

Closes #1951
2022-03-02 19:33:03 +00:00
..
CParse Remove debug Printf accidentally left in previous commit 2022-03-02 16:08:22 +13:00
DOH Make DOH Char macro more robust 2021-12-13 09:33:26 +13:00
Doxygen Fix typos in docs and comments 2022-02-27 18:15:46 +13:00
Include Correct WARN_JAVA_TYPEMAP_INTERFACEMODIFIERS_UNDEF warning number 2022-03-01 23:10:25 +00:00
Modules Add support for Python variable annotations as a feature. 2022-03-02 19:33:03 +00:00
Preprocessor Emit preprocessor expr error for unary + on string 2022-02-24 09:50:22 +13:00
Swig Merge branch 'using-declarations' into upstream-master 2022-02-20 17:04:56 +00:00
Makefile.am Disable CFFI Common Lisp target language 2019-02-05 18:42:23 +00:00
README Remove details of long-removed directories 2021-05-16 08:42:39 +12:00

SWIG Source directory

 Source/DOH          -  A core set of basic datatypes including
                        strings, lists, hashes, and files.  Used
                        extensively by the rest of SWIG.

 Source/Swig         -  Swig core. Type-system, utility functions.

 Source/Preprocessor -  SWIG C Preprocessor

 Source/CParse       -  SWIG C Parser (still messy)

 Source/Modules      -  Language modules.

 Source/Include      -  Include files.