From f482adc6d1a4b1cc27b4ecbb6b461d1f747906b6 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 22 Jul 2015 23:23:55 +0100 Subject: [PATCH] Add documentation and CHANGES for special variables and typemap attributes. Also add info about special variable expansions in special variable macros. --- CHANGES.current | 35 +++++++++++++++++++ Doc/Manual/Contents.html | 2 ++ Doc/Manual/Typemaps.html | 72 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+) diff --git a/CHANGES.current b/CHANGES.current index 0c56946f8..cd5ae106a 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -5,6 +5,41 @@ See the RELEASENOTES file for a summary of changes in each release. Version 3.0.7 (in progress) =========================== +2015-07-22: wsfulton + Support for special variable expansion in typemap attributes. Example usage expansion + in the 'out' attribute (C# specific): + + %typemap(ctype, out="$*1_ltype") unsigned int& "$*1_ltype" + + is equivalent to the following as $*1_ltype expands to 'unsigned int': + + %typemap(ctype, out="unsigned int") unsigned int& "unsigned int" + + Special variables can be used within special variable macros too. Example usage expansion: + + %typemap(cstype) unsigned int "uint" + %typemap(cstype, out="$typemap(cstype, $*1_ltype)") unsigned int& "$typemap(cstype, $*1_ltype)" + + Special variables are expanded first and hence the above is equivalent to: + + %typemap(cstype, out="$typemap(cstype, unsigned int)") unsigned int& "$typemap(cstype, unsigned int)" + + which then expands to: + + %typemap(cstype, out="uint") unsigned int& "uint" + +2015-07-22: lindleyf + Apply patch #439 - support for $typemap() (aka embedded typemaps or special variable + macros) in typemap attributes. A simple example where $typemap() is expanded in the + 'out' attribute (C# specific): + + %typemap(cstype) unsigned int "uint" + %typemap(cstype, out="$typemap(cstype, unsigned int)") unsigned int& "$typemap(cstype, unsigned int)" + + is equivalent to: + + %typemap(cstype, out="uint") unsigned int& "uint" + 2015-07-18: m7thon [Python] Docstrings provided via %feature("docstring") are now quoted and added to the tp_doc slot when using python builtin classes (-builtin). When no docstring is diff --git a/Doc/Manual/Contents.html b/Doc/Manual/Contents.html index 793f2ed21..06c858b29 100644 --- a/Doc/Manual/Contents.html +++ b/Doc/Manual/Contents.html @@ -441,6 +441,8 @@
  • $descriptor(type)
  • $typemap(method, typepattern) +
  • Special variables and typemap attributes +
  • Special variables combined with special variable macros
  • Common typemap methods +
  • Special variables and typemap attributes +
  • Special variables combined with special variable macros
  • Common typemap methods