<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>siplib/descriptors.c</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -22,3 +22,5 @@ sipconfig.py
 
 .project
 .pydevproject
+
+*.suo</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,479 @@
+2009/02/25 23:13:36  phil
+Reverted to using type's and object's attribute getters and setters now that we
+populate the type dictionary of a generated type with all its lazy attributes
+in one go.
+Changed how an external attributer getter works now that it only needs to
+populate the type dictionary.
+
+
+2009/02/25 21:43:38  phil
+Safety checking of the working (but still to be changed) attribute lookup code.
+
+
+2009/02/25 15:13:32  phil
+Refactored the support for setting instance variables.
+
+
+2009/02/25 10:00:00  phil
+The refactored support for getting variables now works.
+
+
+2009/02/24 16:19:51  phil
+Safety commit of refactored wrapping of class variables.
+
+
+2009/02/23 22:21:08  phil
+Fixed the problem with looking up external lazy attributes - wrapped variables
+are the only thing not working.
+
+
+2009/02/23 18:29:11  phil
+Safety commit of new attribute lookup code.  Don't use this - it's broken.
+
+
+2009/02/23 10:45:53  phil
+Fixed a reference count leak when an external lazy attribute was a descriptor.
+
+
+2009/02/23  6:41:29  phil
+Fixed a crash when accessing a wrapped instance variable as a class variable.
+
+
+2009/02/22 22:52:22  phil
+Fixed a bug in the refactored attribute lookup.
+
+
+2009/02/22 19:05:10  phil
+Completed the support for the lazy attribute lookup hook.
+
+
+2009/02/21 19:03:54  phil
+Added initial support for registering lazy attribute getters.
+
+
+2009/02/21 11:20:27  phil
+The PyQt4 signal table is now generated.
+The XML export now marks the default signal.
+
+
+2009/02/20 10:55:59  phil
+Added the stub of signal table for PyQt4.
+
+
+2009/02/16 22:24:40  phil
+Removed some compiler warnings.
+
+
+2009/02/14 16:58:56  phil
+More signal/slot refactoring fixes.
+
+
+2009/02/14 16:26:47  phil
+Debugged the signal/slot refactoring.
+
+
+2009/02/14 14:36:06  phil
+Safety commit of latest signal/slot refactoring.
+
+
+2009/02/13 19:02:22  phil
+Fixed a build problem with Python 2.4.x and earlier.
+
+
+2009/02/13 17:05:13  phil
+PyQt3 signal support is now enabled with the %Plugin directive instead of
+%SIPOptions.
+Removed %SIPOptions.
+
+
+2009/02/13 16:36:26  phil
+The generated typedefs table is now sorted.
+
+
+2009/02/12 22:16:12  phil
+An unconstrained enum can now be a sub-class of int.
+
+
+2009/02/11 23:11:35  phil
+Renamed TypeFlags to PyQt4Flags.
+Renamed NoQMetaObject to PyQt4NoQMetaObject.
+Moved the type flags into the PyQt4-specific type structure.
+
+
+2009/02/11 20:31:43  phil
+Removed the registration of wrapped types with the Qt meta-type system as it is
+no longer needed by PyQt4.
+
+
+2009/02/07 17:00:39  phil
+Removed sipAssignType() and moved the helpers to the PyQt4 plugin.
+
+
+2009/02/02 10:54:38  phil
+The QObject.sender() support is now PyQt3 only again.
+
+
+2009/02/01 23:26:59  phil
+Fixed a bug in the generation of the sipParseArgs() sub-format character for
+types.
+
+
+2009/02/01 17:08:49  phil
+Changed the QObject::sender() support for PyQt4.
+
+
+2009/02/01 14:50:36  phil
+Debugged the merged types table.
+
+
+2009/01/31 17:20:21  phil
+Safety commit of the merge of the class, mapped types and enum tables.
+
+
+2009/01/30 18:10:53  phil
+Wrapped classes are now created as they are needed and not in the order they
+appear in the generated class table.  Therefore the class, mapped type and enum
+tables can now be merged and ordered by the type name (and searched using a
+binary search).
+
+
+2009/01/29 18:22:23  phil
+Moved the last of the type parsing to PyQt3.
+
+
+2009/01/29 14:43:13  phil
+Moved the registering of int types to PyQt4.
+
+
+2009/01/28 22:54:42  phil
+Refactored the support for looking up typedefs.
+
+
+2009/01/28 12:43:56  phil
+Moved the type parsing support to PyQt3.
+
+
+2009/01/27  9:40:29  phil
+Removed a remaining call to sipReleaseMappedType().
+
+
+2009/01/25 16:32:39  phil
+Fixed a too-few-arguments-to-a-print bug in the code generator.
+
+
+2009/01/25 13:29:37  phil
+Fixed compilation issues.
+
+
+2009/01/18 17:57:34  phil
+Replaced sipFindConnection() with sipFindSlot().
+
+
+2009/01/13 22:21:13  phil
+Replaced sipFreeConnection() with sipFreeSipslot().
+
+
+2009/01/12 22:41:31  phil
+Pushed the parsing of signatures into PyQt.
+
+
+2009/01/11 17:14:59  phil
+Replaced sipConvertRx() with sipConvertRxEx().
+
+
+2009/01/10 17:12:48  phil
+Removed the generation of an old Qt API entry.
+
+
+2009/01/09 19:29:02  phil
+Safety commit of partial refactoring of the Qt signal support.
+
+
+2009/01/04 22:21:36  phil
+Don't import the qt_register_type symbol if it isn't needed.
+Updated copyright notices.
+
+
+2008/12/30 14:54:42  phil
+sipTypeFromPyTypeObject() now takes a PyTypeObject* rather than a PyObject*.
+
+
+2008/12/30 14:11:19  phil
+Added sipTypeName() and sipTypeScope() to the public SIP API.
+
+
+2008/12/29 14:30:17  phil
+Migrated sipEnum_* to sipType_*.
+
+
+2008/12/27 18:23:34  phil
+sipType_* are now generated for enums.  These are used internally but the SIP
+API has not yet been changed.
+
+
+2008/12/27 15:48:11  phil
+Broke out the generated type structures for mapped and class types to different
+structures with a common header.
+
+
+2008/12/26 14:24:26  phil
+Wrapped enums now have their own meta-type.  This is the hook that will allow
+the C++ name of an enum to be derived from the enum's Python type object.
+
+
+2008/12/24 23:37:59  phil
+Added sip_api_init_module() to make sure dependent modules can be fully
+initialised before they are needed.
+
+
+2008/12/24 17:52:54  phil
+Removed the Qt meta-type id from the pyqt4TypeDef structure as we want to use
+it for mapped types as well but we would never know when it was safe to cast
+from a sipTypeDef pointer.
+
+
+2008/12/21 17:05:22  phil
+The PyQt4-specific extension to the generated type structure is now used for
+mapped types as well.
+
+
+2008/12/20 21:16:38  phil
+Changed the PyQt4-specifc handling of Qt meta-type registration.
+
+
+2008/12/20 16:42:50  phil
+A generated type structure now has its Python type object set earlier so that
+sub-meta-types can use sipIsExactWrappedType().
+Calls to QObject::metaObject() are no longer need to trigger the creation of
+the meta-object.
+
+
+2008/12/20 13:28:14  phil
+Added %Plugin and use it to support pyqt4TypeDef.
+
+
+2008/12/19 19:14:27  phil
+Moved the qt_qobject member out of sipWrapperType and into PyQt where it
+belongs.
+
+
+2008/12/19 17:21:42  phil
+Completed the migration of sipClass_* to sipType_*.
+
+
+2008/12/19 11:07:33  phil
+Documentation updates.  All uses of sipClass_* are only by deprecated parts of
+the API.
+
+
+2008/12/19 11:03:12  phil
+Deprecated the 'B' and 'C' format characters to sipBuildResult() and
+sipCallMethod().
+Added the new 'N' format character to sipBuildResult() and sipCallMethod().
+
+
+2008/12/17 22:25:19  phil
+Deprecated the 'C' format character of sipParseResult() in favor of the
+existing 'D' character.
+
+
+2008/12/17 17:25:51  phil
+Migrated the sub-class convertor code to using sipType rather than sipClass.
+
+
+2008/12/16 15:19:31  phil
+Fixed a bug where names of mapped type templates where being generated for
+modules that didn't need them.
+
+
+2008/12/14 17:02:44  phil
+Replaced the deprecated sipConvertFromInstance() and
+sipConvertFromNewInstance() with sipConvertFromType() and
+sipConvertFromNewType().
+
+
+2008/12/14 15:41:40  phil
+Replaced the deprecated sipForceConvertToInstance() and
+sipForceConvertToMappedType() with sipForceConvertToType().
+
+
+2008/12/14 15:04:45  phil
+Replaced the deprecated sipConvertToInstance() and sipConvertToMappedType()
+with sipConvertToType().
+
+
+2008/12/14 14:20:21  phil
+Replaced the deprecated sipCanConvertToInstance() and
+sipCanConvertToMappedType() by sipCanConvertToType().
+
+
+2008/12/13 19:40:56  phil
+Replaced the deprecated sipReleaseInstance() and sipReleaseMappedType() with
+sipReleaseType().
+
+
+2008/12/13 18:51:27  phil
+Replaced the deprecated sipGetWrapper() with sipGetPyObject().
+
+
+2008/12/13 18:02:31  phil
+More moves from sipClass_* to sipType_*.
+
+
+2008/12/13 14:10:14  phil
+More conversions from sipClass_* to sipType_*.
+
+
+2008/12/12 23:51:34  phil
+Merged the adding of type instances.
+
+
+2008/12/08 21:04:07  phil
+Started the port from sipClass_* to sipType_*.
+Added support for assert() to the build system.
+
+
+2008/12/08 19:43:28  phil
+Renamed sipMappedType_* to sipType_*.
+
+
+2008/12/07 22:37:14  phil
+Added sipType_* for wrapped types.  sipClass_* is now defined in terms of
+sipType_*.
+
+
+2008/12/07 17:32:13  phil
+Deprecated sipClassName().
+
+
+2008/12/07 17:01:36  phil
+Mapped types are now described by the same sipTypeDef structure that describes
+wrapped types.
+
+
+2008/12/06 21:48:47  phil
+Moved the 'user' field from sip.wrapper to sip.simplewrapper because PyQt uses
+it for some non-QObject types.
+
+
+2008/12/06 17:35:53  phil
+Restored %DefaultMetatype and the /Metatype/ class annotation.  This support is
+now complete.
+Documented the meta-type and super-type support.
+
+
+2008/12/03 22:06:16  phil
+Code generator changes to support sipSimpleWrapper.
+
+
+2008/12/03 18:29:39  phil
+The sip module now compiles again without any unexpected warnings.
+
+
+2008/12/02 22:26:37  phil
+Various compilation fixes.
+
+
+2008/12/01 21:03:13  phil
+Safety checkin of the support for the new sip.simplewrapper type.
+
+
+2008/12/01  9:20:22  phil
+Added support for %InitialisationCode.  (Actually in the previous commit but I
+forgotto mention it.)
+The text of an attribute exception now mimics that produced by the Python
+interpreter.
+
+
+2008/11/30 18:48:26  phil
+Refactored the super-type and meta-type support. Meta-types are now handled
+implicitly.
+
+
+2008/11/29 16:26:42  phil
+Debugged the metatype support.
+
+
+2008/11/27 22:44:38  phil
+The metatypes are now registered and readied.
+
+
+2008/11/27  0:12:18  phil
+Fixes for various regressions.
+
+
+2008/11/26 22:47:48  phil
+Use the string pool for calls to qRegisterMetaType().
+
+
+2008/11/26 22:40:16  phil
+Completed the code generator support for user defined metatypes.
+
+
+2008/11/24 22:33:00  phil
+Added the parser support for %Metatype and %DefaultMetatype.
+
+
+2008/11/23 15:31:13  phil
+The string pool now overlaps strings where possible.
+
+
+2008/11/23 14:41:09  phil
+Enum names now use the string pool.
+
+
+2008/11/23 12:28:44  phil
+Fixed a regression in the handling of nested namespaces.
+
+
+2008/11/23  0:29:01  phil
+Python and C++ type names now use the string pool.
+The string pool is currently broken for namespace extenders.
+
+
+2008/11/22 17:03:12  phil
+The generated name cache is now a single (const) string.
+
+
+2008/11/22 14:27:24  phil
+Removed all deprecated parts of the API and generated code.
+
+
+2008/11/21 17:03:06  phil
+Use &quot;-undefined dynamic_lookup&quot; rather than linking against the Python
+framework on MacOS.
+
+
+2008/11/18 10:56:01  phil
+Added sipWrapperType_Check() to the public API.
+
+
+2008/11/17 13:43:32  phil
+Merged v4.7.9 into the trunk.
+
+
+2008/11/17 13:39:28  phil
+Released as v4.7.9.
+
+
+2008/11/13 18:36:49  phil
+The new handling of the typedef names was correctly using the real types for
+virtual handler arguments but not the return values.
+
+
+2008/11/08 15:15:51  phil
+Merged v4.7.8 into the trunk.
+
+
+2008/11/08 11:50:56  phil
+Released as v4.7.8.
+
+
+2008/11/06 22:23:05  phil
+Fixed a minor code generating bug that caused too many blank lines to be
+generated with consolidated modules.
+
+
 2008/11/02 14:53:09  phil
 Fixed a bug in the detection of reimplemented methods when the method is a
 Python special method (ie. when the attribute is a method wrapper).</diff>
      <filename>ChangeLog</filename>
    </modified>
    <modified>
      <diff>@@ -1,45 +1,50 @@
-RIVERBANK COMPUTING LIMITED LICENSE AGREEMENT FOR SIP 4.7.8
+RIVERBANK COMPUTING LIMITED LICENSE AGREEMENT FOR SIP 4.8
 
 1. This LICENSE AGREEMENT is between Riverbank Computing Limited
 (&quot;Riverbank&quot;), and the Individual or Organization (&quot;Licensee&quot;) accessing
-and otherwise using SIP 4.7.8 software in source or binary form and its
-associated documentation.
+and otherwise using SIP 4.8 software in source or binary form and its
+associated documentation.  SIP 4.8 comprises a software tool for
+generating Python bindings for software C and C++ libraries, and a Python
+extension module used at runtime by those generated bindings.
 
 2. Subject to the terms and conditions of this License Agreement, Riverbank
 hereby grants Licensee a nonexclusive, royalty-free, world-wide license
 to reproduce, analyze, test, perform and/or display publicly, prepare
-derivative works, distribute, and otherwise use SIP 4.7.8 alone or in
+derivative works, distribute, and otherwise use SIP 4.8 alone or in
 any derivative version, provided, however, that Riverbank's License
-Agreement and Riverbank's notice of copyright, e.g., &quot;Copyright (c) 2008
+Agreement and Riverbank's notice of copyright, e.g., &quot;Copyright (c) 2009
 Riverbank Computing Limited; All Rights Reserved&quot; are retained in
-SIP 4.7.8 alone or in any derivative version prepared by Licensee.
+SIP 4.8 alone or in any derivative version prepared by Licensee.
 
 3. In the event Licensee prepares a derivative work that is based on
-or incorporates SIP 4.7.8 or any part thereof, and wants to make
+or incorporates SIP 4.8 or any part thereof, and wants to make
 the derivative work available to others as provided herein, then
 Licensee hereby agrees to include in any such work a brief summary of
-the changes made to SIP 4.7.8.
+the changes made to SIP 4.8.
 
-4. Riverbank is making SIP 4.7.8 available to Licensee on an &quot;AS IS&quot;
+4. Licensee may not use SIP 4.8 to generate Python bindings for any
+C or C++ library for which bindings are already provided by Riverbank.
+
+5. Riverbank is making SIP 4.8 available to Licensee on an &quot;AS IS&quot;
 basis.  RIVERBANK MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
 IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, RIVERBANK MAKES NO AND
 DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
-FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF SIP 4.7.8 WILL NOT
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF SIP 4.8 WILL NOT
 INFRINGE ANY THIRD PARTY RIGHTS.
 
-5. RIVERBANK SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF
-SIP 4.7.8 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
-AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING SIP 4.7.8,
+6. RIVERBANK SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF
+SIP 4.8 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
+AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING SIP 4.8,
 OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
 
-6. This License Agreement will automatically terminate upon a material
+7. This License Agreement will automatically terminate upon a material
 breach of its terms and conditions.
 
-7. Nothing in this License Agreement shall be deemed to create any
+8. Nothing in this License Agreement shall be deemed to create any
 relationship of agency, partnership, or joint venture between Riverbank
 and Licensee.  This License Agreement does not grant permission to use
 Riverbank trademarks or trade name in a trademark sense to endorse or
 promote products or services of Licensee, or any third party.
 
-8. By copying, installing or otherwise using SIP 4.7.8, Licensee
+9. By copying, installing or otherwise using SIP 4.8, Licensee
 agrees to be bound by the terms and conditions of this License Agreement.</diff>
      <filename>LICENSE</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,11 @@
-v4.7.8 ??? Nov 2008
+v4.8 ???
+  - Added the %InitialisationCode directive.
+  - super() now works as expected.
+
+v4.7.9 17th November 2008
+  - A bug fix release.
+
+v4.7.8 8th November 2008
   - Added the /Deprecated/ class and function annotation (based on a patch from
     Lorenzo Berni).
   - Templates now support instance variables and enums.
@@ -10,7 +17,7 @@ v4.7.8 ??? Nov 2008
     what the compiler sees.  The /NoTypeName/ typedef annotation can be used to
     suppress this behaviour.
 
-v4.7.7 8th Aug 2008
+v4.7.7 8th August 2008
   - C++ structs are now properly handled as a class with a default public
     section.
   - sip.dump() now includes the object's first child wrapper.</diff>
      <filename>NEWS</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 # This script handles the SIP configuration and generates the Makefiles.
 #
-# Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+# Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
 # 
 # This file is part of SIP.
 # 
@@ -22,8 +22,8 @@ import siputils
 
 
 # Initialise the globals.
-sip_version = 0x040708
-sip_version_str = &quot;4.7.8-snapshot-20081102&quot;
+sip_version = 0x040800
+sip_version_str = &quot;4.8-snapshot-20090225&quot;
 py_version = sys.hexversion &gt;&gt; 8
 plat_py_site_dir = None
 plat_py_inc_dir = None
@@ -45,7 +45,6 @@ opt_sipincdir = None
 opt_sipsipdir = None
 opt_static = 0
 opt_debug = 0
-opt_export_all = 0
 opt_universal = None
 
 # The names of build macros extracted from the platform specific configuration
@@ -254,7 +253,6 @@ def create_config(module, template, macros):
         &quot;default_bin_dir&quot;:  plat_bin_dir,
         &quot;default_mod_dir&quot;:  plat_py_site_dir,
         &quot;default_sip_dir&quot;:  opt_sipsipdir,
-        &quot;export_all&quot;:       opt_export_all,
         &quot;py_version&quot;:       py_version,
         &quot;py_inc_dir&quot;:       plat_py_inc_dir,
         &quot;py_conf_inc_dir&quot;:  plat_py_conf_inc_dir,
@@ -336,20 +334,18 @@ def main(argv):
     set_defaults()
 
     try:
-        optlist, args = getopt.getopt(argv[1:], &quot;hab:d:e:knp:s:uv:&quot;)
+        optlist, args = getopt.getopt(argv[1:], &quot;hb:d:e:knp:s:uv:&quot;)
     except getopt.GetoptError:
         usage()
 
     global opt_sipbindir, opt_sipmoddir, opt_sipincdir, opt_sipsipdir
-    global opt_platform, opt_static, opt_debug, opt_export_all, opt_universal
+    global opt_platform, opt_static, opt_debug, opt_universal
 
     sdk = DEFAULT_MACOSX_SDK
 
     for opt, arg in optlist:
         if opt == &quot;-h&quot;:
             usage(0)
-        elif opt == &quot;-a&quot;:
-            opt_export_all = 1
         elif opt == &quot;-b&quot;:
             opt_sipbindir = os.path.abspath(arg)
         elif opt == &quot;-d&quot;:</diff>
      <filename>configure.py</filename>
    </modified>
    <modified>
      <diff>@@ -301,7 +301,7 @@ ul.auto-toc {
 &lt;tr&gt;&lt;th class=&quot;docinfo-name&quot;&gt;Contact:&lt;/th&gt;
 &lt;td&gt;&lt;a class=&quot;first last reference&quot; href=&quot;mailto:info&amp;#64;riverbankcomputing.com&quot;&gt;info&amp;#64;riverbankcomputing.com&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
 &lt;tr&gt;&lt;th class=&quot;docinfo-name&quot;&gt;Version:&lt;/th&gt;
-&lt;td&gt;4.7.8-snapshot-20081102&lt;/td&gt;&lt;/tr&gt;
+&lt;td&gt;4.8-snapshot-20090225&lt;/td&gt;&lt;/tr&gt;
 &lt;tr&gt;&lt;th class=&quot;docinfo-name&quot;&gt;Copyright:&lt;/th&gt;
 &lt;td&gt;Copyright (c) 2008 Riverbank Computing Limited&lt;/td&gt;&lt;/tr&gt;
 &lt;/tbody&gt;
@@ -317,254 +317,279 @@ ul.auto-toc {
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#potential-incompatibilities-with-earlier-versions&quot; id=&quot;id30&quot; name=&quot;id30&quot;&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;Potential Incompatibilities with Earlier Versions&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-v4-7-8&quot; id=&quot;id31&quot; name=&quot;id31&quot;&gt;2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.7.8&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-v4-7-3&quot; id=&quot;id32&quot; name=&quot;id32&quot;&gt;2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.7.3&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-v4-4&quot; id=&quot;id33&quot; name=&quot;id33&quot;&gt;2.3&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.4&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-v4-8&quot; id=&quot;id31&quot; name=&quot;id31&quot;&gt;2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.8&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-v4-7-8&quot; id=&quot;id32&quot; name=&quot;id32&quot;&gt;2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.7.8&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-v4-7-3&quot; id=&quot;id33&quot; name=&quot;id33&quot;&gt;2.3&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.7.3&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-v4-4&quot; id=&quot;id34&quot; name=&quot;id34&quot;&gt;2.4&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.4&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#installing-sip&quot; id=&quot;id34&quot; name=&quot;id34&quot;&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;Installing SIP&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#downloading-sip&quot; id=&quot;id35&quot; name=&quot;id35&quot;&gt;3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Downloading SIP&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#configuring-sip&quot; id=&quot;id36&quot; name=&quot;id36&quot;&gt;3.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Configuring SIP&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#configuring-sip-using-mingw&quot; id=&quot;id37&quot; name=&quot;id37&quot;&gt;3.2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Configuring SIP Using MinGW&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#configuring-sip-using-the-borland-c-compiler&quot; id=&quot;id38&quot; name=&quot;id38&quot;&gt;3.2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Configuring SIP Using the Borland C++ Compiler&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#installing-sip&quot; id=&quot;id35&quot; name=&quot;id35&quot;&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;Installing SIP&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#downloading-sip&quot; id=&quot;id36&quot; name=&quot;id36&quot;&gt;3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Downloading SIP&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#configuring-sip&quot; id=&quot;id37&quot; name=&quot;id37&quot;&gt;3.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Configuring SIP&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#configuring-sip-using-mingw&quot; id=&quot;id38&quot; name=&quot;id38&quot;&gt;3.2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Configuring SIP Using MinGW&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#configuring-sip-using-the-borland-c-compiler&quot; id=&quot;id39&quot; name=&quot;id39&quot;&gt;3.2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Configuring SIP Using the Borland C++ Compiler&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#building-sip&quot; id=&quot;id39&quot; name=&quot;id39&quot;&gt;3.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Building SIP&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#building-sip&quot; id=&quot;id40&quot; name=&quot;id40&quot;&gt;3.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Building SIP&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#using-sip&quot; id=&quot;id40&quot; name=&quot;id40&quot;&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;Using SIP&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#a-simple-c-example&quot; id=&quot;id41&quot; name=&quot;id41&quot;&gt;4.1&amp;nbsp;&amp;nbsp;&amp;nbsp;A Simple C++ Example&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id7&quot; id=&quot;id42&quot; name=&quot;id42&quot;&gt;4.2&amp;nbsp;&amp;nbsp;&amp;nbsp;A Simple C Example&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#a-more-complex-c-example&quot; id=&quot;id43&quot; name=&quot;id43&quot;&gt;4.3&amp;nbsp;&amp;nbsp;&amp;nbsp;A More Complex C++ Example&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#ownership-of-objects&quot; id=&quot;id44&quot; name=&quot;id44&quot;&gt;4.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Ownership of Objects&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#support-for-python-s-buffer-interface&quot; id=&quot;id45&quot; name=&quot;id45&quot;&gt;4.5&amp;nbsp;&amp;nbsp;&amp;nbsp;Support for Python's Buffer Interface&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#support-for-wide-characters&quot; id=&quot;id46&quot; name=&quot;id46&quot;&gt;4.6&amp;nbsp;&amp;nbsp;&amp;nbsp;Support for Wide Characters&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#the-python-global-interpreter-lock&quot; id=&quot;id47&quot; name=&quot;id47&quot;&gt;4.7&amp;nbsp;&amp;nbsp;&amp;nbsp;The Python Global Interpreter Lock&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#using-sip&quot; id=&quot;id41&quot; name=&quot;id41&quot;&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;Using SIP&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#a-simple-c-example&quot; id=&quot;id42&quot; name=&quot;id42&quot;&gt;4.1&amp;nbsp;&amp;nbsp;&amp;nbsp;A Simple C++ Example&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id7&quot; id=&quot;id43&quot; name=&quot;id43&quot;&gt;4.2&amp;nbsp;&amp;nbsp;&amp;nbsp;A Simple C Example&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#a-more-complex-c-example&quot; id=&quot;id44&quot; name=&quot;id44&quot;&gt;4.3&amp;nbsp;&amp;nbsp;&amp;nbsp;A More Complex C++ Example&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#ownership-of-objects&quot; id=&quot;id45&quot; name=&quot;id45&quot;&gt;4.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Ownership of Objects&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#types-and-meta-types&quot; id=&quot;id46&quot; name=&quot;id46&quot;&gt;4.5&amp;nbsp;&amp;nbsp;&amp;nbsp;Types and Meta-types&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#lazy-type-attributes&quot; id=&quot;id47&quot; name=&quot;id47&quot;&gt;4.6&amp;nbsp;&amp;nbsp;&amp;nbsp;Lazy Type Attributes&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#support-for-python-s-buffer-interface&quot; id=&quot;id48&quot; name=&quot;id48&quot;&gt;4.7&amp;nbsp;&amp;nbsp;&amp;nbsp;Support for Python's Buffer Interface&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#support-for-wide-characters&quot; id=&quot;id49&quot; name=&quot;id49&quot;&gt;4.8&amp;nbsp;&amp;nbsp;&amp;nbsp;Support for Wide Characters&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#the-python-global-interpreter-lock&quot; id=&quot;id50&quot; name=&quot;id50&quot;&gt;4.9&amp;nbsp;&amp;nbsp;&amp;nbsp;The Python Global Interpreter Lock&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#the-sip-command-line&quot; id=&quot;id48&quot; name=&quot;id48&quot;&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;The SIP Command Line&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-specification-files&quot; id=&quot;id49&quot; name=&quot;id49&quot;&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP Specification Files&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#syntax-definition&quot; id=&quot;id50&quot; name=&quot;id50&quot;&gt;6.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Syntax Definition&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#variable-numbers-of-arguments&quot; id=&quot;id51&quot; name=&quot;id51&quot;&gt;6.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Variable Numbers of Arguments&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#additional-sip-types&quot; id=&quot;id52&quot; name=&quot;id52&quot;&gt;6.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Additional SIP Types&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-anyslot&quot; id=&quot;id53&quot; name=&quot;id53&quot;&gt;6.3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_ANYSLOT&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pycallable&quot; id=&quot;id54&quot; name=&quot;id54&quot;&gt;6.3.2&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYCALLABLE&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pydict&quot; id=&quot;id55&quot; name=&quot;id55&quot;&gt;6.3.3&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYDICT&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pylist&quot; id=&quot;id56&quot; name=&quot;id56&quot;&gt;6.3.4&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYLIST&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pyobject&quot; id=&quot;id57&quot; name=&quot;id57&quot;&gt;6.3.5&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYOBJECT&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pyslice&quot; id=&quot;id58&quot; name=&quot;id58&quot;&gt;6.3.6&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYSLICE&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pytuple&quot; id=&quot;id59&quot; name=&quot;id59&quot;&gt;6.3.7&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYTUPLE&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pytype&quot; id=&quot;id60&quot; name=&quot;id60&quot;&gt;6.3.8&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYTYPE&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-qobject&quot; id=&quot;id61&quot; name=&quot;id61&quot;&gt;6.3.9&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_QOBJECT&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-rxobj-con&quot; id=&quot;id62&quot; name=&quot;id62&quot;&gt;6.3.10&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_RXOBJ_CON&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-rxobj-dis&quot; id=&quot;id63&quot; name=&quot;id63&quot;&gt;6.3.11&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_RXOBJ_DIS&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-signal&quot; id=&quot;id64&quot; name=&quot;id64&quot;&gt;6.3.12&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SIGNAL&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-slot&quot; id=&quot;id65&quot; name=&quot;id65&quot;&gt;6.3.13&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SLOT&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-slot-con&quot; id=&quot;id66&quot; name=&quot;id66&quot;&gt;6.3.14&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SLOT_CON&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-slot-dis&quot; id=&quot;id67&quot; name=&quot;id67&quot;&gt;6.3.15&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SLOT_DIS&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#the-sip-command-line&quot; id=&quot;id51&quot; name=&quot;id51&quot;&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;The SIP Command Line&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-specification-files&quot; id=&quot;id52&quot; name=&quot;id52&quot;&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP Specification Files&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#syntax-definition&quot; id=&quot;id53&quot; name=&quot;id53&quot;&gt;6.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Syntax Definition&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#variable-numbers-of-arguments&quot; id=&quot;id54&quot; name=&quot;id54&quot;&gt;6.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Variable Numbers of Arguments&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#additional-sip-types&quot; id=&quot;id55&quot; name=&quot;id55&quot;&gt;6.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Additional SIP Types&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-anyslot&quot; id=&quot;id56&quot; name=&quot;id56&quot;&gt;6.3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_ANYSLOT&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pycallable&quot; id=&quot;id57&quot; name=&quot;id57&quot;&gt;6.3.2&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYCALLABLE&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pydict&quot; id=&quot;id58&quot; name=&quot;id58&quot;&gt;6.3.3&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYDICT&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pylist&quot; id=&quot;id59&quot; name=&quot;id59&quot;&gt;6.3.4&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYLIST&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pyobject&quot; id=&quot;id60&quot; name=&quot;id60&quot;&gt;6.3.5&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYOBJECT&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pyslice&quot; id=&quot;id61&quot; name=&quot;id61&quot;&gt;6.3.6&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYSLICE&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pytuple&quot; id=&quot;id62&quot; name=&quot;id62&quot;&gt;6.3.7&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYTUPLE&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-pytype&quot; id=&quot;id63&quot; name=&quot;id63&quot;&gt;6.3.8&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYTYPE&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-qobject&quot; id=&quot;id64&quot; name=&quot;id64&quot;&gt;6.3.9&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_QOBJECT&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-rxobj-con&quot; id=&quot;id65&quot; name=&quot;id65&quot;&gt;6.3.10&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_RXOBJ_CON&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-rxobj-dis&quot; id=&quot;id66&quot; name=&quot;id66&quot;&gt;6.3.11&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_RXOBJ_DIS&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-signal&quot; id=&quot;id67&quot; name=&quot;id67&quot;&gt;6.3.12&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SIGNAL&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-slot&quot; id=&quot;id68&quot; name=&quot;id68&quot;&gt;6.3.13&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SLOT&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-slot-con&quot; id=&quot;id69&quot; name=&quot;id69&quot;&gt;6.3.14&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SLOT_CON&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-slot-dis&quot; id=&quot;id70&quot; name=&quot;id70&quot;&gt;6.3.15&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SLOT_DIS&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-directives&quot; id=&quot;id68&quot; name=&quot;id68&quot;&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP Directives&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#accesscode&quot; id=&quot;id69&quot; name=&quot;id69&quot;&gt;7.1&amp;nbsp;&amp;nbsp;&amp;nbsp;%AccessCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#bigetcharbuffercode&quot; id=&quot;id70&quot; name=&quot;id70&quot;&gt;7.2&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetCharBufferCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#bigetreadbuffercode&quot; id=&quot;id71&quot; name=&quot;id71&quot;&gt;7.3&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetReadBufferCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#bigetsegcountcode&quot; id=&quot;id72&quot; name=&quot;id72&quot;&gt;7.4&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetSegCountCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#bigetwritebuffercode&quot; id=&quot;id73&quot; name=&quot;id73&quot;&gt;7.5&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetWriteBufferCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#cmodule&quot; id=&quot;id74&quot; name=&quot;id74&quot;&gt;7.6&amp;nbsp;&amp;nbsp;&amp;nbsp;%CModule&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#compositemodule&quot; id=&quot;id75&quot; name=&quot;id75&quot;&gt;7.7&amp;nbsp;&amp;nbsp;&amp;nbsp;%CompositeModule&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#consolidatedmodule&quot; id=&quot;id76&quot; name=&quot;id76&quot;&gt;7.8&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConsolidatedModule&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#convertfromtypecode&quot; id=&quot;id77&quot; name=&quot;id77&quot;&gt;7.9&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConvertFromTypeCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot; id=&quot;id78&quot; name=&quot;id78&quot;&gt;7.10&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConvertToSubClassCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#converttotypecode&quot; id=&quot;id79&quot; name=&quot;id79&quot;&gt;7.11&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConvertToTypeCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#copying&quot; id=&quot;id80&quot; name=&quot;id80&quot;&gt;7.12&amp;nbsp;&amp;nbsp;&amp;nbsp;%Copying&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#doc&quot; id=&quot;id81&quot; name=&quot;id81&quot;&gt;7.13&amp;nbsp;&amp;nbsp;&amp;nbsp;%Doc&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#end&quot; id=&quot;id82&quot; name=&quot;id82&quot;&gt;7.14&amp;nbsp;&amp;nbsp;&amp;nbsp;%End&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#exception&quot; id=&quot;id83&quot; name=&quot;id83&quot;&gt;7.15&amp;nbsp;&amp;nbsp;&amp;nbsp;%Exception&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#exporteddoc&quot; id=&quot;id84&quot; name=&quot;id84&quot;&gt;7.16&amp;nbsp;&amp;nbsp;&amp;nbsp;%ExportedDoc&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#exportedheadercode&quot; id=&quot;id85&quot; name=&quot;id85&quot;&gt;7.17&amp;nbsp;&amp;nbsp;&amp;nbsp;%ExportedHeaderCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#feature&quot; id=&quot;id86&quot; name=&quot;id86&quot;&gt;7.18&amp;nbsp;&amp;nbsp;&amp;nbsp;%Feature&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#gcclearcode&quot; id=&quot;id87&quot; name=&quot;id87&quot;&gt;7.19&amp;nbsp;&amp;nbsp;&amp;nbsp;%GCClearCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#gctraversecode&quot; id=&quot;id88&quot; name=&quot;id88&quot;&gt;7.20&amp;nbsp;&amp;nbsp;&amp;nbsp;%GCTraverseCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#getcode&quot; id=&quot;id89&quot; name=&quot;id89&quot;&gt;7.21&amp;nbsp;&amp;nbsp;&amp;nbsp;%GetCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#if&quot; id=&quot;id90&quot; name=&quot;id90&quot;&gt;7.22&amp;nbsp;&amp;nbsp;&amp;nbsp;%If&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#import&quot; id=&quot;id91&quot; name=&quot;id91&quot;&gt;7.23&amp;nbsp;&amp;nbsp;&amp;nbsp;%Import&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#include&quot; id=&quot;id92&quot; name=&quot;id92&quot;&gt;7.24&amp;nbsp;&amp;nbsp;&amp;nbsp;%Include&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id14&quot; id=&quot;id93&quot; name=&quot;id93&quot;&gt;7.25&amp;nbsp;&amp;nbsp;&amp;nbsp;%License&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#mappedtype&quot; id=&quot;id94&quot; name=&quot;id94&quot;&gt;7.26&amp;nbsp;&amp;nbsp;&amp;nbsp;%MappedType&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#methodcode&quot; id=&quot;id95&quot; name=&quot;id95&quot;&gt;7.27&amp;nbsp;&amp;nbsp;&amp;nbsp;%MethodCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#module&quot; id=&quot;id96&quot; name=&quot;id96&quot;&gt;7.28&amp;nbsp;&amp;nbsp;&amp;nbsp;%Module&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#modulecode&quot; id=&quot;id97&quot; name=&quot;id97&quot;&gt;7.29&amp;nbsp;&amp;nbsp;&amp;nbsp;%ModuleCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#moduleheadercode&quot; id=&quot;id98&quot; name=&quot;id98&quot;&gt;7.30&amp;nbsp;&amp;nbsp;&amp;nbsp;%ModuleHeaderCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#optionalinclude&quot; id=&quot;id99&quot; name=&quot;id99&quot;&gt;7.31&amp;nbsp;&amp;nbsp;&amp;nbsp;%OptionalInclude&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#picklecode&quot; id=&quot;id100&quot; name=&quot;id100&quot;&gt;7.32&amp;nbsp;&amp;nbsp;&amp;nbsp;%PickleCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#platforms&quot; id=&quot;id101&quot; name=&quot;id101&quot;&gt;7.33&amp;nbsp;&amp;nbsp;&amp;nbsp;%Platforms&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#postinitialisationcode&quot; id=&quot;id102&quot; name=&quot;id102&quot;&gt;7.34&amp;nbsp;&amp;nbsp;&amp;nbsp;%PostInitialisationCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#preinitialisationcode&quot; id=&quot;id103&quot; name=&quot;id103&quot;&gt;7.35&amp;nbsp;&amp;nbsp;&amp;nbsp;%PreInitialisationCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#raisecode&quot; id=&quot;id104&quot; name=&quot;id104&quot;&gt;7.36&amp;nbsp;&amp;nbsp;&amp;nbsp;%RaiseCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#setcode&quot; id=&quot;id105&quot; name=&quot;id105&quot;&gt;7.37&amp;nbsp;&amp;nbsp;&amp;nbsp;%SetCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipoptions&quot; id=&quot;id106&quot; name=&quot;id106&quot;&gt;7.38&amp;nbsp;&amp;nbsp;&amp;nbsp;%SIPOptions&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#timeline&quot; id=&quot;id107&quot; name=&quot;id107&quot;&gt;7.39&amp;nbsp;&amp;nbsp;&amp;nbsp;%Timeline&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#typecode&quot; id=&quot;id108&quot; name=&quot;id108&quot;&gt;7.40&amp;nbsp;&amp;nbsp;&amp;nbsp;%TypeCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#typeheadercode&quot; id=&quot;id109&quot; name=&quot;id109&quot;&gt;7.41&amp;nbsp;&amp;nbsp;&amp;nbsp;%TypeHeaderCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#unitcode&quot; id=&quot;id110&quot; name=&quot;id110&quot;&gt;7.42&amp;nbsp;&amp;nbsp;&amp;nbsp;%UnitCode&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#virtualcatchercode&quot; id=&quot;id111&quot; name=&quot;id111&quot;&gt;7.43&amp;nbsp;&amp;nbsp;&amp;nbsp;%VirtualCatcherCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-directives&quot; id=&quot;id71&quot; name=&quot;id71&quot;&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP Directives&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#accesscode&quot; id=&quot;id72&quot; name=&quot;id72&quot;&gt;7.1&amp;nbsp;&amp;nbsp;&amp;nbsp;%AccessCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#bigetcharbuffercode&quot; id=&quot;id73&quot; name=&quot;id73&quot;&gt;7.2&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetCharBufferCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#bigetreadbuffercode&quot; id=&quot;id74&quot; name=&quot;id74&quot;&gt;7.3&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetReadBufferCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#bigetsegcountcode&quot; id=&quot;id75&quot; name=&quot;id75&quot;&gt;7.4&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetSegCountCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#bigetwritebuffercode&quot; id=&quot;id76&quot; name=&quot;id76&quot;&gt;7.5&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetWriteBufferCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#cmodule&quot; id=&quot;id77&quot; name=&quot;id77&quot;&gt;7.6&amp;nbsp;&amp;nbsp;&amp;nbsp;%CModule&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#compositemodule&quot; id=&quot;id78&quot; name=&quot;id78&quot;&gt;7.7&amp;nbsp;&amp;nbsp;&amp;nbsp;%CompositeModule&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#consolidatedmodule&quot; id=&quot;id79&quot; name=&quot;id79&quot;&gt;7.8&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConsolidatedModule&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#convertfromtypecode&quot; id=&quot;id80&quot; name=&quot;id80&quot;&gt;7.9&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConvertFromTypeCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot; id=&quot;id81&quot; name=&quot;id81&quot;&gt;7.10&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConvertToSubClassCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#converttotypecode&quot; id=&quot;id82&quot; name=&quot;id82&quot;&gt;7.11&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConvertToTypeCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#copying&quot; id=&quot;id83&quot; name=&quot;id83&quot;&gt;7.12&amp;nbsp;&amp;nbsp;&amp;nbsp;%Copying&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#defaultmetatype&quot; id=&quot;id84&quot; name=&quot;id84&quot;&gt;7.13&amp;nbsp;&amp;nbsp;&amp;nbsp;%DefaultMetatype&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#defaultsupertype&quot; id=&quot;id85&quot; name=&quot;id85&quot;&gt;7.14&amp;nbsp;&amp;nbsp;&amp;nbsp;%DefaultSupertype&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#doc&quot; id=&quot;id86&quot; name=&quot;id86&quot;&gt;7.15&amp;nbsp;&amp;nbsp;&amp;nbsp;%Doc&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#end&quot; id=&quot;id87&quot; name=&quot;id87&quot;&gt;7.16&amp;nbsp;&amp;nbsp;&amp;nbsp;%End&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#exception&quot; id=&quot;id88&quot; name=&quot;id88&quot;&gt;7.17&amp;nbsp;&amp;nbsp;&amp;nbsp;%Exception&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#exporteddoc&quot; id=&quot;id89&quot; name=&quot;id89&quot;&gt;7.18&amp;nbsp;&amp;nbsp;&amp;nbsp;%ExportedDoc&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#exportedheadercode&quot; id=&quot;id90&quot; name=&quot;id90&quot;&gt;7.19&amp;nbsp;&amp;nbsp;&amp;nbsp;%ExportedHeaderCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#feature&quot; id=&quot;id91&quot; name=&quot;id91&quot;&gt;7.20&amp;nbsp;&amp;nbsp;&amp;nbsp;%Feature&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#gcclearcode&quot; id=&quot;id92&quot; name=&quot;id92&quot;&gt;7.21&amp;nbsp;&amp;nbsp;&amp;nbsp;%GCClearCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#gctraversecode&quot; id=&quot;id93&quot; name=&quot;id93&quot;&gt;7.22&amp;nbsp;&amp;nbsp;&amp;nbsp;%GCTraverseCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#getcode&quot; id=&quot;id94&quot; name=&quot;id94&quot;&gt;7.23&amp;nbsp;&amp;nbsp;&amp;nbsp;%GetCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#if&quot; id=&quot;id95&quot; name=&quot;id95&quot;&gt;7.24&amp;nbsp;&amp;nbsp;&amp;nbsp;%If&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#import&quot; id=&quot;id96&quot; name=&quot;id96&quot;&gt;7.25&amp;nbsp;&amp;nbsp;&amp;nbsp;%Import&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#include&quot; id=&quot;id97&quot; name=&quot;id97&quot;&gt;7.26&amp;nbsp;&amp;nbsp;&amp;nbsp;%Include&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#initialisationcode&quot; id=&quot;id98&quot; name=&quot;id98&quot;&gt;7.27&amp;nbsp;&amp;nbsp;&amp;nbsp;%InitialisationCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id14&quot; id=&quot;id99&quot; name=&quot;id99&quot;&gt;7.28&amp;nbsp;&amp;nbsp;&amp;nbsp;%License&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#mappedtype&quot; id=&quot;id100&quot; name=&quot;id100&quot;&gt;7.29&amp;nbsp;&amp;nbsp;&amp;nbsp;%MappedType&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#methodcode&quot; id=&quot;id101&quot; name=&quot;id101&quot;&gt;7.30&amp;nbsp;&amp;nbsp;&amp;nbsp;%MethodCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#module&quot; id=&quot;id102&quot; name=&quot;id102&quot;&gt;7.31&amp;nbsp;&amp;nbsp;&amp;nbsp;%Module&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#modulecode&quot; id=&quot;id103&quot; name=&quot;id103&quot;&gt;7.32&amp;nbsp;&amp;nbsp;&amp;nbsp;%ModuleCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#moduleheadercode&quot; id=&quot;id104&quot; name=&quot;id104&quot;&gt;7.33&amp;nbsp;&amp;nbsp;&amp;nbsp;%ModuleHeaderCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#optionalinclude&quot; id=&quot;id105&quot; name=&quot;id105&quot;&gt;7.34&amp;nbsp;&amp;nbsp;&amp;nbsp;%OptionalInclude&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#picklecode&quot; id=&quot;id106&quot; name=&quot;id106&quot;&gt;7.35&amp;nbsp;&amp;nbsp;&amp;nbsp;%PickleCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#platforms&quot; id=&quot;id107&quot; name=&quot;id107&quot;&gt;7.36&amp;nbsp;&amp;nbsp;&amp;nbsp;%Platforms&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#postinitialisationcode&quot; id=&quot;id108&quot; name=&quot;id108&quot;&gt;7.37&amp;nbsp;&amp;nbsp;&amp;nbsp;%PostInitialisationCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#preinitialisationcode&quot; id=&quot;id109&quot; name=&quot;id109&quot;&gt;7.38&amp;nbsp;&amp;nbsp;&amp;nbsp;%PreInitialisationCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#raisecode&quot; id=&quot;id110&quot; name=&quot;id110&quot;&gt;7.39&amp;nbsp;&amp;nbsp;&amp;nbsp;%RaiseCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#setcode&quot; id=&quot;id111&quot; name=&quot;id111&quot;&gt;7.40&amp;nbsp;&amp;nbsp;&amp;nbsp;%SetCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#timeline&quot; id=&quot;id112&quot; name=&quot;id112&quot;&gt;7.41&amp;nbsp;&amp;nbsp;&amp;nbsp;%Timeline&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#typecode&quot; id=&quot;id113&quot; name=&quot;id113&quot;&gt;7.42&amp;nbsp;&amp;nbsp;&amp;nbsp;%TypeCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#typeheadercode&quot; id=&quot;id114&quot; name=&quot;id114&quot;&gt;7.43&amp;nbsp;&amp;nbsp;&amp;nbsp;%TypeHeaderCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#unitcode&quot; id=&quot;id115&quot; name=&quot;id115&quot;&gt;7.44&amp;nbsp;&amp;nbsp;&amp;nbsp;%UnitCode&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#virtualcatchercode&quot; id=&quot;id116&quot; name=&quot;id116&quot;&gt;7.45&amp;nbsp;&amp;nbsp;&amp;nbsp;%VirtualCatcherCode&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-annotations&quot; id=&quot;id112&quot; name=&quot;id112&quot;&gt;8&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#argument-annotations&quot; id=&quot;id113&quot; name=&quot;id113&quot;&gt;8.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Argument Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#allownone&quot; id=&quot;id114&quot; name=&quot;id114&quot;&gt;8.1.1&amp;nbsp;&amp;nbsp;&amp;nbsp;AllowNone&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#array&quot; id=&quot;id115&quot; name=&quot;id115&quot;&gt;8.1.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Array&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#arraysize&quot; id=&quot;id116&quot; name=&quot;id116&quot;&gt;8.1.3&amp;nbsp;&amp;nbsp;&amp;nbsp;ArraySize&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#constrained&quot; id=&quot;id117&quot; name=&quot;id117&quot;&gt;8.1.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Constrained&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#getwrapper&quot; id=&quot;id118&quot; name=&quot;id118&quot;&gt;8.1.5&amp;nbsp;&amp;nbsp;&amp;nbsp;GetWrapper&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#in&quot; id=&quot;id119&quot; name=&quot;id119&quot;&gt;8.1.6&amp;nbsp;&amp;nbsp;&amp;nbsp;In&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#out&quot; id=&quot;id120&quot; name=&quot;id120&quot;&gt;8.1.7&amp;nbsp;&amp;nbsp;&amp;nbsp;Out&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#resultsize&quot; id=&quot;id121&quot; name=&quot;id121&quot;&gt;8.1.8&amp;nbsp;&amp;nbsp;&amp;nbsp;ResultSize&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#singleshot&quot; id=&quot;id122&quot; name=&quot;id122&quot;&gt;8.1.9&amp;nbsp;&amp;nbsp;&amp;nbsp;SingleShot&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#transfer&quot; id=&quot;id123&quot; name=&quot;id123&quot;&gt;8.1.10&amp;nbsp;&amp;nbsp;&amp;nbsp;Transfer&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#transferback&quot; id=&quot;id124&quot; name=&quot;id124&quot;&gt;8.1.11&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferBack&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#transferthis&quot; id=&quot;id125&quot; name=&quot;id125&quot;&gt;8.1.12&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferThis&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-annotations&quot; id=&quot;id117&quot; name=&quot;id117&quot;&gt;8&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#argument-annotations&quot; id=&quot;id118&quot; name=&quot;id118&quot;&gt;8.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Argument Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#allownone&quot; id=&quot;id119&quot; name=&quot;id119&quot;&gt;8.1.1&amp;nbsp;&amp;nbsp;&amp;nbsp;AllowNone&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#array&quot; id=&quot;id120&quot; name=&quot;id120&quot;&gt;8.1.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Array&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#arraysize&quot; id=&quot;id121&quot; name=&quot;id121&quot;&gt;8.1.3&amp;nbsp;&amp;nbsp;&amp;nbsp;ArraySize&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#constrained&quot; id=&quot;id122&quot; name=&quot;id122&quot;&gt;8.1.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Constrained&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#getwrapper&quot; id=&quot;id123&quot; name=&quot;id123&quot;&gt;8.1.5&amp;nbsp;&amp;nbsp;&amp;nbsp;GetWrapper&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#in&quot; id=&quot;id124&quot; name=&quot;id124&quot;&gt;8.1.6&amp;nbsp;&amp;nbsp;&amp;nbsp;In&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#out&quot; id=&quot;id125&quot; name=&quot;id125&quot;&gt;8.1.7&amp;nbsp;&amp;nbsp;&amp;nbsp;Out&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#resultsize&quot; id=&quot;id126&quot; name=&quot;id126&quot;&gt;8.1.8&amp;nbsp;&amp;nbsp;&amp;nbsp;ResultSize&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#singleshot&quot; id=&quot;id127&quot; name=&quot;id127&quot;&gt;8.1.9&amp;nbsp;&amp;nbsp;&amp;nbsp;SingleShot&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#transfer&quot; id=&quot;id128&quot; name=&quot;id128&quot;&gt;8.1.10&amp;nbsp;&amp;nbsp;&amp;nbsp;Transfer&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#transferback&quot; id=&quot;id129&quot; name=&quot;id129&quot;&gt;8.1.11&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferBack&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#transferthis&quot; id=&quot;id130&quot; name=&quot;id130&quot;&gt;8.1.12&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferThis&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#class-annotations&quot; id=&quot;id126&quot; name=&quot;id126&quot;&gt;8.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Class Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#abstract&quot; id=&quot;id127&quot; name=&quot;id127&quot;&gt;8.2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Abstract&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#delaydtor&quot; id=&quot;id128&quot; name=&quot;id128&quot;&gt;8.2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;DelayDtor&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#deprecated&quot; id=&quot;id129&quot; name=&quot;id129&quot;&gt;8.2.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Deprecated&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#external&quot; id=&quot;id130&quot; name=&quot;id130&quot;&gt;8.2.4&amp;nbsp;&amp;nbsp;&amp;nbsp;External&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#nodefaultctors&quot; id=&quot;id131&quot; name=&quot;id131&quot;&gt;8.2.5&amp;nbsp;&amp;nbsp;&amp;nbsp;NoDefaultCtors&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#pyname&quot; id=&quot;id132&quot; name=&quot;id132&quot;&gt;8.2.6&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#class-annotations&quot; id=&quot;id131&quot; name=&quot;id131&quot;&gt;8.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Class Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#abstract&quot; id=&quot;id132&quot; name=&quot;id132&quot;&gt;8.2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Abstract&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#delaydtor&quot; id=&quot;id133&quot; name=&quot;id133&quot;&gt;8.2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;DelayDtor&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#deprecated&quot; id=&quot;id134&quot; name=&quot;id134&quot;&gt;8.2.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Deprecated&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#external&quot; id=&quot;id135&quot; name=&quot;id135&quot;&gt;8.2.4&amp;nbsp;&amp;nbsp;&amp;nbsp;External&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#metatype&quot; id=&quot;id136&quot; name=&quot;id136&quot;&gt;8.2.5&amp;nbsp;&amp;nbsp;&amp;nbsp;Metatype&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#nodefaultctors&quot; id=&quot;id137&quot; name=&quot;id137&quot;&gt;8.2.6&amp;nbsp;&amp;nbsp;&amp;nbsp;NoDefaultCtors&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#pyname&quot; id=&quot;id138&quot; name=&quot;id138&quot;&gt;8.2.7&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#supertype&quot; id=&quot;id139&quot; name=&quot;id139&quot;&gt;8.2.8&amp;nbsp;&amp;nbsp;&amp;nbsp;Supertype&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#mapped-type-annotations&quot; id=&quot;id133&quot; name=&quot;id133&quot;&gt;8.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Mapped Type Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#norelease&quot; id=&quot;id134&quot; name=&quot;id134&quot;&gt;8.3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;NoRelease&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#mapped-type-annotations&quot; id=&quot;id140&quot; name=&quot;id140&quot;&gt;8.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Mapped Type Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#norelease&quot; id=&quot;id141&quot; name=&quot;id141&quot;&gt;8.3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;NoRelease&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#enum-annotations&quot; id=&quot;id135&quot; name=&quot;id135&quot;&gt;8.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Enum Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id17&quot; id=&quot;id136&quot; name=&quot;id136&quot;&gt;8.4.1&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#enum-annotations&quot; id=&quot;id142&quot; name=&quot;id142&quot;&gt;8.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Enum Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id17&quot; id=&quot;id143&quot; name=&quot;id143&quot;&gt;8.4.1&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#exception-annotations&quot; id=&quot;id137&quot; name=&quot;id137&quot;&gt;8.5&amp;nbsp;&amp;nbsp;&amp;nbsp;Exception Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id18&quot; id=&quot;id138&quot; name=&quot;id138&quot;&gt;8.5.1&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#exception-annotations&quot; id=&quot;id144&quot; name=&quot;id144&quot;&gt;8.5&amp;nbsp;&amp;nbsp;&amp;nbsp;Exception Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id18&quot; id=&quot;id145&quot; name=&quot;id145&quot;&gt;8.5.1&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#function-annotations&quot; id=&quot;id139&quot; name=&quot;id139&quot;&gt;8.6&amp;nbsp;&amp;nbsp;&amp;nbsp;Function Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#autogen&quot; id=&quot;id140&quot; name=&quot;id140&quot;&gt;8.6.1&amp;nbsp;&amp;nbsp;&amp;nbsp;AutoGen&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#default&quot; id=&quot;id141&quot; name=&quot;id141&quot;&gt;8.6.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Default&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id19&quot; id=&quot;id142&quot; name=&quot;id142&quot;&gt;8.6.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Deprecated&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#factory&quot; id=&quot;id143&quot; name=&quot;id143&quot;&gt;8.6.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Factory&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#holdgil&quot; id=&quot;id144&quot; name=&quot;id144&quot;&gt;8.6.5&amp;nbsp;&amp;nbsp;&amp;nbsp;HoldGIL&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#newthread&quot; id=&quot;id145&quot; name=&quot;id145&quot;&gt;8.6.6&amp;nbsp;&amp;nbsp;&amp;nbsp;NewThread&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#noargparser&quot; id=&quot;id146&quot; name=&quot;id146&quot;&gt;8.6.7&amp;nbsp;&amp;nbsp;&amp;nbsp;NoArgParser&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#noderived&quot; id=&quot;id147&quot; name=&quot;id147&quot;&gt;8.6.8&amp;nbsp;&amp;nbsp;&amp;nbsp;NoDerived&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#numeric&quot; id=&quot;id148&quot; name=&quot;id148&quot;&gt;8.6.9&amp;nbsp;&amp;nbsp;&amp;nbsp;Numeric&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#posthook&quot; id=&quot;id149&quot; name=&quot;id149&quot;&gt;8.6.10&amp;nbsp;&amp;nbsp;&amp;nbsp;PostHook&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#prehook&quot; id=&quot;id150&quot; name=&quot;id150&quot;&gt;8.6.11&amp;nbsp;&amp;nbsp;&amp;nbsp;PreHook&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id20&quot; id=&quot;id151&quot; name=&quot;id151&quot;&gt;8.6.12&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#releasegil&quot; id=&quot;id152&quot; name=&quot;id152&quot;&gt;8.6.13&amp;nbsp;&amp;nbsp;&amp;nbsp;ReleaseGIL&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id21&quot; id=&quot;id153&quot; name=&quot;id153&quot;&gt;8.6.14&amp;nbsp;&amp;nbsp;&amp;nbsp;Transfer&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id22&quot; id=&quot;id154&quot; name=&quot;id154&quot;&gt;8.6.15&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferBack&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id23&quot; id=&quot;id155&quot; name=&quot;id155&quot;&gt;8.6.16&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferThis&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#function-annotations&quot; id=&quot;id146&quot; name=&quot;id146&quot;&gt;8.6&amp;nbsp;&amp;nbsp;&amp;nbsp;Function Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#autogen&quot; id=&quot;id147&quot; name=&quot;id147&quot;&gt;8.6.1&amp;nbsp;&amp;nbsp;&amp;nbsp;AutoGen&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#default&quot; id=&quot;id148&quot; name=&quot;id148&quot;&gt;8.6.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Default&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id19&quot; id=&quot;id149&quot; name=&quot;id149&quot;&gt;8.6.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Deprecated&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#factory&quot; id=&quot;id150&quot; name=&quot;id150&quot;&gt;8.6.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Factory&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#holdgil&quot; id=&quot;id151&quot; name=&quot;id151&quot;&gt;8.6.5&amp;nbsp;&amp;nbsp;&amp;nbsp;HoldGIL&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#newthread&quot; id=&quot;id152&quot; name=&quot;id152&quot;&gt;8.6.6&amp;nbsp;&amp;nbsp;&amp;nbsp;NewThread&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#noargparser&quot; id=&quot;id153&quot; name=&quot;id153&quot;&gt;8.6.7&amp;nbsp;&amp;nbsp;&amp;nbsp;NoArgParser&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#noderived&quot; id=&quot;id154&quot; name=&quot;id154&quot;&gt;8.6.8&amp;nbsp;&amp;nbsp;&amp;nbsp;NoDerived&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#numeric&quot; id=&quot;id155&quot; name=&quot;id155&quot;&gt;8.6.9&amp;nbsp;&amp;nbsp;&amp;nbsp;Numeric&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#posthook&quot; id=&quot;id156&quot; name=&quot;id156&quot;&gt;8.6.10&amp;nbsp;&amp;nbsp;&amp;nbsp;PostHook&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#prehook&quot; id=&quot;id157&quot; name=&quot;id157&quot;&gt;8.6.11&amp;nbsp;&amp;nbsp;&amp;nbsp;PreHook&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id20&quot; id=&quot;id158&quot; name=&quot;id158&quot;&gt;8.6.12&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#releasegil&quot; id=&quot;id159&quot; name=&quot;id159&quot;&gt;8.6.13&amp;nbsp;&amp;nbsp;&amp;nbsp;ReleaseGIL&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id21&quot; id=&quot;id160&quot; name=&quot;id160&quot;&gt;8.6.14&amp;nbsp;&amp;nbsp;&amp;nbsp;Transfer&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id22&quot; id=&quot;id161&quot; name=&quot;id161&quot;&gt;8.6.15&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferBack&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id23&quot; id=&quot;id162&quot; name=&quot;id162&quot;&gt;8.6.16&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferThis&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#license-annotations&quot; id=&quot;id156&quot; name=&quot;id156&quot;&gt;8.7&amp;nbsp;&amp;nbsp;&amp;nbsp;License Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#licensee&quot; id=&quot;id157&quot; name=&quot;id157&quot;&gt;8.7.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Licensee&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#signature&quot; id=&quot;id158&quot; name=&quot;id158&quot;&gt;8.7.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Signature&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#timestamp&quot; id=&quot;id159&quot; name=&quot;id159&quot;&gt;8.7.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Timestamp&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#type&quot; id=&quot;id160&quot; name=&quot;id160&quot;&gt;8.7.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Type&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#license-annotations&quot; id=&quot;id163&quot; name=&quot;id163&quot;&gt;8.7&amp;nbsp;&amp;nbsp;&amp;nbsp;License Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#licensee&quot; id=&quot;id164&quot; name=&quot;id164&quot;&gt;8.7.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Licensee&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#signature&quot; id=&quot;id165&quot; name=&quot;id165&quot;&gt;8.7.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Signature&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#timestamp&quot; id=&quot;id166&quot; name=&quot;id166&quot;&gt;8.7.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Timestamp&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#type&quot; id=&quot;id167&quot; name=&quot;id167&quot;&gt;8.7.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Type&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#typedef-annotations&quot; id=&quot;id161&quot; name=&quot;id161&quot;&gt;8.8&amp;nbsp;&amp;nbsp;&amp;nbsp;Typedef Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#notypename&quot; id=&quot;id162&quot; name=&quot;id162&quot;&gt;8.8.1&amp;nbsp;&amp;nbsp;&amp;nbsp;NoTypeName&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#typedef-annotations&quot; id=&quot;id168&quot; name=&quot;id168&quot;&gt;8.8&amp;nbsp;&amp;nbsp;&amp;nbsp;Typedef Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#notypename&quot; id=&quot;id169&quot; name=&quot;id169&quot;&gt;8.8.1&amp;nbsp;&amp;nbsp;&amp;nbsp;NoTypeName&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#variable-annotations&quot; id=&quot;id163&quot; name=&quot;id163&quot;&gt;8.9&amp;nbsp;&amp;nbsp;&amp;nbsp;Variable Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id24&quot; id=&quot;id164&quot; name=&quot;id164&quot;&gt;8.9.1&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#variable-annotations&quot; id=&quot;id170&quot; name=&quot;id170&quot;&gt;8.9&amp;nbsp;&amp;nbsp;&amp;nbsp;Variable Annotations&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#id24&quot; id=&quot;id171&quot; name=&quot;id171&quot;&gt;8.9.1&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-api-for-handwritten-code&quot; id=&quot;id165&quot; name=&quot;id165&quot;&gt;9&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP API for Handwritten Code&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-api-major-nr&quot; id=&quot;id166&quot; name=&quot;id166&quot;&gt;9.1&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_API_MAJOR_NR&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-api-minor-nr&quot; id=&quot;id167&quot; name=&quot;id167&quot;&gt;9.2&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_API_MINOR_NR&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-block-threads&quot; id=&quot;id168&quot; name=&quot;id168&quot;&gt;9.3&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_BLOCK_THREADS&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-ssize-t&quot; id=&quot;id169&quot; name=&quot;id169&quot;&gt;9.4&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SSIZE_T&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-unblock-threads&quot; id=&quot;id170&quot; name=&quot;id170&quot;&gt;9.5&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_UNBLOCK_THREADS&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-version&quot; id=&quot;id171&quot; name=&quot;id171&quot;&gt;9.6&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_VERSION&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-version-str&quot; id=&quot;id172&quot; name=&quot;id172&quot;&gt;9.7&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_VERSION_STR&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipbadcatcherresult&quot; id=&quot;id173&quot; name=&quot;id173&quot;&gt;9.8&amp;nbsp;&amp;nbsp;&amp;nbsp;sipBadCatcherResult()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipbadlengthforslice&quot; id=&quot;id174&quot; name=&quot;id174&quot;&gt;9.9&amp;nbsp;&amp;nbsp;&amp;nbsp;sipBadLengthForSlice()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipbuildresult&quot; id=&quot;id175&quot; name=&quot;id175&quot;&gt;9.10&amp;nbsp;&amp;nbsp;&amp;nbsp;sipBuildResult()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipcallmethod&quot; id=&quot;id176&quot; name=&quot;id176&quot;&gt;9.11&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCallMethod()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttoinstance&quot; id=&quot;id177&quot; name=&quot;id177&quot;&gt;9.12&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCanConvertToInstance()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttomappedtype&quot; id=&quot;id178&quot; name=&quot;id178&quot;&gt;9.13&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCanConvertToMappedType()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipclassname&quot; id=&quot;id179&quot; name=&quot;id179&quot;&gt;9.14&amp;nbsp;&amp;nbsp;&amp;nbsp;sipClassName()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconnectrx&quot; id=&quot;id180&quot; name=&quot;id180&quot;&gt;9.15&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConnectRx()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromconstvoidptr&quot; id=&quot;id181&quot; name=&quot;id181&quot;&gt;9.16&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromConstVoidPtr()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromconstvoidptrandsize&quot; id=&quot;id182&quot; name=&quot;id182&quot;&gt;9.17&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromConstVoidPtrAndSize()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfrominstance&quot; id=&quot;id183&quot; name=&quot;id183&quot;&gt;9.18&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromInstance()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfrommappedtype&quot; id=&quot;id184&quot; name=&quot;id184&quot;&gt;9.19&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromMappedType()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromnamedenum&quot; id=&quot;id185&quot; name=&quot;id185&quot;&gt;9.20&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromNamedEnum()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromnewinstance&quot; id=&quot;id186&quot; name=&quot;id186&quot;&gt;9.21&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromNewInstance()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromsequenceindex&quot; id=&quot;id187&quot; name=&quot;id187&quot;&gt;9.22&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromSequenceIndex()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromsliceobject&quot; id=&quot;id188&quot; name=&quot;id188&quot;&gt;9.23&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromSliceObject()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromvoidptr&quot; id=&quot;id189&quot; name=&quot;id189&quot;&gt;9.24&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromVoidPtr()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromvoidptrandsize&quot; id=&quot;id190&quot; name=&quot;id190&quot;&gt;9.25&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromVoidPtrAndSize()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconverttocpp&quot; id=&quot;id191&quot; name=&quot;id191&quot;&gt;9.26&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToCpp()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconverttoinstance&quot; id=&quot;id192&quot; name=&quot;id192&quot;&gt;9.27&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToInstance()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconverttomappedtype&quot; id=&quot;id193&quot; name=&quot;id193&quot;&gt;9.28&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToMappedType()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconverttovoidptr&quot; id=&quot;id194&quot; name=&quot;id194&quot;&gt;9.29&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToVoidPtr()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipdisconnectrx&quot; id=&quot;id195&quot; name=&quot;id195&quot;&gt;9.30&amp;nbsp;&amp;nbsp;&amp;nbsp;sipDisconnectRx()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipemitsignal&quot; id=&quot;id196&quot; name=&quot;id196&quot;&gt;9.31&amp;nbsp;&amp;nbsp;&amp;nbsp;sipEmitSignal()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipexportsymbol&quot; id=&quot;id197&quot; name=&quot;id197&quot;&gt;9.32&amp;nbsp;&amp;nbsp;&amp;nbsp;sipExportSymbol()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipfindclass&quot; id=&quot;id198&quot; name=&quot;id198&quot;&gt;9.33&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindClass()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipfindmappedtype&quot; id=&quot;id199&quot; name=&quot;id199&quot;&gt;9.34&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindMappedType()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipfindnamedenum&quot; id=&quot;id200&quot; name=&quot;id200&quot;&gt;9.35&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindNamedEnum()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttoinstance&quot; id=&quot;id201&quot; name=&quot;id201&quot;&gt;9.36&amp;nbsp;&amp;nbsp;&amp;nbsp;sipForceConvertToInstance()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttomappedtype&quot; id=&quot;id202&quot; name=&quot;id202&quot;&gt;9.37&amp;nbsp;&amp;nbsp;&amp;nbsp;sipForceConvertToMappedType()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipfree&quot; id=&quot;id203&quot; name=&quot;id203&quot;&gt;9.38&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFree()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipgetsender&quot; id=&quot;id204&quot; name=&quot;id204&quot;&gt;9.39&amp;nbsp;&amp;nbsp;&amp;nbsp;sipGetSender()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipgetwrapper&quot; id=&quot;id205&quot; name=&quot;id205&quot;&gt;9.40&amp;nbsp;&amp;nbsp;&amp;nbsp;sipGetWrapper()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipimportsymbol&quot; id=&quot;id206&quot; name=&quot;id206&quot;&gt;9.41&amp;nbsp;&amp;nbsp;&amp;nbsp;sipImportSymbol()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipinttypeclassmap&quot; id=&quot;id207&quot; name=&quot;id207&quot;&gt;9.42&amp;nbsp;&amp;nbsp;&amp;nbsp;sipIntTypeClassMap&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipissubclassinstance&quot; id=&quot;id208&quot; name=&quot;id208&quot;&gt;9.43&amp;nbsp;&amp;nbsp;&amp;nbsp;sipIsSubClassInstance()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siplong-asunsignedlong&quot; id=&quot;id209&quot; name=&quot;id209&quot;&gt;9.44&amp;nbsp;&amp;nbsp;&amp;nbsp;sipLong_AsUnsignedLong()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipmalloc&quot; id=&quot;id210&quot; name=&quot;id210&quot;&gt;9.45&amp;nbsp;&amp;nbsp;&amp;nbsp;sipMalloc()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipmapinttoclass&quot; id=&quot;id211&quot; name=&quot;id211&quot;&gt;9.46&amp;nbsp;&amp;nbsp;&amp;nbsp;sipMapIntToClass()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipmapstringtoclass&quot; id=&quot;id212&quot; name=&quot;id212&quot;&gt;9.47&amp;nbsp;&amp;nbsp;&amp;nbsp;sipMapStringToClass()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipparseresult&quot; id=&quot;id213&quot; name=&quot;id213&quot;&gt;9.48&amp;nbsp;&amp;nbsp;&amp;nbsp;sipParseResult()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipreleaseinstance&quot; id=&quot;id214&quot; name=&quot;id214&quot;&gt;9.49&amp;nbsp;&amp;nbsp;&amp;nbsp;sipReleaseInstance()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipreleasemappedtype&quot; id=&quot;id215&quot; name=&quot;id215&quot;&gt;9.50&amp;nbsp;&amp;nbsp;&amp;nbsp;sipReleaseMappedType()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipstringtypeclassmap&quot; id=&quot;id216&quot; name=&quot;id216&quot;&gt;9.51&amp;nbsp;&amp;nbsp;&amp;nbsp;sipStringTypeClassMap&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptransfer&quot; id=&quot;id217&quot; name=&quot;id217&quot;&gt;9.52&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransfer()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptransferback&quot; id=&quot;id218&quot; name=&quot;id218&quot;&gt;9.53&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransferBack()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptransferbreak&quot; id=&quot;id219&quot; name=&quot;id219&quot;&gt;9.54&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransferBreak()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptransferto&quot; id=&quot;id220&quot; name=&quot;id220&quot;&gt;9.55&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransferTo()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipwrapper&quot; id=&quot;id221&quot; name=&quot;id221&quot;&gt;9.56&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapper&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipwrapper-check&quot; id=&quot;id222&quot; name=&quot;id222&quot;&gt;9.57&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapper_Check()&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipwrappertype&quot; id=&quot;id223&quot; name=&quot;id223&quot;&gt;9.58&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapperType&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#generated-type-convertors&quot; id=&quot;id224&quot; name=&quot;id224&quot;&gt;9.59&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Type Convertors&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#generated-type-objects&quot; id=&quot;id225&quot; name=&quot;id225&quot;&gt;9.60&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Type Objects&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#generated-named-enum-type-objects&quot; id=&quot;id226&quot; name=&quot;id226&quot;&gt;9.61&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Named Enum Type Objects&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#generated-derived-classes&quot; id=&quot;id227&quot; name=&quot;id227&quot;&gt;9.62&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Derived Classes&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#generated-exception-objects&quot; id=&quot;id228&quot; name=&quot;id228&quot;&gt;9.63&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Exception Objects&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-api-for-handwritten-code&quot; id=&quot;id172&quot; name=&quot;id172&quot;&gt;9&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP API for Handwritten Code&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-api-major-nr&quot; id=&quot;id173&quot; name=&quot;id173&quot;&gt;9.1&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_API_MAJOR_NR&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-api-minor-nr&quot; id=&quot;id174&quot; name=&quot;id174&quot;&gt;9.2&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_API_MINOR_NR&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-block-threads&quot; id=&quot;id175&quot; name=&quot;id175&quot;&gt;9.3&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_BLOCK_THREADS&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-ssize-t&quot; id=&quot;id176&quot; name=&quot;id176&quot;&gt;9.4&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SSIZE_T&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-unblock-threads&quot; id=&quot;id177&quot; name=&quot;id177&quot;&gt;9.5&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_UNBLOCK_THREADS&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-version&quot; id=&quot;id178&quot; name=&quot;id178&quot;&gt;9.6&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_VERSION&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sip-version-str&quot; id=&quot;id179&quot; name=&quot;id179&quot;&gt;9.7&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_VERSION_STR&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipbadcatcherresult&quot; id=&quot;id180&quot; name=&quot;id180&quot;&gt;9.8&amp;nbsp;&amp;nbsp;&amp;nbsp;sipBadCatcherResult()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipbadlengthforslice&quot; id=&quot;id181&quot; name=&quot;id181&quot;&gt;9.9&amp;nbsp;&amp;nbsp;&amp;nbsp;sipBadLengthForSlice()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipbuildresult&quot; id=&quot;id182&quot; name=&quot;id182&quot;&gt;9.10&amp;nbsp;&amp;nbsp;&amp;nbsp;sipBuildResult()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipcallmethod&quot; id=&quot;id183&quot; name=&quot;id183&quot;&gt;9.11&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCallMethod()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttoinstance&quot; id=&quot;id184&quot; name=&quot;id184&quot;&gt;9.12&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCanConvertToInstance()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttomappedtype&quot; id=&quot;id185&quot; name=&quot;id185&quot;&gt;9.13&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCanConvertToMappedType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttotype&quot; id=&quot;id186&quot; name=&quot;id186&quot;&gt;9.14&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCanConvertToType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipclassname&quot; id=&quot;id187&quot; name=&quot;id187&quot;&gt;9.15&amp;nbsp;&amp;nbsp;&amp;nbsp;sipClassName()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromconstvoidptr&quot; id=&quot;id188&quot; name=&quot;id188&quot;&gt;9.16&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromConstVoidPtr()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromconstvoidptrandsize&quot; id=&quot;id189&quot; name=&quot;id189&quot;&gt;9.17&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromConstVoidPtrAndSize()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromenum&quot; id=&quot;id190&quot; name=&quot;id190&quot;&gt;9.18&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromEnum()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfrominstance&quot; id=&quot;id191&quot; name=&quot;id191&quot;&gt;9.19&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromInstance()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfrommappedtype&quot; id=&quot;id192&quot; name=&quot;id192&quot;&gt;9.20&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromMappedType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromnamedenum&quot; id=&quot;id193&quot; name=&quot;id193&quot;&gt;9.21&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromNamedEnum()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromnewinstance&quot; id=&quot;id194&quot; name=&quot;id194&quot;&gt;9.22&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromNewInstance()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromnewtype&quot; id=&quot;id195&quot; name=&quot;id195&quot;&gt;9.23&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromNewType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromsequenceindex&quot; id=&quot;id196&quot; name=&quot;id196&quot;&gt;9.24&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromSequenceIndex()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromsliceobject&quot; id=&quot;id197&quot; name=&quot;id197&quot;&gt;9.25&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromSliceObject()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromtype&quot; id=&quot;id198&quot; name=&quot;id198&quot;&gt;9.26&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromvoidptr&quot; id=&quot;id199&quot; name=&quot;id199&quot;&gt;9.27&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromVoidPtr()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromvoidptrandsize&quot; id=&quot;id200&quot; name=&quot;id200&quot;&gt;9.28&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromVoidPtrAndSize()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconverttoinstance&quot; id=&quot;id201&quot; name=&quot;id201&quot;&gt;9.29&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToInstance()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconverttomappedtype&quot; id=&quot;id202&quot; name=&quot;id202&quot;&gt;9.30&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToMappedType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconverttotype&quot; id=&quot;id203&quot; name=&quot;id203&quot;&gt;9.31&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconverttovoidptr&quot; id=&quot;id204&quot; name=&quot;id204&quot;&gt;9.32&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToVoidPtr()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipexportsymbol&quot; id=&quot;id205&quot; name=&quot;id205&quot;&gt;9.33&amp;nbsp;&amp;nbsp;&amp;nbsp;sipExportSymbol()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipfindclass&quot; id=&quot;id206&quot; name=&quot;id206&quot;&gt;9.34&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindClass()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipfindmappedtype&quot; id=&quot;id207&quot; name=&quot;id207&quot;&gt;9.35&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindMappedType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipfindnamedenum&quot; id=&quot;id208&quot; name=&quot;id208&quot;&gt;9.36&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindNamedEnum()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipfindtype&quot; id=&quot;id209&quot; name=&quot;id209&quot;&gt;9.37&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttoinstance&quot; id=&quot;id210&quot; name=&quot;id210&quot;&gt;9.38&amp;nbsp;&amp;nbsp;&amp;nbsp;sipForceConvertToInstance()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttomappedtype&quot; id=&quot;id211&quot; name=&quot;id211&quot;&gt;9.39&amp;nbsp;&amp;nbsp;&amp;nbsp;sipForceConvertToMappedType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttotype&quot; id=&quot;id212&quot; name=&quot;id212&quot;&gt;9.40&amp;nbsp;&amp;nbsp;&amp;nbsp;sipForceConvertToType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipfree&quot; id=&quot;id213&quot; name=&quot;id213&quot;&gt;9.41&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFree()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipgetpyobject&quot; id=&quot;id214&quot; name=&quot;id214&quot;&gt;9.42&amp;nbsp;&amp;nbsp;&amp;nbsp;sipGetPyObject()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipgetwrapper&quot; id=&quot;id215&quot; name=&quot;id215&quot;&gt;9.43&amp;nbsp;&amp;nbsp;&amp;nbsp;sipGetWrapper()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipimportsymbol&quot; id=&quot;id216&quot; name=&quot;id216&quot;&gt;9.44&amp;nbsp;&amp;nbsp;&amp;nbsp;sipImportSymbol()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipinttypeclassmap&quot; id=&quot;id217&quot; name=&quot;id217&quot;&gt;9.45&amp;nbsp;&amp;nbsp;&amp;nbsp;sipIntTypeClassMap&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siplong-asunsignedlong&quot; id=&quot;id218&quot; name=&quot;id218&quot;&gt;9.46&amp;nbsp;&amp;nbsp;&amp;nbsp;sipLong_AsUnsignedLong()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipmalloc&quot; id=&quot;id219&quot; name=&quot;id219&quot;&gt;9.47&amp;nbsp;&amp;nbsp;&amp;nbsp;sipMalloc()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipmapinttoclass&quot; id=&quot;id220&quot; name=&quot;id220&quot;&gt;9.48&amp;nbsp;&amp;nbsp;&amp;nbsp;sipMapIntToClass()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipmapstringtoclass&quot; id=&quot;id221&quot; name=&quot;id221&quot;&gt;9.49&amp;nbsp;&amp;nbsp;&amp;nbsp;sipMapStringToClass()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipparseresult&quot; id=&quot;id222&quot; name=&quot;id222&quot;&gt;9.50&amp;nbsp;&amp;nbsp;&amp;nbsp;sipParseResult()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipregisterattributegetter&quot; id=&quot;id223&quot; name=&quot;id223&quot;&gt;9.51&amp;nbsp;&amp;nbsp;&amp;nbsp;sipRegisterAttributeGetter()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipregisterpytype&quot; id=&quot;id224&quot; name=&quot;id224&quot;&gt;9.52&amp;nbsp;&amp;nbsp;&amp;nbsp;sipRegisterPyType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipreleaseinstance&quot; id=&quot;id225&quot; name=&quot;id225&quot;&gt;9.53&amp;nbsp;&amp;nbsp;&amp;nbsp;sipReleaseInstance()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipreleasemappedtype&quot; id=&quot;id226&quot; name=&quot;id226&quot;&gt;9.54&amp;nbsp;&amp;nbsp;&amp;nbsp;sipReleaseMappedType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipreleasetype&quot; id=&quot;id227&quot; name=&quot;id227&quot;&gt;9.55&amp;nbsp;&amp;nbsp;&amp;nbsp;sipReleaseType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipresolvetypedef&quot; id=&quot;id228&quot; name=&quot;id228&quot;&gt;9.56&amp;nbsp;&amp;nbsp;&amp;nbsp;sipResolveTypedef()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipsimplewrapper&quot; id=&quot;id229&quot; name=&quot;id229&quot;&gt;9.57&amp;nbsp;&amp;nbsp;&amp;nbsp;sipSimpleWrapper&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipsimplewrapper-type&quot; id=&quot;id230&quot; name=&quot;id230&quot;&gt;9.58&amp;nbsp;&amp;nbsp;&amp;nbsp;sipSimpleWrapper_Type&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipstringtypeclassmap&quot; id=&quot;id231&quot; name=&quot;id231&quot;&gt;9.59&amp;nbsp;&amp;nbsp;&amp;nbsp;sipStringTypeClassMap&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptransferback&quot; id=&quot;id232&quot; name=&quot;id232&quot;&gt;9.60&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransferBack()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptransferbreak&quot; id=&quot;id233&quot; name=&quot;id233&quot;&gt;9.61&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransferBreak()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptransferto&quot; id=&quot;id234&quot; name=&quot;id234&quot;&gt;9.62&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransferTo()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptypeaspytypeobject&quot; id=&quot;id235&quot; name=&quot;id235&quot;&gt;9.63&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeAsPyTypeObject()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptypefrompytypeobject&quot; id=&quot;id236&quot; name=&quot;id236&quot;&gt;9.64&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeFromPyTypeObject()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptypeisclass&quot; id=&quot;id237&quot; name=&quot;id237&quot;&gt;9.65&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeIsClass()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptypeisenum&quot; id=&quot;id238&quot; name=&quot;id238&quot;&gt;9.66&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeIsEnum()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptypeismapped&quot; id=&quot;id239&quot; name=&quot;id239&quot;&gt;9.67&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeIsMapped()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptypeisnamespace&quot; id=&quot;id240&quot; name=&quot;id240&quot;&gt;9.68&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeIsNamespace()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptypename&quot; id=&quot;id241&quot; name=&quot;id241&quot;&gt;9.69&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeName()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#siptypescope&quot; id=&quot;id242&quot; name=&quot;id242&quot;&gt;9.70&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeScope()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipvoidptr-type&quot; id=&quot;id243&quot; name=&quot;id243&quot;&gt;9.71&amp;nbsp;&amp;nbsp;&amp;nbsp;sipVoidPtr_Type&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipwrapper&quot; id=&quot;id244&quot; name=&quot;id244&quot;&gt;9.72&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapper&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipwrapper-check&quot; id=&quot;id245&quot; name=&quot;id245&quot;&gt;9.73&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapper_Check()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipwrapper-type&quot; id=&quot;id246&quot; name=&quot;id246&quot;&gt;9.74&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapper_Type&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipwrappertype&quot; id=&quot;id247&quot; name=&quot;id247&quot;&gt;9.75&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapperType&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipwrappertype-type&quot; id=&quot;id248&quot; name=&quot;id248&quot;&gt;9.76&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapperType_Type&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#generated-type-structures&quot; id=&quot;id249&quot; name=&quot;id249&quot;&gt;9.77&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Type Structures&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#generated-type-objects&quot; id=&quot;id250&quot; name=&quot;id250&quot;&gt;9.78&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Type Objects&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#generated-named-enum-type-objects&quot; id=&quot;id251&quot; name=&quot;id251&quot;&gt;9.79&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Named Enum Type Objects&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#generated-derived-classes&quot; id=&quot;id252&quot; name=&quot;id252&quot;&gt;9.80&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Derived Classes&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#generated-exception-objects&quot; id=&quot;id253&quot; name=&quot;id253&quot;&gt;9.81&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Exception Objects&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#using-the-sip-api-when-embedding&quot; id=&quot;id229&quot; name=&quot;id229&quot;&gt;10&amp;nbsp;&amp;nbsp;&amp;nbsp;Using the SIP API when Embedding&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#using-the-sip-module-in-applications&quot; id=&quot;id230&quot; name=&quot;id230&quot;&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;Using the SIP Module in Applications&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#the-sip-build-system&quot; id=&quot;id231&quot; name=&quot;id231&quot;&gt;12&amp;nbsp;&amp;nbsp;&amp;nbsp;The SIP Build System&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconfig-functions&quot; id=&quot;id232&quot; name=&quot;id232&quot;&gt;12.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipconfig&lt;/span&gt;&lt;/tt&gt; Functions&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconfig-classes&quot; id=&quot;id233&quot; name=&quot;id233&quot;&gt;12.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipconfig&lt;/span&gt;&lt;/tt&gt; Classes&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#using-the-sip-api-when-embedding&quot; id=&quot;id254&quot; name=&quot;id254&quot;&gt;10&amp;nbsp;&amp;nbsp;&amp;nbsp;Using the SIP API when Embedding&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#using-the-sip-module-in-applications&quot; id=&quot;id255&quot; name=&quot;id255&quot;&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;Using the SIP Module in Applications&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#the-sip-build-system&quot; id=&quot;id256&quot; name=&quot;id256&quot;&gt;12&amp;nbsp;&amp;nbsp;&amp;nbsp;The SIP Build System&lt;/a&gt;&lt;ul class=&quot;auto-toc&quot;&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconfig-functions&quot; id=&quot;id257&quot; name=&quot;id257&quot;&gt;12.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipconfig&lt;/span&gt;&lt;/tt&gt; Functions&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconfig-classes&quot; id=&quot;id258&quot; name=&quot;id258&quot;&gt;12.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipconfig&lt;/span&gt;&lt;/tt&gt; Classes&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#building-your-extension-with-distutils&quot; id=&quot;id234&quot; name=&quot;id234&quot;&gt;13&amp;nbsp;&amp;nbsp;&amp;nbsp;Building Your Extension with distutils&lt;/a&gt;&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#builtin-modules-and-custom-interpreters&quot; id=&quot;id235&quot; name=&quot;id235&quot;&gt;14&amp;nbsp;&amp;nbsp;&amp;nbsp;Builtin Modules and Custom Interpreters&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#building-your-extension-with-distutils&quot; id=&quot;id259&quot; name=&quot;id259&quot;&gt;13&amp;nbsp;&amp;nbsp;&amp;nbsp;Building Your Extension with distutils&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#builtin-modules-and-custom-interpreters&quot; id=&quot;id260&quot; name=&quot;id260&quot;&gt;14&amp;nbsp;&amp;nbsp;&amp;nbsp;Builtin Modules and Custom Interpreters&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
 &lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id25&quot; id=&quot;introduction&quot; name=&quot;introduction&quot;&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;Introduction&lt;/a&gt;&lt;/h1&gt;
-&lt;p&gt;This is the reference guide for SIP 4.7.8-snapshot-20081102.  SIP is a tool for
+&lt;p&gt;This is the reference guide for SIP 4.8-snapshot-20090225.  SIP is a tool for
 automatically generating &lt;a class=&quot;reference&quot; href=&quot;http://www.python.org&quot;&gt;Python&lt;/a&gt; bindings for C and
 C++ libraries.  SIP was originally developed in 1998 for
 &lt;a class=&quot;reference&quot; href=&quot;http://www.riverbankcomputing.com/software/pyqt/&quot;&gt;PyQt&lt;/a&gt; - the Python
@@ -613,6 +638,8 @@ data types that are automatically invoked&lt;/li&gt;
 &lt;li&gt;the ability to automatically exploit any available run time type
 information to ensure that the class of a Python instance object matches
 the class of the corresponding C++ instance&lt;/li&gt;
+&lt;li&gt;the ability to change the type and meta-type of the Python object used to
+wrap a C/C++ data type&lt;/li&gt;
 &lt;li&gt;full support of the Python global interpreter lock, including the ability
 to specify that a C++ function of method may block, therefore allowing
 the lock to be released and other Python threads to run&lt;/li&gt;
@@ -685,7 +712,76 @@ new Python signals, and allows any Python callable object to be used as a slot.&lt;
 &lt;div class=&quot;section&quot;&gt;
 &lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id30&quot; id=&quot;potential-incompatibilities-with-earlier-versions&quot; name=&quot;potential-incompatibilities-with-earlier-versions&quot;&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;Potential Incompatibilities with Earlier Versions&lt;/a&gt;&lt;/h1&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id31&quot; id=&quot;sip-v4-7-8&quot; name=&quot;sip-v4-7-8&quot;&gt;2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.7.8&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id31&quot; id=&quot;sip-v4-8&quot; name=&quot;sip-v4-8&quot;&gt;2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.8&lt;/a&gt;&lt;/h2&gt;
+&lt;p&gt;Prior to this version the &lt;a class=&quot;reference&quot; href=&quot;#sipwrapper&quot;&gt;sipWrapper&lt;/a&gt; structure had a member called &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;user&lt;/span&gt;&lt;/tt&gt;
+which is available for handwritten code to use.  From this version &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;user&lt;/span&gt;&lt;/tt&gt; is
+a member of the &lt;a class=&quot;reference&quot; href=&quot;#sipsimplewrapper&quot;&gt;sipSimpleWrapper&lt;/a&gt; structure.  &lt;a class=&quot;reference&quot; href=&quot;#sipwrapper&quot;&gt;sipWrapper&lt;/a&gt; pointers can be
+safely cast to &lt;a class=&quot;reference&quot; href=&quot;#sipsimplewrapper&quot;&gt;sipSimpleWrapper&lt;/a&gt; pointers, so if your code does something
+like:&lt;/p&gt;
+&lt;pre class=&quot;literal-block&quot;&gt;
+((sipWrapper *)obj)-&amp;gt;user = an_object_reference;
+&lt;/pre&gt;
+&lt;p&gt;then you just need to change it to:&lt;/p&gt;
+&lt;pre class=&quot;literal-block&quot;&gt;
+((sipSimpleWrapper *)obj)-&amp;gt;user = an_object_reference;
+&lt;/pre&gt;
+&lt;p&gt;The generated class names are now &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; rather than &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;p&gt;The following deprecated parts of the API have been removed.&lt;/p&gt;
+&lt;blockquote&gt;
+&lt;ul class=&quot;simple&quot;&gt;
+&lt;li&gt;The &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;a&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;A&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;M&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;N&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;O&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;P&lt;/span&gt;&lt;/tt&gt; and &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;T&lt;/span&gt;&lt;/tt&gt; format characters
+from &lt;a class=&quot;reference&quot; href=&quot;#sipbuildresult&quot;&gt;sipBuildResult()&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;#sipcallmethod&quot;&gt;sipCallMethod()&lt;/a&gt;.&lt;/li&gt;
+&lt;li&gt;The &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;a&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;A&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;L&lt;/span&gt;&lt;/tt&gt; and &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;M&lt;/span&gt;&lt;/tt&gt; format characters from
+&lt;a class=&quot;reference&quot; href=&quot;#sipparseresult&quot;&gt;sipParseResult()&lt;/a&gt;.&lt;/li&gt;
+&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipConvertToCpp()&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipIsSubClassInstance()&lt;/span&gt;&lt;/tt&gt; and &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipTransfer()&lt;/span&gt;&lt;/tt&gt;.&lt;/li&gt;
+&lt;li&gt;The old-style generated type convertors.&lt;/li&gt;
+&lt;li&gt;The &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;transfer()&lt;/span&gt;&lt;/tt&gt; function of the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip&lt;/span&gt;&lt;/tt&gt; module.&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/blockquote&gt;
+&lt;p&gt;In addition the deprecated &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;-a&lt;/span&gt;&lt;/tt&gt; command line option to &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;configure.py&lt;/span&gt;&lt;/tt&gt; has
+been removed.&lt;/p&gt;
+&lt;p&gt;The following parts of the API are now deprecated (but still supported).&lt;/p&gt;
+&lt;blockquote&gt;
+&lt;ul class=&quot;simple&quot;&gt;
+&lt;li&gt;The &lt;a class=&quot;reference&quot; href=&quot;#generated-type-objects&quot;&gt;Generated Type Objects&lt;/a&gt;.&lt;/li&gt;
+&lt;li&gt;The &lt;a class=&quot;reference&quot; href=&quot;#generated-named-enum-type-objects&quot;&gt;Generated Named Enum Type Objects&lt;/a&gt;.&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfrominstance&quot;&gt;sipConvertFromInstance()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfrommappedtype&quot;&gt;sipConvertFromMappedType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromnamedenum&quot;&gt;sipConvertFromNamedEnum()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromnewinstance&quot;&gt;sipConvertFromNewInstance()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttoinstance&quot;&gt;sipCanConvertToInstance()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttomappedtype&quot;&gt;sipCanConvertToMappedType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconverttoinstance&quot;&gt;sipConvertToInstance()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconverttomappedtype&quot;&gt;sipConvertToMappedType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttoinstance&quot;&gt;sipForceConvertToInstance()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttomappedtype&quot;&gt;sipForceConvertToMappedType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipclassname&quot;&gt;sipClassName()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipfindclass&quot;&gt;sipFindClass()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipfindnamedenum&quot;&gt;sipFindNamedEnum()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipfindmappedtype&quot;&gt;sipFindMappedType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipgetwrapper&quot;&gt;sipGetWrapper()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipreleaseinstance&quot;&gt;sipReleaseInstance()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipreleasemappedtype&quot;&gt;sipReleaseMappedType()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipwrapper-check&quot;&gt;sipWrapper_Check()&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;The &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;B&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;C&lt;/span&gt;&lt;/tt&gt; and &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;E&lt;/span&gt;&lt;/tt&gt; format characters of &lt;a class=&quot;reference&quot; href=&quot;#sipbuildresult&quot;&gt;sipBuildResult()&lt;/a&gt; and
+&lt;a class=&quot;reference&quot; href=&quot;#sipcallmethod&quot;&gt;sipCallMethod()&lt;/a&gt;.&lt;/li&gt;
+&lt;li&gt;The &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;C&lt;/span&gt;&lt;/tt&gt; and &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;E&lt;/span&gt;&lt;/tt&gt; format character of &lt;a class=&quot;reference&quot; href=&quot;#sipparseresult&quot;&gt;sipParseResult()&lt;/a&gt;.&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/blockquote&gt;
+&lt;p&gt;The following PyQt-specific support functions have been removed.&lt;/p&gt;
+&lt;blockquote&gt;
+&lt;ul class=&quot;simple&quot;&gt;
+&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipConnectRx()&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
+&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipDisconnectRx()&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
+&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipEmitSlot()&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
+&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipGetSender()&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/blockquote&gt;
+&lt;p&gt;The handling of virtual methods in &lt;a class=&quot;reference&quot; href=&quot;#methodcode&quot;&gt;%MethodCode&lt;/a&gt; has been simplified slightly
+and the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipProtectVirt_*()&lt;/span&gt;&lt;/tt&gt; functions are no longer generated.&lt;/p&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id32&quot; id=&quot;sip-v4-7-8&quot; name=&quot;sip-v4-7-8&quot;&gt;2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.7.8&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;This version allows a Python int object to be passed whenever an enum is
 expected.  This can mean that two signatures that were different with prior
 versions are now the same as far as Python is concerned.  The &lt;a class=&quot;reference&quot; href=&quot;#constrained&quot;&gt;Constrained&lt;/a&gt;
@@ -693,7 +789,7 @@ annotation can now be applied to an enum argument to revert to the earlier
 behaviour.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id32&quot; id=&quot;sip-v4-7-3&quot; name=&quot;sip-v4-7-3&quot;&gt;2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.7.3&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id33&quot; id=&quot;sip-v4-7-3&quot; name=&quot;sip-v4-7-3&quot;&gt;2.3&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.7.3&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;Prior to this version SIP did not automatically generate missing complementary
 comparison operators.  Typically this was worked around by adding them
 explicitly to the .sip files, even though they weren't implemented in C++ and
@@ -705,17 +801,15 @@ operators.  If you have added such operators explicitly then you should remove
 them or make them dependent on the particular version of SIP.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id33&quot; id=&quot;sip-v4-4&quot; name=&quot;sip-v4-4&quot;&gt;2.3&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.4&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id34&quot; id=&quot;sip-v4-4&quot; name=&quot;sip-v4-4&quot;&gt;2.4&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP v4.4&lt;/a&gt;&lt;/h2&gt;
 &lt;blockquote&gt;
 &lt;ul class=&quot;simple&quot;&gt;
 &lt;li&gt;The &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;SIP_BUILD&lt;/span&gt;&lt;/tt&gt; C preprocessor symbol has been removed.&lt;/li&gt;
-&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#sipconverttocpp&quot;&gt;sipConvertToCpp()&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#sipissubclassinstance&quot;&gt;sipIsSubClassInstance()&lt;/a&gt; and the old &lt;a class=&quot;reference&quot; href=&quot;#generated-type-convertors&quot;&gt;Generated
-Type Convertors&lt;/a&gt; have been deprecated.  The functions
-&lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttoinstance&quot;&gt;sipCanConvertToInstance()&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#sipconverttoinstance&quot;&gt;sipConvertToInstance()&lt;/a&gt;,
-&lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttoinstance&quot;&gt;sipForceConvertToInstance()&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#sipconvertfrominstance&quot;&gt;sipConvertFromInstance()&lt;/a&gt;,
-&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromnewinstance&quot;&gt;sipConvertFromNewInstance()&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttomappedtype&quot;&gt;sipCanConvertToMappedType()&lt;/a&gt;,
-&lt;a class=&quot;reference&quot; href=&quot;#sipconverttomappedtype&quot;&gt;sipConvertToMappedType()&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttomappedtype&quot;&gt;sipForceConvertToMappedType()&lt;/a&gt; and
-&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfrommappedtype&quot;&gt;sipConvertFromMappedType()&lt;/a&gt; should be used instead.  Handwritten
+&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipConvertToCpp()&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipIsSubClassInstance()&lt;/span&gt;&lt;/tt&gt; and the old-style
+generated type convertors have been deprecated.  The functions
+&lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttotype&quot;&gt;sipCanConvertToType()&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#sipconverttotype&quot;&gt;sipConvertToType()&lt;/a&gt;,
+&lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttotype&quot;&gt;sipForceConvertToType()&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromtype&quot;&gt;sipConvertFromType()&lt;/a&gt; and
+&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromnewtype&quot;&gt;sipConvertFromNewType()&lt;/a&gt; should be used instead.  Handwritten
 &lt;a class=&quot;reference&quot; href=&quot;#convertfromtypecode&quot;&gt;%ConvertFromTypeCode&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;#converttotypecode&quot;&gt;%ConvertToTypeCode&lt;/a&gt; now has the
 responsibility for using these to implement the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Transfer&lt;/span&gt;&lt;/tt&gt; and
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;TransferBack&lt;/span&gt;&lt;/tt&gt; annotations.&lt;/li&gt;
@@ -724,16 +818,16 @@ responsibility for using these to implement the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;sp
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id34&quot; id=&quot;installing-sip&quot; name=&quot;installing-sip&quot;&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;Installing SIP&lt;/a&gt;&lt;/h1&gt;
+&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id35&quot; id=&quot;installing-sip&quot; name=&quot;installing-sip&quot;&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;Installing SIP&lt;/a&gt;&lt;/h1&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id35&quot; id=&quot;downloading-sip&quot; name=&quot;downloading-sip&quot;&gt;3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Downloading SIP&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id36&quot; id=&quot;downloading-sip&quot; name=&quot;downloading-sip&quot;&gt;3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Downloading SIP&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;You can get the latest release of the SIP source code from
 &lt;a class=&quot;reference&quot; href=&quot;http://www.riverbankcomputing.com/software/sip/download&quot;&gt;http://www.riverbankcomputing.com/software/sip/download&lt;/a&gt;.&lt;/p&gt;
 &lt;p&gt;SIP is also included with all of the major Linux distributions.  However, it
 may be a version or two out of date.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id36&quot; id=&quot;configuring-sip&quot; name=&quot;configuring-sip&quot;&gt;3.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Configuring SIP&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id37&quot; id=&quot;configuring-sip&quot; name=&quot;configuring-sip&quot;&gt;3.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Configuring SIP&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;After unpacking the source package (either a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;.tar.gz&lt;/span&gt;&lt;/tt&gt; or a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;.zip&lt;/span&gt;&lt;/tt&gt; file
 depending on your platform) you should then check for any &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;README&lt;/span&gt;&lt;/tt&gt; files
 that relate to your platform.&lt;/p&gt;
@@ -758,13 +852,6 @@ interpreter for which you wish SIP to generate bindings for.&lt;/p&gt;
 &lt;kbd&gt;&lt;span class=&quot;option&quot;&gt;-h&lt;/span&gt;&lt;/kbd&gt;&lt;/td&gt;
 &lt;td&gt;Display a help message.&lt;/td&gt;&lt;/tr&gt;
 &lt;tr&gt;&lt;td class=&quot;option-group&quot;&gt;
-&lt;kbd&gt;&lt;span class=&quot;option&quot;&gt;-a&lt;/span&gt;&lt;/kbd&gt;&lt;/td&gt;
-&lt;td&gt;Export all symbols in any SIP generated module and the SIP module
-itself.  This was the default behaviour of SIP prior to v4.2.
-Normally only a module's inititialisation function is exported.  This
-option is deprecated as the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;ModuleMakefile&lt;/span&gt;&lt;/tt&gt; class of &lt;a class=&quot;reference&quot; href=&quot;#the-sip-build-system&quot;&gt;The SIP Build
-System&lt;/a&gt; allows this to be specified on a per module basis.&lt;/td&gt;&lt;/tr&gt;
-&lt;tr&gt;&lt;td class=&quot;option-group&quot;&gt;
 &lt;kbd&gt;&lt;span class=&quot;option&quot;&gt;-b &lt;var&gt;dir&lt;/var&gt;&lt;/span&gt;&lt;/kbd&gt;&lt;/td&gt;
 &lt;td&gt;The SIP code generator will be installed in the directory &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;dir&lt;/span&gt;&lt;/tt&gt;.&lt;/td&gt;&lt;/tr&gt;
 &lt;tr&gt;&lt;td class=&quot;option-group&quot;&gt;
@@ -819,7 +906,7 @@ This defines each &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;name&lt;/span&gt;&lt;/tt
 give you a good idea of how the build system uses the different options.  It is
 covered in detail in &lt;a class=&quot;reference&quot; href=&quot;#the-sip-build-system&quot;&gt;The SIP Build System&lt;/a&gt;.&lt;/p&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id37&quot; id=&quot;configuring-sip-using-mingw&quot; name=&quot;configuring-sip-using-mingw&quot;&gt;3.2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Configuring SIP Using MinGW&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id38&quot; id=&quot;configuring-sip-using-mingw&quot; name=&quot;configuring-sip-using-mingw&quot;&gt;3.2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Configuring SIP Using MinGW&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;SIP, and the modules it generates, can be built with MinGW, the Windows port of
 GCC.  You must use the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;-p&lt;/span&gt;&lt;/tt&gt; command line option to specify the correct
 platform.  For example:&lt;/p&gt;
@@ -828,7 +915,7 @@ c:\python26\python configure.py -p win32-g++
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id38&quot; id=&quot;configuring-sip-using-the-borland-c-compiler&quot; name=&quot;configuring-sip-using-the-borland-c-compiler&quot;&gt;3.2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Configuring SIP Using the Borland C++ Compiler&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id39&quot; id=&quot;configuring-sip-using-the-borland-c-compiler&quot; name=&quot;configuring-sip-using-the-borland-c-compiler&quot;&gt;3.2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Configuring SIP Using the Borland C++ Compiler&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;SIP, and the modules it generates, can be built with the free Borland C++
 compiler.  You must use the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;-p&lt;/span&gt;&lt;/tt&gt; command line option to specify the correct
 platform.  For example:&lt;/p&gt;
@@ -845,7 +932,7 @@ coff2omf python26.lib python26_bcpp.lib
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id39&quot; id=&quot;building-sip&quot; name=&quot;building-sip&quot;&gt;3.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Building SIP&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id40&quot; id=&quot;building-sip&quot; name=&quot;building-sip&quot;&gt;3.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Building SIP&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;The next step is to build SIP by running your platform's &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;make&lt;/span&gt;&lt;/tt&gt; command.  For
 example:&lt;/p&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
@@ -860,14 +947,14 @@ make install
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id40&quot; id=&quot;using-sip&quot; name=&quot;using-sip&quot;&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;Using SIP&lt;/a&gt;&lt;/h1&gt;
+&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id41&quot; id=&quot;using-sip&quot; name=&quot;using-sip&quot;&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;Using SIP&lt;/a&gt;&lt;/h1&gt;
 &lt;p&gt;Bindings are generated by the SIP code generator from a number of specification
 files, typically with a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;.sip&lt;/span&gt;&lt;/tt&gt; extension.  Specification files look very
 similar to C and C++ header files, but often with additional information (in
 the form of a &lt;em&gt;directive&lt;/em&gt; or an &lt;em&gt;annotation&lt;/em&gt;) and code so that the bindings
 generated can be finely tuned.&lt;/p&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id41&quot; id=&quot;a-simple-c-example&quot; name=&quot;a-simple-c-example&quot;&gt;4.1&amp;nbsp;&amp;nbsp;&amp;nbsp;A Simple C++ Example&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id42&quot; id=&quot;a-simple-c-example&quot; name=&quot;a-simple-c-example&quot;&gt;4.1&amp;nbsp;&amp;nbsp;&amp;nbsp;A Simple C++ Example&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;We start with a simple example.  Let's say you have a (fictional) C++ library
 that implements a single class called &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Word&lt;/span&gt;&lt;/tt&gt;.  The class has one constructor
 that takes a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;\0&lt;/span&gt;&lt;/tt&gt; terminated character string as its single argument.  The
@@ -1001,7 +1088,7 @@ supplied code is placed by SIP in the generated code.&lt;/td&gt;&lt;/tr&gt;
 &lt;/table&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id42&quot; id=&quot;id7&quot; name=&quot;id7&quot;&gt;4.2&amp;nbsp;&amp;nbsp;&amp;nbsp;A Simple C Example&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id43&quot; id=&quot;id7&quot; name=&quot;id7&quot;&gt;4.2&amp;nbsp;&amp;nbsp;&amp;nbsp;A Simple C Example&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;Let's now look at a very similar example of wrapping a fictional C library:&lt;/p&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 /* Define the interface to the word library. */
@@ -1047,7 +1134,7 @@ owned by Python.&lt;/li&gt;
 be used for this example without change.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id43&quot; id=&quot;a-more-complex-c-example&quot; name=&quot;a-more-complex-c-example&quot;&gt;4.3&amp;nbsp;&amp;nbsp;&amp;nbsp;A More Complex C++ Example&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id44&quot; id=&quot;a-more-complex-c-example&quot; name=&quot;a-more-complex-c-example&quot;&gt;4.3&amp;nbsp;&amp;nbsp;&amp;nbsp;A More Complex C++ Example&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;In this last example we will wrap a fictional C++ library that contains a class
 that is derived from a Qt class.  This will demonstrate how SIP allows a class
 hierarchy to be split across multiple Python extension modules, and will
@@ -1297,7 +1384,7 @@ not mutually exclusive, i.e. any number may be valid at a time.&lt;/td&gt;&lt;/tr&gt;
 &lt;/table&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id44&quot; id=&quot;ownership-of-objects&quot; name=&quot;ownership-of-objects&quot;&gt;4.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Ownership of Objects&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id45&quot; id=&quot;ownership-of-objects&quot; name=&quot;ownership-of-objects&quot;&gt;4.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Ownership of Objects&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;When a C++ instance is wrapped a corresponding Python object is created.  The
 Python object behaves as you would expect in regard to garbage collection - it
 is garbage collected when its reference count reaches zero.  What then happens
@@ -1322,7 +1409,52 @@ heap using the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;free()&lt;/span&gt;&lt;/tt&gt;
 &lt;p&gt;See also &lt;a class=&quot;reference&quot; href=&quot;#siptransferto&quot;&gt;sipTransferTo()&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#siptransferback&quot;&gt;sipTransferBack()&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;#siptransferbreak&quot;&gt;sipTransferBreak()&lt;/a&gt;.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id45&quot; id=&quot;support-for-python-s-buffer-interface&quot; name=&quot;support-for-python-s-buffer-interface&quot;&gt;4.5&amp;nbsp;&amp;nbsp;&amp;nbsp;Support for Python's Buffer Interface&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id46&quot; id=&quot;types-and-meta-types&quot; name=&quot;types-and-meta-types&quot;&gt;4.5&amp;nbsp;&amp;nbsp;&amp;nbsp;Types and Meta-types&lt;/a&gt;&lt;/h2&gt;
+&lt;p&gt;Every Python object (with the exception of the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;object&lt;/span&gt;&lt;/tt&gt; object itself) has a
+meta-type and at least one super-type.  By default an object's meta-type is the
+meta-type of its first super-type.&lt;/p&gt;
+&lt;p&gt;SIP implements two super-types, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.simplewrapper&lt;/span&gt;&lt;/tt&gt; and &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.wrapper&lt;/span&gt;&lt;/tt&gt;, and
+a meta-type, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.wrappertype&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;p&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.simplewrapper&lt;/span&gt;&lt;/tt&gt; is the super-type of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.wrapper&lt;/span&gt;&lt;/tt&gt;.  The super-type of
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.simplewrapper&lt;/span&gt;&lt;/tt&gt; is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;object&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;p&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.wrappertype&lt;/span&gt;&lt;/tt&gt; is the meta-type of both &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.simplewrapper&lt;/span&gt;&lt;/tt&gt; and
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.wrapper&lt;/span&gt;&lt;/tt&gt;.  The super-type of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.wrappertype&lt;/span&gt;&lt;/tt&gt; is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;type&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;p&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.wrapper&lt;/span&gt;&lt;/tt&gt; supports the concept of object ownership described in
+&lt;a class=&quot;reference&quot; href=&quot;#ownership-of-objects&quot;&gt;Ownership of Objects&lt;/a&gt; and, by default, is the super-type of all the types
+that SIP generates.&lt;/p&gt;
+&lt;p&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.simplewrapper&lt;/span&gt;&lt;/tt&gt; does not support the concept of object ownership but SIP
+generated types that are sub-classed from it have Python objects that take less
+memory.&lt;/p&gt;
+&lt;p&gt;SIP allows a class's meta-type and super-type to be explicitly specified using
+the &lt;a class=&quot;reference&quot; href=&quot;#metatype&quot;&gt;Metatype&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;#supertype&quot;&gt;Supertype&lt;/a&gt; class annotations.&lt;/p&gt;
+&lt;p&gt;SIP also allows the default meta-type and super-type to be changed for a module
+using the &lt;a class=&quot;reference&quot; href=&quot;#defaultmetatype&quot;&gt;%DefaultMetatype&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;#defaultsupertype&quot;&gt;%DefaultSupertype&lt;/a&gt; directives.&lt;/p&gt;
+&lt;p&gt;If you want to use your own meta-type or super-type then they must be
+sub-classed from one of the SIP provided types.  Your types must be registered
+using &lt;a class=&quot;reference&quot; href=&quot;#sipregisterpytype&quot;&gt;sipRegisterPyType()&lt;/a&gt;.  This is normally done in code specified using
+the &lt;a class=&quot;reference&quot; href=&quot;#initialisationcode&quot;&gt;%InitialisationCode&lt;/a&gt; directive.&lt;/p&gt;
+&lt;p&gt;As an example, PyQt4 uses &lt;a class=&quot;reference&quot; href=&quot;#defaultmetatype&quot;&gt;%DefaultMetatype&lt;/a&gt; to specify a new meta-type that
+handles the interaction with Qt's own meta-type system.  It also uses
+&lt;a class=&quot;reference&quot; href=&quot;#defaultsupertype&quot;&gt;%DefaultSupertype&lt;/a&gt; to specify that the smaller &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.simplewrapper&lt;/span&gt;&lt;/tt&gt;
+super-type is normally used.  Finally it uses &lt;a class=&quot;reference&quot; href=&quot;#supertype&quot;&gt;Supertype&lt;/a&gt; as an annotation of
+the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt;&lt;/tt&gt; class to override the default and use &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.wrapper&lt;/span&gt;&lt;/tt&gt; as the
+super-type so that the parent/child relationships of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt;&lt;/tt&gt; instances are
+properly maintained.&lt;/p&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id47&quot; id=&quot;lazy-type-attributes&quot; name=&quot;lazy-type-attributes&quot;&gt;4.6&amp;nbsp;&amp;nbsp;&amp;nbsp;Lazy Type Attributes&lt;/a&gt;&lt;/h2&gt;
+&lt;p&gt;Instead of populating a wrapped type's dictionary with its attributes (or
+descriptors for those attributes) SIP only creates objects for those attributes
+when they are actually needed.  This is done to reduce the memory footprint and
+start up time when used to wrap large libraries with hundreds of classes and
+tens of thousands of attributes.&lt;/p&gt;
+&lt;p&gt;SIP allows you to extend the handling of lazy attributes to your own attribute
+types by allowing you to register an attribute getter handler (using
+&lt;a class=&quot;reference&quot; href=&quot;#sipregisterattributegetter&quot;&gt;sipRegisterAttributeGetter()&lt;/a&gt;).  This will be called just before a type's
+dictionary is accessed for the first time.&lt;/p&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id48&quot; id=&quot;support-for-python-s-buffer-interface&quot; name=&quot;support-for-python-s-buffer-interface&quot;&gt;4.7&amp;nbsp;&amp;nbsp;&amp;nbsp;Support for Python's Buffer Interface&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;SIP supports Python's buffer interface in that whenever C/C++ requires a
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt;&lt;/tt&gt; or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; type then any Python type that supports the buffer
 interface (including ordinary Python strings) can be used.&lt;/p&gt;
@@ -1330,7 +1462,7 @@ interface (including ordinary Python strings) can be used.&lt;/p&gt;
 ignored.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id46&quot; id=&quot;support-for-wide-characters&quot; name=&quot;support-for-wide-characters&quot;&gt;4.6&amp;nbsp;&amp;nbsp;&amp;nbsp;Support for Wide Characters&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id49&quot; id=&quot;support-for-wide-characters&quot; name=&quot;support-for-wide-characters&quot;&gt;4.8&amp;nbsp;&amp;nbsp;&amp;nbsp;Support for Wide Characters&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;SIP v4.6 introduced support for wide characters (i.e. the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;wchar_t&lt;/span&gt;&lt;/tt&gt; type).
 Python's C API includes support for converting between unicode objects and wide
 character strings and arrays.  When converting from a unicode object to wide
@@ -1352,7 +1484,7 @@ then SIP does not first free the instance's current string or array.&lt;/li&gt;
 &lt;/blockquote&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id47&quot; id=&quot;the-python-global-interpreter-lock&quot; name=&quot;the-python-global-interpreter-lock&quot;&gt;4.7&amp;nbsp;&amp;nbsp;&amp;nbsp;The Python Global Interpreter Lock&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id50&quot; id=&quot;the-python-global-interpreter-lock&quot; name=&quot;the-python-global-interpreter-lock&quot;&gt;4.9&amp;nbsp;&amp;nbsp;&amp;nbsp;The Python Global Interpreter Lock&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;Python's Global Interpretor Lock (GIL) must be acquired before calls can be
 made to the Python API.  It should also be released when a potentially
 blocking call to C/C++ library is made in order to allow other Python threads
@@ -1371,7 +1503,7 @@ behaviour when required.&lt;/p&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id48&quot; id=&quot;the-sip-command-line&quot; name=&quot;the-sip-command-line&quot;&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;The SIP Command Line&lt;/a&gt;&lt;/h1&gt;
+&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id51&quot; id=&quot;the-sip-command-line&quot; name=&quot;the-sip-command-line&quot;&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;The SIP Command Line&lt;/a&gt;&lt;/h1&gt;
 &lt;p&gt;The syntax of the SIP command line is:&lt;/p&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 sip [options] [specification]
@@ -1465,7 +1597,7 @@ messages are disabled.&lt;/td&gt;&lt;/tr&gt;
 &lt;/table&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id49&quot; id=&quot;sip-specification-files&quot; name=&quot;sip-specification-files&quot;&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP Specification Files&lt;/a&gt;&lt;/h1&gt;
+&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id52&quot; id=&quot;sip-specification-files&quot; name=&quot;sip-specification-files&quot;&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP Specification Files&lt;/a&gt;&lt;/h1&gt;
 &lt;p&gt;A SIP specification consists of some C/C++ type and function declarations and
 some directives.  The declarations may contain annotations which provide SIP
 with additional information that cannot be expressed in C/C++.  SIP does not
@@ -1506,7 +1638,7 @@ public:
 };
 &lt;/pre&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id50&quot; id=&quot;syntax-definition&quot; name=&quot;syntax-definition&quot;&gt;6.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Syntax Definition&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id53&quot; id=&quot;syntax-definition&quot; name=&quot;syntax-definition&quot;&gt;6.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Syntax Definition&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;The following is a semi-formal description of the syntax of a specification
 file.&lt;/p&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
@@ -1515,17 +1647,14 @@ file.&lt;/p&gt;
 &lt;em&gt;module-statement&lt;/em&gt; ::= [&lt;em&gt;module-directive&lt;/em&gt; | &lt;em&gt;statement&lt;/em&gt;]
 
 &lt;em&gt;module-directive&lt;/em&gt; ::= [&lt;a class=&quot;reference&quot; href=&quot;#cmodule&quot;&gt;%CModule&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#compositemodule&quot;&gt;%CompositeModule&lt;/a&gt; |
-        &lt;a class=&quot;reference&quot; href=&quot;#consolidatedmodule&quot;&gt;%ConsolidatedModule&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#copying&quot;&gt;%Copying&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#doc&quot;&gt;%Doc&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#exporteddoc&quot;&gt;%ExportedDoc&lt;/a&gt; |
+        &lt;a class=&quot;reference&quot; href=&quot;#consolidatedmodule&quot;&gt;%ConsolidatedModule&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#copying&quot;&gt;%Copying&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#defaultmetatype&quot;&gt;%DefaultMetatype&lt;/a&gt; |
+        &lt;a class=&quot;reference&quot; href=&quot;#defaultsupertype&quot;&gt;%DefaultSupertype&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#doc&quot;&gt;%Doc&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#exporteddoc&quot;&gt;%ExportedDoc&lt;/a&gt; |
         &lt;a class=&quot;reference&quot; href=&quot;#exportedheadercode&quot;&gt;%ExportedHeaderCode&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#feature&quot;&gt;%Feature&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#import&quot;&gt;%Import&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#include&quot;&gt;%Include&lt;/a&gt; |
-        &lt;a class=&quot;reference&quot; href=&quot;#id14&quot;&gt;%License&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#mappedtype&quot;&gt;%MappedType&lt;/a&gt; | &lt;em&gt;mapped-type-template&lt;/em&gt; |
-        &lt;a class=&quot;reference&quot; href=&quot;#module&quot;&gt;%Module&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#modulecode&quot;&gt;%ModuleCode&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#moduleheadercode&quot;&gt;%ModuleHeaderCode&lt;/a&gt; |
-        &lt;a class=&quot;reference&quot; href=&quot;#optionalinclude&quot;&gt;%OptionalInclude&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#platforms&quot;&gt;%Platforms&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#preinitialisationcode&quot;&gt;%PreInitialisationCode&lt;/a&gt; |
-        &lt;a class=&quot;reference&quot; href=&quot;#postinitialisationcode&quot;&gt;%PostInitialisationCode&lt;/a&gt; | &lt;em&gt;sip-option-list&lt;/em&gt; | &lt;a class=&quot;reference&quot; href=&quot;#timeline&quot;&gt;%Timeline&lt;/a&gt; |
-        &lt;a class=&quot;reference&quot; href=&quot;#unitcode&quot;&gt;%UnitCode&lt;/a&gt;]
-
-&lt;em&gt;sip-option-list&lt;/em&gt; :: &lt;a class=&quot;reference&quot; href=&quot;#sipoptions&quot;&gt;%SIPOptions&lt;/a&gt; &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;(&lt;/span&gt;&lt;/tt&gt; &lt;em&gt;option-list&lt;/em&gt; &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;)&lt;/span&gt;&lt;/tt&gt;
-
-&lt;em&gt;option-list&lt;/em&gt; ::= &lt;em&gt;option&lt;/em&gt; [&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;,&lt;/span&gt;&lt;/tt&gt; &lt;em&gt;option-list&lt;/em&gt;]
+        &lt;a class=&quot;reference&quot; href=&quot;#initialisationcode&quot;&gt;%InitialisationCode&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#id14&quot;&gt;%License&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#mappedtype&quot;&gt;%MappedType&lt;/a&gt; |
+        &lt;em&gt;mapped-type-template&lt;/em&gt; | &lt;a class=&quot;reference&quot; href=&quot;#module&quot;&gt;%Module&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#modulecode&quot;&gt;%ModuleCode&lt;/a&gt; |
+        &lt;a class=&quot;reference&quot; href=&quot;#moduleheadercode&quot;&gt;%ModuleHeaderCode&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#optionalinclude&quot;&gt;%OptionalInclude&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#platforms&quot;&gt;%Platforms&lt;/a&gt; |
+        &lt;a class=&quot;reference&quot; href=&quot;#preinitialisationcode&quot;&gt;%PreInitialisationCode&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#postinitialisationcode&quot;&gt;%PostInitialisationCode&lt;/a&gt; |
+        &lt;a class=&quot;reference&quot; href=&quot;#timeline&quot;&gt;%Timeline&lt;/a&gt; | &lt;a class=&quot;reference&quot; href=&quot;#unitcode&quot;&gt;%UnitCode&lt;/a&gt;]
 
 &lt;em&gt;statement&lt;/em&gt; :: [&lt;em&gt;class-statement&lt;/em&gt; | &lt;em&gt;function&lt;/em&gt; | &lt;em&gt;variable&lt;/em&gt;]
 
@@ -1734,6 +1863,8 @@ file.&lt;/p&gt;
 
 &lt;em&gt;template&lt;/em&gt; ::= &lt;em&gt;scoped-name&lt;/em&gt; &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/tt&gt; &lt;em&gt;type-list&lt;/em&gt; &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/tt&gt;
 
+&lt;em&gt;dotted-name&lt;/em&gt; ::= &lt;em&gt;name&lt;/em&gt; [&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;.&lt;/span&gt;&lt;/tt&gt; &lt;em&gt;dotted-name&lt;/em&gt;]
+
 &lt;em&gt;name&lt;/em&gt; ::= _A-Za-z {_A-Za-z0-9}
 &lt;/pre&gt;
 &lt;p&gt;Here is a short list of differences between C++ and the subset supported by
@@ -1750,80 +1881,80 @@ class or a named enum that has been wrapped in the same module.&lt;/li&gt;
 &lt;/blockquote&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id51&quot; id=&quot;variable-numbers-of-arguments&quot; name=&quot;variable-numbers-of-arguments&quot;&gt;6.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Variable Numbers of Arguments&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id54&quot; id=&quot;variable-numbers-of-arguments&quot; name=&quot;variable-numbers-of-arguments&quot;&gt;6.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Variable Numbers of Arguments&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;SIP supports the use of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;...&lt;/span&gt;&lt;/tt&gt; as the last part of a function signature.  Any
 remaining arguments are collected as a Python tuple.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id52&quot; id=&quot;additional-sip-types&quot; name=&quot;additional-sip-types&quot;&gt;6.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Additional SIP Types&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id55&quot; id=&quot;additional-sip-types&quot; name=&quot;additional-sip-types&quot;&gt;6.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Additional SIP Types&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;SIP supports a number of additional data types that can be used in Python
 signatures.&lt;/p&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id53&quot; id=&quot;sip-anyslot&quot; name=&quot;sip-anyslot&quot;&gt;6.3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_ANYSLOT&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id56&quot; id=&quot;sip-anyslot&quot; name=&quot;sip-anyslot&quot;&gt;6.3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_ANYSLOT&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is both a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; and a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is used as the type
 of the member instead of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; in functions that implement the
 connection or disconnection of an explicitly generated signal to a slot.
 Handwritten code must be provided to interpret the conversion correctly.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id54&quot; id=&quot;sip-pycallable&quot; name=&quot;sip-pycallable&quot;&gt;6.3.2&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYCALLABLE&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id57&quot; id=&quot;sip-pycallable&quot; name=&quot;sip-pycallable&quot;&gt;6.3.2&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYCALLABLE&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is a Python callable object.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id55&quot; id=&quot;sip-pydict&quot; name=&quot;sip-pydict&quot;&gt;6.3.3&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYDICT&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id58&quot; id=&quot;sip-pydict&quot; name=&quot;sip-pydict&quot;&gt;6.3.3&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYDICT&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is a Python dictionary object.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id56&quot; id=&quot;sip-pylist&quot; name=&quot;sip-pylist&quot;&gt;6.3.4&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYLIST&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id59&quot; id=&quot;sip-pylist&quot; name=&quot;sip-pylist&quot;&gt;6.3.4&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYLIST&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is a Python list object.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id57&quot; id=&quot;sip-pyobject&quot; name=&quot;sip-pyobject&quot;&gt;6.3.5&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYOBJECT&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id60&quot; id=&quot;sip-pyobject&quot; name=&quot;sip-pyobject&quot;&gt;6.3.5&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYOBJECT&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; of any Python type.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id58&quot; id=&quot;sip-pyslice&quot; name=&quot;sip-pyslice&quot;&gt;6.3.6&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYSLICE&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id61&quot; id=&quot;sip-pyslice&quot; name=&quot;sip-pyslice&quot;&gt;6.3.6&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYSLICE&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is a Python slice object.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id59&quot; id=&quot;sip-pytuple&quot; name=&quot;sip-pytuple&quot;&gt;6.3.7&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYTUPLE&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id62&quot; id=&quot;sip-pytuple&quot; name=&quot;sip-pytuple&quot;&gt;6.3.7&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYTUPLE&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is a Python tuple object.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id60&quot; id=&quot;sip-pytype&quot; name=&quot;sip-pytype&quot;&gt;6.3.8&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYTYPE&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id63&quot; id=&quot;sip-pytype&quot; name=&quot;sip-pytype&quot;&gt;6.3.8&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_PYTYPE&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is a Python type object.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id61&quot; id=&quot;sip-qobject&quot; name=&quot;sip-qobject&quot;&gt;6.3.9&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_QOBJECT&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id64&quot; id=&quot;sip-qobject&quot; name=&quot;sip-qobject&quot;&gt;6.3.9&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_QOBJECT&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is a C++ instance of a class derived from Qt's
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt;&lt;/tt&gt; class.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id62&quot; id=&quot;sip-rxobj-con&quot; name=&quot;sip-rxobj-con&quot;&gt;6.3.10&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_RXOBJ_CON&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id65&quot; id=&quot;sip-rxobj-con&quot; name=&quot;sip-rxobj-con&quot;&gt;6.3.10&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_RXOBJ_CON&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is a C++ instance of a class derived from Qt's
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt;&lt;/tt&gt; class.  It is used as the type of the receiver instead of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt;
 &lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; in functions that implement a connection to a slot.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id63&quot; id=&quot;sip-rxobj-dis&quot; name=&quot;sip-rxobj-dis&quot;&gt;6.3.11&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_RXOBJ_DIS&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id66&quot; id=&quot;sip-rxobj-dis&quot; name=&quot;sip-rxobj-dis&quot;&gt;6.3.11&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_RXOBJ_DIS&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is a C++ instance of a class derived from Qt's
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt;&lt;/tt&gt; class.  It is used as the type of the receiver instead of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt;
 &lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; in functions that implement a disconnection from a slot.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id64&quot; id=&quot;sip-signal&quot; name=&quot;sip-signal&quot;&gt;6.3.12&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SIGNAL&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id67&quot; id=&quot;sip-signal&quot; name=&quot;sip-signal&quot;&gt;6.3.12&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SIGNAL&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is used as the type of the signal instead of
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; in functions that implement the connection or disconnection
 of an explicitly generated signal to a slot.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id65&quot; id=&quot;sip-slot&quot; name=&quot;sip-slot&quot;&gt;6.3.13&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SLOT&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id68&quot; id=&quot;sip-slot&quot; name=&quot;sip-slot&quot;&gt;6.3.13&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SLOT&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is used as the type of the member instead of
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; in functions that implement the connection or disconnection
 of an explicitly generated signal to a slot.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id66&quot; id=&quot;sip-slot-con&quot; name=&quot;sip-slot-con&quot;&gt;6.3.14&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SLOT_CON&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id69&quot; id=&quot;sip-slot-con&quot; name=&quot;sip-slot-con&quot;&gt;6.3.14&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SLOT_CON&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is used as the type of the member instead of
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; in functions that implement the connection of an internally
 generated signal to a slot.  The type includes a comma separated list of types
@@ -1841,7 +1972,7 @@ bool connectItem(int, SIP_RXOBJ_CON, SIP_SLOT_CON(int));
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id67&quot; id=&quot;sip-slot-dis&quot; name=&quot;sip-slot-dis&quot;&gt;6.3.15&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SLOT_DIS&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id70&quot; id=&quot;sip-slot-dis&quot; name=&quot;sip-slot-dis&quot;&gt;6.3.15&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SLOT_DIS&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This is a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; that is used as the type of the member instead of
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; in functions that implement the disconnection of an
 internally generated signal to a slot.  The type includes a comma separated
@@ -1850,7 +1981,7 @@ list of types that is the C++ signature of of the signal.&lt;/p&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id68&quot; id=&quot;sip-directives&quot; name=&quot;sip-directives&quot;&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP Directives&lt;/a&gt;&lt;/h1&gt;
+&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id71&quot; id=&quot;sip-directives&quot; name=&quot;sip-directives&quot;&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP Directives&lt;/a&gt;&lt;/h1&gt;
 &lt;p&gt;In this section we describe each of the directives that can be used in
 specification files.  All directives begin with &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;%&lt;/span&gt;&lt;/tt&gt; as the first
 non-whitespace character in a line.&lt;/p&gt;
@@ -1860,7 +1991,7 @@ are enclosed in [&lt;em&gt;brackets&lt;/em&gt;].&lt;/p&gt;
 &lt;p&gt;Some directives are used to specify handwritten code.  Handwritten code must
 not define names that start with the prefix &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id69&quot; id=&quot;accesscode&quot; name=&quot;accesscode&quot;&gt;7.1&amp;nbsp;&amp;nbsp;&amp;nbsp;%AccessCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id72&quot; id=&quot;accesscode&quot; name=&quot;accesscode&quot;&gt;7.1&amp;nbsp;&amp;nbsp;&amp;nbsp;%AccessCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %AccessCode
     &lt;em&gt;code&lt;/em&gt;
@@ -1887,7 +2018,7 @@ Klass *klassInstance;
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id70&quot; id=&quot;bigetcharbuffercode&quot; name=&quot;bigetcharbuffercode&quot;&gt;7.2&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetCharBufferCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id73&quot; id=&quot;bigetcharbuffercode&quot; name=&quot;bigetcharbuffercode&quot;&gt;7.2&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetCharBufferCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %BIGetCharBufferCode
     &lt;em&gt;code&lt;/em&gt;
@@ -1915,7 +2046,7 @@ i.e. &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;self&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id71&quot; id=&quot;bigetreadbuffercode&quot; name=&quot;bigetreadbuffercode&quot;&gt;7.3&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetReadBufferCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id74&quot; id=&quot;bigetreadbuffercode&quot; name=&quot;bigetreadbuffercode&quot;&gt;7.3&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetReadBufferCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %BIGetReadBufferCode
     &lt;em&gt;code&lt;/em&gt;
@@ -1942,7 +2073,7 @@ i.e. &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;self&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id72&quot; id=&quot;bigetsegcountcode&quot; name=&quot;bigetsegcountcode&quot;&gt;7.4&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetSegCountCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id75&quot; id=&quot;bigetsegcountcode&quot; name=&quot;bigetsegcountcode&quot;&gt;7.4&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetSegCountCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %BIGetSegCountCode
     &lt;em&gt;code&lt;/em&gt;
@@ -1968,7 +2099,7 @@ i.e. &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;self&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id73&quot; id=&quot;bigetwritebuffercode&quot; name=&quot;bigetwritebuffercode&quot;&gt;7.5&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetWriteBufferCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id76&quot; id=&quot;bigetwritebuffercode&quot; name=&quot;bigetwritebuffercode&quot;&gt;7.5&amp;nbsp;&amp;nbsp;&amp;nbsp;%BIGetWriteBufferCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %BIGetWriteBufferCode
     &lt;em&gt;code&lt;/em&gt;
@@ -1995,7 +2126,7 @@ i.e. &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;self&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id74&quot; id=&quot;cmodule&quot; name=&quot;cmodule&quot;&gt;7.6&amp;nbsp;&amp;nbsp;&amp;nbsp;%CModule&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id77&quot; id=&quot;cmodule&quot; name=&quot;cmodule&quot;&gt;7.6&amp;nbsp;&amp;nbsp;&amp;nbsp;%CModule&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %CModule &lt;em&gt;name&lt;/em&gt; [&lt;em&gt;version&lt;/em&gt;]
 &lt;/pre&gt;
@@ -2008,7 +2139,7 @@ library and to define the name of the module and it's optional version number.&lt;/
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id75&quot; id=&quot;compositemodule&quot; name=&quot;compositemodule&quot;&gt;7.7&amp;nbsp;&amp;nbsp;&amp;nbsp;%CompositeModule&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id78&quot; id=&quot;compositemodule&quot; name=&quot;compositemodule&quot;&gt;7.7&amp;nbsp;&amp;nbsp;&amp;nbsp;%CompositeModule&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %CompositeModule &lt;em&gt;name&lt;/em&gt;
 &lt;/pre&gt;
@@ -2035,7 +2166,7 @@ component module.&lt;/p&gt;
 don't have to remember which which individual module an object is defined in.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id76&quot; id=&quot;consolidatedmodule&quot; name=&quot;consolidatedmodule&quot;&gt;7.8&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConsolidatedModule&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id79&quot; id=&quot;consolidatedmodule&quot; name=&quot;consolidatedmodule&quot;&gt;7.8&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConsolidatedModule&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %ConsolidatedModule &lt;em&gt;name&lt;/em&gt;
 &lt;/pre&gt;
@@ -2064,7 +2195,7 @@ building as a component the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;-p&lt;/s
 specify the name of the consolidated module.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id77&quot; id=&quot;convertfromtypecode&quot; name=&quot;convertfromtypecode&quot;&gt;7.9&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConvertFromTypeCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id80&quot; id=&quot;convertfromtypecode&quot; name=&quot;convertfromtypecode&quot;&gt;7.9&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConvertFromTypeCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %ConvertFromTypeCode
     &lt;em&gt;code&lt;/em&gt;
@@ -2110,7 +2241,7 @@ list of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QWidget&lt;/span&gt;&lt;/tt&gt; insta
 
         // Get the Python wrapper for the QWidget instance, creating a new
         // one if necessary, and handle any ownership transfer.
-        if ((wobj = sipConvertFromInstance(w, sipClass_QWidget, sipTransferObj)) == NULL)
+        if ((wobj = sipConvertFromType(w, sipType_QWidget, sipTransferObj)) == NULL)
         {
             // There was an error so garbage collect the Python list.
             Py_DECREF(l);
@@ -2127,7 +2258,7 @@ list of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QWidget&lt;/span&gt;&lt;/tt&gt; insta
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id78&quot; id=&quot;converttosubclasscode&quot; name=&quot;converttosubclasscode&quot;&gt;7.10&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConvertToSubClassCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id81&quot; id=&quot;converttosubclasscode&quot; name=&quot;converttosubclasscode&quot;&gt;7.10&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConvertToSubClassCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %ConvertToSubClassCode
     &lt;em&gt;code&lt;/em&gt;
@@ -2161,13 +2292,22 @@ possible that the C++ address of the instance as the sub-class is
 different to that of the super-class.  If so, then this must be set to the
 C++ address of the instance when cast (usually using &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;static_cast&lt;/span&gt;&lt;/tt&gt;)
 from the super-class to the sub-class.&lt;/dd&gt;
+&lt;dt&gt;const sipTypeDef *sipType&lt;/dt&gt;
+&lt;dd&gt;The handwritten code must set this to the SIP generated type structure
+that corresponds to the class instance.  (The type structure for class
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Klass&lt;/span&gt;&lt;/tt&gt; is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipType_Klass&lt;/span&gt;&lt;/tt&gt;.)  If the RTTI of the class instance isn't
+recognised then &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipType&lt;/span&gt;&lt;/tt&gt; must be set to &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt;.  The code doesn't
+have to recognise the exact class, only the most specific sub-class that
+it can.&lt;/dd&gt;
 &lt;dt&gt;sipWrapperType *sipClass&lt;/dt&gt;
-&lt;dd&gt;The handwritten code must set this to the SIP generated Python type object
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;The handwritten code must set this to the SIP generated Python type object
 that corresponds to the class instance.  (The type object for class
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Klass&lt;/span&gt;&lt;/tt&gt; is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipClass_Klass&lt;/span&gt;&lt;/tt&gt;.)  If the RTTI of the class instance isn't
 recognised then &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipClass&lt;/span&gt;&lt;/tt&gt; must be set to &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt;.  The code doesn't
 have to recognise the exact class, only the most specific sub-class that
-it can.&lt;/dd&gt;
+it can.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipType&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;p&gt;The handwritten code must not explicitly return.&lt;/p&gt;
 &lt;p&gt;The following example shows the sub-class conversion code for &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QEvent&lt;/span&gt;&lt;/tt&gt; based
@@ -2177,22 +2317,22 @@ class QEvent
 {
 %ConvertToSubClassCode
     // QEvent sub-classes provide a unique type ID.
-    switch (sipCpp -&amp;gt; type())
+    switch (sipCpp-&amp;gt;type())
     {
     case QEvent::Timer:
-        sipClass = sipClass_QTimerEvent;
+        sipType = sipType_QTimerEvent;
         break;
 
     case QEvent::KeyPress:
     case QEvent::KeyRelease:
-        sipClass = sipClass_QKeyEvent;
+        sipType = sipType_QKeyEvent;
         break;
 
     // Skip the remaining event types to keep the example short.
 
     default:
         // We don't recognise the type.
-        sipClass = NULL;
+        sipType = NULL;
     }
 %End
 
@@ -2200,12 +2340,9 @@ class QEvent
 
 };
 &lt;/pre&gt;
-&lt;p&gt;The SIP API includes the &lt;a class=&quot;reference&quot; href=&quot;#sipmapinttoclass&quot;&gt;sipMapIntToClass()&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;#sipmapstringtoclass&quot;&gt;sipMapStringToClass()&lt;/a&gt;
-functions that convert integer and string based RTTI to Python type objects
-based on ordered lookup tables.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id79&quot; id=&quot;converttotypecode&quot; name=&quot;converttotypecode&quot;&gt;7.11&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConvertToTypeCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id82&quot; id=&quot;converttotypecode&quot; name=&quot;converttotypecode&quot;&gt;7.11&amp;nbsp;&amp;nbsp;&amp;nbsp;%ConvertToTypeCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %ConvertToTypeCode
     &lt;em&gt;code&lt;/em&gt;
@@ -2274,8 +2411,8 @@ Classes&lt;/a&gt;.&lt;/li&gt;
         // disallow None because it is a list of QPoint, not of a pointer
         // to a QPoint, so None isn't appropriate.
         for (int i = 0; i &amp;lt; PyList_GET_SIZE(sipPy); ++i)
-            if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i),
-                                         sipClass_QPoint, SIP_NOT_NONE))
+            if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i),
+                                     sipType_QPoint, SIP_NOT_NONE))
                 return 0;
 
         // The type is valid.
@@ -2293,16 +2430,16 @@ Classes&lt;/a&gt;.&lt;/li&gt;
         // Get the address of the element's C++ instance.  Note that, in
         // this case, we don't apply any ownership changes to the list
         // elements, only to the list itself.
-        qp = reinterpret_cast&amp;lt;QPoint *&amp;gt;(sipConvertToInstance(
+        qp = reinterpret_cast&amp;lt;QPoint *&amp;gt;(sipConvertToType(
                                                 PyList_GET_ITEM(sipPy, i),
-                                                sipClass_QPoint, 0,
+                                                sipType_QPoint, 0,
                                                 SIP_NOT_NONE,
                                                 &amp;amp;state, sipIsErr));
 
         // Deal with any errors.
         if (*sipIsErr)
         {
-            sipReleaseInstance(qp, sipClass_QPoint, state);
+            sipReleaseType(qp, sipType_QPoint, state);
 
             // Tidy up.
             delete ql;
@@ -2316,8 +2453,8 @@ Classes&lt;/a&gt;.&lt;/li&gt;
         // A copy of the QPoint was appended to the list so we no longer
         // need it.  It may be a temporary instance that should be
         // destroyed, or a wrapped instance that should not be destroyed.
-        // sipReleaseInstance() will do the right thing.
-        sipReleaseInstance(qp, sipClass_QPoint, state);
+        // sipReleaseType() will do the right thing.
+        sipReleaseType(qp, sipType_QPoint, state);
     }
 
     // Return the instance.
@@ -2334,13 +2471,12 @@ Classes&lt;/a&gt;.&lt;/li&gt;
 would normally be automatically generated.  This means that the handwritten
 code must also handle instances of the class itself and not just the additional
 types that are being supported.  This should be done by making calls to
-&lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttoinstance&quot;&gt;sipCanConvertToInstance()&lt;/a&gt; to check the object type and
-&lt;a class=&quot;reference&quot; href=&quot;#sipconverttoinstance&quot;&gt;sipConvertToInstance()&lt;/a&gt; to convert the object.  The &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;SIP_NO_CONVERTORS&lt;/span&gt;&lt;/tt&gt;
-flag &lt;em&gt;must&lt;/em&gt; be passed to both these functions to prevent recursive calls to the
-handwritten code.&lt;/p&gt;
+&lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttotype&quot;&gt;sipCanConvertToType()&lt;/a&gt; to check the object type and &lt;a class=&quot;reference&quot; href=&quot;#sipconverttotype&quot;&gt;sipConvertToType()&lt;/a&gt; to
+convert the object.  The &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;SIP_NO_CONVERTORS&lt;/span&gt;&lt;/tt&gt; flag &lt;em&gt;must&lt;/em&gt; be passed to both
+these functions to prevent recursive calls to the handwritten code.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id80&quot; id=&quot;copying&quot; name=&quot;copying&quot;&gt;7.12&amp;nbsp;&amp;nbsp;&amp;nbsp;%Copying&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id83&quot; id=&quot;copying&quot; name=&quot;copying&quot;&gt;7.12&amp;nbsp;&amp;nbsp;&amp;nbsp;%Copying&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %Copying
     &lt;em&gt;text&lt;/em&gt;
@@ -2352,12 +2488,44 @@ include copyright and licensing terms.&lt;/p&gt;
 &lt;p&gt;For example:&lt;/p&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %Copying
-Copyright (c) 2007 Riverbank Computing Limited
+Copyright (c) 2008 Riverbank Computing Limited
 %End
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id81&quot; id=&quot;doc&quot; name=&quot;doc&quot;&gt;7.13&amp;nbsp;&amp;nbsp;&amp;nbsp;%Doc&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id84&quot; id=&quot;defaultmetatype&quot; name=&quot;defaultmetatype&quot;&gt;7.13&amp;nbsp;&amp;nbsp;&amp;nbsp;%DefaultMetatype&lt;/a&gt;&lt;/h2&gt;
+&lt;pre class=&quot;literal-block&quot;&gt;
+%DefaultMetatype &lt;em&gt;dotted-name&lt;/em&gt;
+&lt;/pre&gt;
+&lt;p&gt;This directive is used to specify the Python type that should be used as the
+meta-type for any C/C++ data type that doesn't have an explicit super-type.&lt;/p&gt;
+&lt;p&gt;If this is not specified then &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.wrappertype&lt;/span&gt;&lt;/tt&gt; is used.&lt;/p&gt;
+&lt;p&gt;You can also use the &lt;a class=&quot;reference&quot; href=&quot;#metatype&quot;&gt;Metatype&lt;/a&gt; class annotation to specify the meta-type
+used by a particular C/C++ type.&lt;/p&gt;
+&lt;p&gt;See the section &lt;a class=&quot;reference&quot; href=&quot;#types-and-meta-types&quot;&gt;Types and Meta-types&lt;/a&gt; for more details.&lt;/p&gt;
+&lt;p&gt;For example:&lt;/p&gt;
+&lt;pre class=&quot;literal-block&quot;&gt;
+%DefaultMetatype PyQt4.QtCore.pyqtWrapperType
+&lt;/pre&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id85&quot; id=&quot;defaultsupertype&quot; name=&quot;defaultsupertype&quot;&gt;7.14&amp;nbsp;&amp;nbsp;&amp;nbsp;%DefaultSupertype&lt;/a&gt;&lt;/h2&gt;
+&lt;pre class=&quot;literal-block&quot;&gt;
+%DefaultSupertype &lt;em&gt;dotted-name&lt;/em&gt;
+&lt;/pre&gt;
+&lt;p&gt;This directive is used to specify the Python type that should be used as the
+super-type for any C/C++ data type that doesn't have an explicit super-type.&lt;/p&gt;
+&lt;p&gt;If this is not specified then &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.wrapper&lt;/span&gt;&lt;/tt&gt; is used.&lt;/p&gt;
+&lt;p&gt;You can also use the &lt;a class=&quot;reference&quot; href=&quot;#supertype&quot;&gt;Supertype&lt;/a&gt; class annotation to specify the super-type
+used by a particular C/C++ type.&lt;/p&gt;
+&lt;p&gt;See the section &lt;a class=&quot;reference&quot; href=&quot;#types-and-meta-types&quot;&gt;Types and Meta-types&lt;/a&gt; for more details.&lt;/p&gt;
+&lt;p&gt;For example:&lt;/p&gt;
+&lt;pre class=&quot;literal-block&quot;&gt;
+%DefaultSupertype sip.simplewrapper
+&lt;/pre&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id86&quot; id=&quot;doc&quot; name=&quot;doc&quot;&gt;7.15&amp;nbsp;&amp;nbsp;&amp;nbsp;%Doc&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %Doc
     &lt;em&gt;text&lt;/em&gt;
@@ -2383,12 +2551,12 @@ which it is defined.
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id82&quot; id=&quot;end&quot; name=&quot;end&quot;&gt;7.14&amp;nbsp;&amp;nbsp;&amp;nbsp;%End&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id87&quot; id=&quot;end&quot; name=&quot;end&quot;&gt;7.16&amp;nbsp;&amp;nbsp;&amp;nbsp;%End&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;This isn't a directive in itself, but is used to terminate a number of
 directives that allow a block of handwritten code or text to be specified.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id83&quot; id=&quot;exception&quot; name=&quot;exception&quot;&gt;7.15&amp;nbsp;&amp;nbsp;&amp;nbsp;%Exception&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id88&quot; id=&quot;exception&quot; name=&quot;exception&quot;&gt;7.17&amp;nbsp;&amp;nbsp;&amp;nbsp;%Exception&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %Exception &lt;em&gt;name&lt;/em&gt; [(&lt;em&gt;base-exception)]
 {
@@ -2430,7 +2598,7 @@ The new exception is called &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;StdEx
 Python exception &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Exception&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id84&quot; id=&quot;exporteddoc&quot; name=&quot;exporteddoc&quot;&gt;7.16&amp;nbsp;&amp;nbsp;&amp;nbsp;%ExportedDoc&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id89&quot; id=&quot;exporteddoc&quot; name=&quot;exporteddoc&quot;&gt;7.18&amp;nbsp;&amp;nbsp;&amp;nbsp;%ExportedDoc&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %ExportedDoc
     &lt;em&gt;text&lt;/em&gt;
@@ -2455,7 +2623,7 @@ module in which it is defined and all modules that %Import it.
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id85&quot; id=&quot;exportedheadercode&quot; name=&quot;exportedheadercode&quot;&gt;7.17&amp;nbsp;&amp;nbsp;&amp;nbsp;%ExportedHeaderCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id90&quot; id=&quot;exportedheadercode&quot; name=&quot;exportedheadercode&quot;&gt;7.19&amp;nbsp;&amp;nbsp;&amp;nbsp;%ExportedHeaderCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %ExportedHeaderCode
     &lt;em&gt;code&lt;/em&gt;
@@ -2468,7 +2636,7 @@ Python modules should not explicitly call functions in another Python module.&lt;/p
 &lt;p&gt;See also &lt;a class=&quot;reference&quot; href=&quot;#modulecode&quot;&gt;%ModuleCode&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;#moduleheadercode&quot;&gt;%ModuleHeaderCode&lt;/a&gt;.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id86&quot; id=&quot;feature&quot; name=&quot;feature&quot;&gt;7.18&amp;nbsp;&amp;nbsp;&amp;nbsp;%Feature&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id91&quot; id=&quot;feature&quot; name=&quot;feature&quot;&gt;7.20&amp;nbsp;&amp;nbsp;&amp;nbsp;%Feature&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %Feature &lt;em&gt;name&lt;/em&gt;
 &lt;/pre&gt;
@@ -2491,7 +2659,7 @@ void foo();
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id87&quot; id=&quot;gcclearcode&quot; name=&quot;gcclearcode&quot;&gt;7.19&amp;nbsp;&amp;nbsp;&amp;nbsp;%GCClearCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id92&quot; id=&quot;gcclearcode&quot; name=&quot;gcclearcode&quot;&gt;7.21&amp;nbsp;&amp;nbsp;&amp;nbsp;%GCClearCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %GCClearCode
     &lt;em&gt;code&lt;/em&gt;
@@ -2538,7 +2706,7 @@ always a Python object and so should be handled by the garbage collector:&lt;/p&gt;
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id88&quot; id=&quot;gctraversecode&quot; name=&quot;gctraversecode&quot;&gt;7.20&amp;nbsp;&amp;nbsp;&amp;nbsp;%GCTraverseCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id93&quot; id=&quot;gctraversecode&quot; name=&quot;gctraversecode&quot;&gt;7.22&amp;nbsp;&amp;nbsp;&amp;nbsp;%GCTraverseCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %GCTraverseCode
     &lt;em&gt;code&lt;/em&gt;
@@ -2577,7 +2745,7 @@ collector.&lt;/dd&gt;
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id89&quot; id=&quot;getcode&quot; name=&quot;getcode&quot;&gt;7.21&amp;nbsp;&amp;nbsp;&amp;nbsp;%GetCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id94&quot; id=&quot;getcode&quot; name=&quot;getcode&quot;&gt;7.23&amp;nbsp;&amp;nbsp;&amp;nbsp;%GetCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %GetCode
     &lt;em&gt;code&lt;/em&gt;
@@ -2637,7 +2805,7 @@ struct Entity
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id90&quot; id=&quot;if&quot; name=&quot;if&quot;&gt;7.22&amp;nbsp;&amp;nbsp;&amp;nbsp;%If&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id95&quot; id=&quot;if&quot; name=&quot;if&quot;&gt;7.24&amp;nbsp;&amp;nbsp;&amp;nbsp;%If&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %If (&lt;em&gt;expression&lt;/em&gt;)
     &lt;em&gt;specification&lt;/em&gt;
@@ -2701,6 +2869,7 @@ following parts of a specification are affected by it:&lt;/p&gt;
 &lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#gcclearcode&quot;&gt;%GCClearCode&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#gctraversecode&quot;&gt;%GCTraverseCode&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#if&quot;&gt;%If&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#initialisationcode&quot;&gt;%InitialisationCode&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#mappedtype&quot;&gt;%MappedType&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#methodcode&quot;&gt;%MethodCode&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;#modulecode&quot;&gt;%ModuleCode&lt;/a&gt;&lt;/li&gt;
@@ -2721,7 +2890,7 @@ following parts of a specification are affected by it:&lt;/p&gt;
 nested &lt;a class=&quot;reference&quot; href=&quot;#if&quot;&gt;%If&lt;/a&gt; directives.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id91&quot; id=&quot;import&quot; name=&quot;import&quot;&gt;7.23&amp;nbsp;&amp;nbsp;&amp;nbsp;%Import&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id96&quot; id=&quot;import&quot; name=&quot;import&quot;&gt;7.25&amp;nbsp;&amp;nbsp;&amp;nbsp;%Import&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %Import &lt;em&gt;filename&lt;/em&gt;
 &lt;/pre&gt;
@@ -2739,7 +2908,7 @@ the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;-I&lt;/span&gt;&lt;/tt&gt; command line o
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id92&quot; id=&quot;include&quot; name=&quot;include&quot;&gt;7.24&amp;nbsp;&amp;nbsp;&amp;nbsp;%Include&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id97&quot; id=&quot;include&quot; name=&quot;include&quot;&gt;7.26&amp;nbsp;&amp;nbsp;&amp;nbsp;%Include&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %Include &lt;em&gt;filename&lt;/em&gt;
 &lt;/pre&gt;
@@ -2755,7 +2924,27 @@ specification into manageable pieces.&lt;/p&gt;
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id93&quot; id=&quot;id14&quot; name=&quot;id14&quot;&gt;7.25&amp;nbsp;&amp;nbsp;&amp;nbsp;%License&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id98&quot; id=&quot;initialisationcode&quot; name=&quot;initialisationcode&quot;&gt;7.27&amp;nbsp;&amp;nbsp;&amp;nbsp;%InitialisationCode&lt;/a&gt;&lt;/h2&gt;
+&lt;pre class=&quot;literal-block&quot;&gt;
+%InitialisationCode
+    &lt;em&gt;code&lt;/em&gt;
+%End
+&lt;/pre&gt;
+&lt;p&gt;This directive is used to specify handwritten code that is embedded in-line
+in the generated module initialisation code after the SIP module has been
+imported but before the module itself has been intialised.&lt;/p&gt;
+&lt;p&gt;It is typically used to call &lt;a class=&quot;reference&quot; href=&quot;#sipregisterpytype&quot;&gt;sipRegisterPyType()&lt;/a&gt;.&lt;/p&gt;
+&lt;p&gt;For example:&lt;/p&gt;
+&lt;pre class=&quot;literal-block&quot;&gt;
+%InitialisationCode
+    // The code will be executed when the module is first imported, after
+    // the SIP module has been imported, but before other module-specific
+    // initialisation has been completed.
+%End
+&lt;/pre&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id99&quot; id=&quot;id14&quot; name=&quot;id14&quot;&gt;7.28&amp;nbsp;&amp;nbsp;&amp;nbsp;%License&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %License /&lt;em&gt;license-annotations&lt;/em&gt;/
 &lt;/pre&gt;
@@ -2773,7 +2962,7 @@ in a module so that it is accessible to Python scripts.&lt;/p&gt;
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id94&quot; id=&quot;mappedtype&quot; name=&quot;mappedtype&quot;&gt;7.26&amp;nbsp;&amp;nbsp;&amp;nbsp;%MappedType&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id100&quot; id=&quot;mappedtype&quot; name=&quot;mappedtype&quot;&gt;7.29&amp;nbsp;&amp;nbsp;&amp;nbsp;%MappedType&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 template&amp;lt;&lt;em&gt;type-list&lt;/em&gt;&amp;gt;
 %MappedType &lt;em&gt;type&lt;/em&gt;
@@ -2830,8 +3019,8 @@ template&amp;lt;Type *&amp;gt;
         // Now check each element of the list is of the type we expect.
         // The template is for a pointer type so we don't disallow None.
         for (int i = 0; i &amp;lt; PyList_GET_SIZE(sipPy); ++i)
-            if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i),
-                                         sipClass_Type, 0))
+            if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i),
+                                     sipType_Type, 0))
                 return 0;
 
         return 1;
@@ -2845,9 +3034,9 @@ template&amp;lt;Type *&amp;gt;
         // Use the SIP API to convert the Python object to the
         // corresponding C++ instance.  Note that we apply any ownership
         // transfer to the list itself, not the individual elements.
-        Type *t = reinterpret_cast&amp;lt;Type *&amp;gt;(sipConvertToInstance(
+        Type *t = reinterpret_cast&amp;lt;Type *&amp;gt;(sipConvertToType(
                                             PyList_GET_ITEM(sipPy, i),
-                                            sipClass_Type, 0, 0, 0,
+                                            sipType_Type, 0, 0, 0,
                                             sipIsErr));
 
         if (*sipIsErr)
@@ -2884,7 +3073,7 @@ template&amp;lt;Type *&amp;gt;
         Type *t = sipCpp -&amp;gt; at(i);
         PyObject *tobj;
 
-        if ((tobj = sipConvertFromInstance(t, sipClass_Type, sipTransferObj)) == NULL)
+        if ((tobj = sipConvertFromType(t, sipType_Type, sipTransferObj)) == NULL)
         {
             // There was an error so garbage collect the Python list.
             Py_DECREF(l);
@@ -2905,7 +3094,7 @@ generated code will automatically map this to and from a Python list of QObject
 instances when appropriate.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id95&quot; id=&quot;methodcode&quot; name=&quot;methodcode&quot;&gt;7.27&amp;nbsp;&amp;nbsp;&amp;nbsp;%MethodCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id101&quot; id=&quot;methodcode&quot; name=&quot;methodcode&quot;&gt;7.30&amp;nbsp;&amp;nbsp;&amp;nbsp;%MethodCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %MethodCode
     &lt;em&gt;code&lt;/em&gt;
@@ -2998,18 +3187,6 @@ constructors or destructors.&lt;/p&gt;
 &lt;dd&gt;If the directive is used in the context of a class constructor, destructor
 or method then this is the Python object that wraps the the structure or
 class instance, i.e. &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;self&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
-&lt;dt&gt;bool sipSelfWasArg&lt;/dt&gt;
-&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This is only made available for non-abstract, virtual methods.  It is set
-if &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;self&lt;/span&gt;&lt;/tt&gt; was explicitly passed as the first argument of the method
-rather than being bound to the method.  In other words, the call was:&lt;/p&gt;
-&lt;pre class=&quot;literal-block&quot;&gt;
-Klass.foo(self, ...)
-&lt;/pre&gt;
-&lt;p&gt;rather than:&lt;/p&gt;
-&lt;pre class=&quot;last literal-block&quot;&gt;
-self.foo(...)
-&lt;/pre&gt;
-&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;p&gt;If the &lt;a class=&quot;reference&quot; href=&quot;#noargparser&quot;&gt;NoArgParser&lt;/a&gt; annotation has been used then only the following
 variables are made available to the handwritten code:&lt;/p&gt;
@@ -3034,8 +3211,7 @@ public:
         if (PyArg_ParseTuple(a0, &amp;quot;ii&amp;quot;, &amp;amp;iarr[0], &amp;amp;iarr[1]))
         {
             Py_BEGIN_ALLOW_THREADS
-            sipRes = sipSelfWasArg ? sipCpp -&amp;gt; Klass::foo(iarr)
-                                   : sipCpp -&amp;gt; foo(iarr);
+            sipCpp -&amp;gt; Klass::foo(iarr);
             Py_END_ALLOW_THREADS
         }
         else
@@ -3046,16 +3222,11 @@ public:
 %End
 };
 &lt;/pre&gt;
-&lt;p&gt;As the example is a virtual method &lt;a class=&quot;footnote-reference&quot; href=&quot;#id16&quot; id=&quot;id15&quot; name=&quot;id15&quot;&gt;[7]&lt;/a&gt;, note the use of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipSelfWasArg&lt;/span&gt;&lt;/tt&gt; to
+&lt;p&gt;As the example is a virtual method &lt;a class=&quot;footnote-reference&quot; href=&quot;#id16&quot; id=&quot;id15&quot; name=&quot;id15&quot;&gt;[7]&lt;/a&gt;, note the use of an explicit scope to
 determine exactly which implementation of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;foo()&lt;/span&gt;&lt;/tt&gt; to call.&lt;/p&gt;
 &lt;p&gt;If a method is in the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;protected&lt;/span&gt;&lt;/tt&gt; section of a C++ class then the call
 should instead be:&lt;/p&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
-sipRes = sipCpp -&amp;gt; sipProtectVirt_foo(sipSelfWasArg, iarr);
-&lt;/pre&gt;
-&lt;p&gt;If a method is in the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;protected&lt;/span&gt;&lt;/tt&gt; section of a C++ class but is not virtual
-then the call should instead be:&lt;/p&gt;
-&lt;pre class=&quot;literal-block&quot;&gt;
 sipRes = sipCpp -&amp;gt; sipProtect_foo(iarr);
 &lt;/pre&gt;
 &lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id16&quot; rules=&quot;none&quot;&gt;
@@ -3067,7 +3238,7 @@ handles the reimplementation of C++ virtual methods in Python.&lt;/td&gt;&lt;/tr&gt;
 &lt;/table&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id96&quot; id=&quot;module&quot; name=&quot;module&quot;&gt;7.28&amp;nbsp;&amp;nbsp;&amp;nbsp;%Module&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id102&quot; id=&quot;module&quot; name=&quot;module&quot;&gt;7.31&amp;nbsp;&amp;nbsp;&amp;nbsp;%Module&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %Module &lt;em&gt;name&lt;/em&gt; [&lt;em&gt;version&lt;/em&gt;]
 &lt;/pre&gt;
@@ -3092,7 +3263,7 @@ version number anyway.&lt;/p&gt;
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id97&quot; id=&quot;modulecode&quot; name=&quot;modulecode&quot;&gt;7.29&amp;nbsp;&amp;nbsp;&amp;nbsp;%ModuleCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id103&quot; id=&quot;modulecode&quot; name=&quot;modulecode&quot;&gt;7.32&amp;nbsp;&amp;nbsp;&amp;nbsp;%ModuleCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %ModuleCode
     &lt;em&gt;code&lt;/em&gt;
@@ -3115,7 +3286,7 @@ void dump_object(PyObject *o)
 &lt;p&gt;See also &lt;a class=&quot;reference&quot; href=&quot;#exportedheadercode&quot;&gt;%ExportedHeaderCode&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;#moduleheadercode&quot;&gt;%ModuleHeaderCode&lt;/a&gt;.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id98&quot; id=&quot;moduleheadercode&quot; name=&quot;moduleheadercode&quot;&gt;7.30&amp;nbsp;&amp;nbsp;&amp;nbsp;%ModuleHeaderCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id104&quot; id=&quot;moduleheadercode&quot; name=&quot;moduleheadercode&quot;&gt;7.33&amp;nbsp;&amp;nbsp;&amp;nbsp;%ModuleHeaderCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %ModuleHeaderCode
     &lt;em&gt;code&lt;/em&gt;
@@ -3133,7 +3304,7 @@ void dump_object(PyObject *o);
 &lt;p&gt;See also &lt;a class=&quot;reference&quot; href=&quot;#exportedheadercode&quot;&gt;%ExportedHeaderCode&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;#modulecode&quot;&gt;%ModuleCode&lt;/a&gt;.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id99&quot; id=&quot;optionalinclude&quot; name=&quot;optionalinclude&quot;&gt;7.31&amp;nbsp;&amp;nbsp;&amp;nbsp;%OptionalInclude&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id105&quot; id=&quot;optionalinclude&quot; name=&quot;optionalinclude&quot;&gt;7.34&amp;nbsp;&amp;nbsp;&amp;nbsp;%OptionalInclude&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %OptionalInclude &lt;em&gt;filename&lt;/em&gt;
 &lt;/pre&gt;
@@ -3145,7 +3316,7 @@ silently continues processing if &lt;em&gt;filename&lt;/em&gt; could not be opened.&lt;/p&gt;
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id100&quot; id=&quot;picklecode&quot; name=&quot;picklecode&quot;&gt;7.32&amp;nbsp;&amp;nbsp;&amp;nbsp;%PickleCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id106&quot; id=&quot;picklecode&quot; name=&quot;picklecode&quot;&gt;7.35&amp;nbsp;&amp;nbsp;&amp;nbsp;%PickleCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %PickleCode
     &lt;em&gt;code&lt;/em&gt;
@@ -3184,7 +3355,7 @@ being pickled.&lt;/p&gt;
 handwritten code.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id101&quot; id=&quot;platforms&quot; name=&quot;platforms&quot;&gt;7.33&amp;nbsp;&amp;nbsp;&amp;nbsp;%Platforms&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id107&quot; id=&quot;platforms&quot; name=&quot;platforms&quot;&gt;7.36&amp;nbsp;&amp;nbsp;&amp;nbsp;%Platforms&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %Platforms {&lt;em&gt;name&lt;/em&gt; &lt;em&gt;name&lt;/em&gt; ...}
 &lt;/pre&gt;
@@ -3208,7 +3379,7 @@ void documented();
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id102&quot; id=&quot;postinitialisationcode&quot; name=&quot;postinitialisationcode&quot;&gt;7.34&amp;nbsp;&amp;nbsp;&amp;nbsp;%PostInitialisationCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id108&quot; id=&quot;postinitialisationcode&quot; name=&quot;postinitialisationcode&quot;&gt;7.37&amp;nbsp;&amp;nbsp;&amp;nbsp;%PostInitialisationCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %PostInitialisationCode
     &lt;em&gt;code&lt;/em&gt;
@@ -3232,7 +3403,7 @@ at the very end of the generated module initialisation code.&lt;/p&gt;
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id103&quot; id=&quot;preinitialisationcode&quot; name=&quot;preinitialisationcode&quot;&gt;7.35&amp;nbsp;&amp;nbsp;&amp;nbsp;%PreInitialisationCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id109&quot; id=&quot;preinitialisationcode&quot; name=&quot;preinitialisationcode&quot;&gt;7.38&amp;nbsp;&amp;nbsp;&amp;nbsp;%PreInitialisationCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %PreInitialisationCode
     &lt;em&gt;code&lt;/em&gt;
@@ -3249,7 +3420,7 @@ at the very start of the generated module initialisation code.&lt;/p&gt;
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id104&quot; id=&quot;raisecode&quot; name=&quot;raisecode&quot;&gt;7.36&amp;nbsp;&amp;nbsp;&amp;nbsp;%RaiseCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id110&quot; id=&quot;raisecode&quot; name=&quot;raisecode&quot;&gt;7.39&amp;nbsp;&amp;nbsp;&amp;nbsp;%RaiseCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %RaiseCode
     &lt;em&gt;code&lt;/em&gt;
@@ -3277,7 +3448,7 @@ reference is the same as the type defined in the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;s
 &lt;p&gt;See the &lt;a class=&quot;reference&quot; href=&quot;#exception&quot;&gt;%Exception&lt;/a&gt; directive for an example.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id105&quot; id=&quot;setcode&quot; name=&quot;setcode&quot;&gt;7.37&amp;nbsp;&amp;nbsp;&amp;nbsp;%SetCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id111&quot; id=&quot;setcode&quot; name=&quot;setcode&quot;&gt;7.40&amp;nbsp;&amp;nbsp;&amp;nbsp;%SetCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %SetCode
     &lt;em&gt;code&lt;/em&gt;
@@ -3308,13 +3479,7 @@ PyTypeObject * or a sipWrapperType *.&lt;/dd&gt;
 &lt;p&gt;See the &lt;a class=&quot;reference&quot; href=&quot;#getcode&quot;&gt;%GetCode&lt;/a&gt; directive for an example.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id106&quot; id=&quot;sipoptions&quot; name=&quot;sipoptions&quot;&gt;7.38&amp;nbsp;&amp;nbsp;&amp;nbsp;%SIPOptions&lt;/a&gt;&lt;/h2&gt;
-&lt;p&gt;This directive sets one or more options that controls different aspects of
-SIP's behaviour.  In this version all the available options are provided
-specifically to support PyQt and so are not documented.&lt;/p&gt;
-&lt;/div&gt;
-&lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id107&quot; id=&quot;timeline&quot; name=&quot;timeline&quot;&gt;7.39&amp;nbsp;&amp;nbsp;&amp;nbsp;%Timeline&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id112&quot; id=&quot;timeline&quot; name=&quot;timeline&quot;&gt;7.41&amp;nbsp;&amp;nbsp;&amp;nbsp;%Timeline&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %Timeline {&lt;em&gt;name&lt;/em&gt; &lt;em&gt;name&lt;/em&gt; ...}
 &lt;/pre&gt;
@@ -3341,7 +3506,7 @@ void foo(int = 0);
 libraries to be wrapped in the same module.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id108&quot; id=&quot;typecode&quot; name=&quot;typecode&quot;&gt;7.40&amp;nbsp;&amp;nbsp;&amp;nbsp;%TypeCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id113&quot; id=&quot;typecode&quot; name=&quot;typecode&quot;&gt;7.42&amp;nbsp;&amp;nbsp;&amp;nbsp;%TypeCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %TypeCode
     &lt;em&gt;code&lt;/em&gt;
@@ -3374,7 +3539,7 @@ clashes of function names within a module in case the SIP &lt;tt class=&quot;docutils li
 option is used.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id109&quot; id=&quot;typeheadercode&quot; name=&quot;typeheadercode&quot;&gt;7.41&amp;nbsp;&amp;nbsp;&amp;nbsp;%TypeHeaderCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id114&quot; id=&quot;typeheadercode&quot; name=&quot;typeheadercode&quot;&gt;7.43&amp;nbsp;&amp;nbsp;&amp;nbsp;%TypeHeaderCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %TypeHeaderCode
     &lt;em&gt;code&lt;/em&gt;
@@ -3398,7 +3563,7 @@ class Klass
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id110&quot; id=&quot;unitcode&quot; name=&quot;unitcode&quot;&gt;7.42&amp;nbsp;&amp;nbsp;&amp;nbsp;%UnitCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id115&quot; id=&quot;unitcode&quot; name=&quot;unitcode&quot;&gt;7.44&amp;nbsp;&amp;nbsp;&amp;nbsp;%UnitCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %UnitCode
     &lt;em&gt;code&lt;/em&gt;
@@ -3409,7 +3574,7 @@ start of a generated compilation unit (ie. C or C++ source file).  It is
 typically used to &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;#include&lt;/span&gt;&lt;/tt&gt; a C++ precompiled header file.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id111&quot; id=&quot;virtualcatchercode&quot; name=&quot;virtualcatchercode&quot;&gt;7.43&amp;nbsp;&amp;nbsp;&amp;nbsp;%VirtualCatcherCode&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id116&quot; id=&quot;virtualcatchercode&quot; name=&quot;virtualcatchercode&quot;&gt;7.45&amp;nbsp;&amp;nbsp;&amp;nbsp;%VirtualCatcherCode&lt;/a&gt;&lt;/h2&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
 %VirtualCatcherCode
     &lt;em&gt;code&lt;/em&gt;
@@ -3502,7 +3667,7 @@ public:
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id112&quot; id=&quot;sip-annotations&quot; name=&quot;sip-annotations&quot;&gt;8&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP Annotations&lt;/a&gt;&lt;/h1&gt;
+&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id117&quot; id=&quot;sip-annotations&quot; name=&quot;sip-annotations&quot;&gt;8&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP Annotations&lt;/a&gt;&lt;/h1&gt;
 &lt;p&gt;In this section we describe each of the annotations that can be used in
 specification files.&lt;/p&gt;
 &lt;p&gt;Annotations can either be argument annotations, class annotations, mapped type
@@ -3521,6 +3686,9 @@ format of the value.  The name of an annotation and its value are separated by
 &lt;dt&gt;name&lt;/dt&gt;
 &lt;dd&gt;The value is a name that is compatible with a C/C++ identifier.  In some
 cases the value is optional.&lt;/dd&gt;
+&lt;dt&gt;dotted name&lt;/dt&gt;
+&lt;dd&gt;The value is a name that is compatible with an identifier preceded by a
+Python scope.&lt;/dd&gt;
 &lt;dt&gt;string&lt;/dt&gt;
 &lt;dd&gt;The value is a double quoted string.&lt;/dd&gt;
 &lt;/dl&gt;
@@ -3531,15 +3699,15 @@ void exec(QWidget * /Transfer/) /ReleaseGIL, PyName=call_exec/;
 &lt;p&gt;Note that the current version of SIP does not complain about unknown
 annotations, or annotations used out of their correct context.&lt;/p&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id113&quot; id=&quot;argument-annotations&quot; name=&quot;argument-annotations&quot;&gt;8.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Argument Annotations&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id118&quot; id=&quot;argument-annotations&quot; name=&quot;argument-annotations&quot;&gt;8.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Argument Annotations&lt;/a&gt;&lt;/h2&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id114&quot; id=&quot;allownone&quot; name=&quot;allownone&quot;&gt;8.1.1&amp;nbsp;&amp;nbsp;&amp;nbsp;AllowNone&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id119&quot; id=&quot;allownone&quot; name=&quot;allownone&quot;&gt;8.1.1&amp;nbsp;&amp;nbsp;&amp;nbsp;AllowNone&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation specifies that the value of the corresponding argument
 (which should be either &lt;a class=&quot;reference&quot; href=&quot;#sip-pycallable&quot;&gt;SIP_PYCALLABLE&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#sip-pydict&quot;&gt;SIP_PYDICT&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#sip-pylist&quot;&gt;SIP_PYLIST&lt;/a&gt;,
 &lt;a class=&quot;reference&quot; href=&quot;#sip-pyslice&quot;&gt;SIP_PYSLICE&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#sip-pytuple&quot;&gt;SIP_PYTUPLE&lt;/a&gt; or &lt;a class=&quot;reference&quot; href=&quot;#sip-pytype&quot;&gt;SIP_PYTYPE&lt;/a&gt;) may be &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;None&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id115&quot; id=&quot;array&quot; name=&quot;array&quot;&gt;8.1.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Array&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id120&quot; id=&quot;array&quot; name=&quot;array&quot;&gt;8.1.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Array&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation specifies that the corresponding argument (which
 should be either &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt;) refers to an array
 rather than a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;'\0'&lt;/span&gt;&lt;/tt&gt; terminated string.  There must be a corresponding
@@ -3547,7 +3715,7 @@ argument with the &lt;a class=&quot;reference&quot; href=&quot;#arraysize&quot;&gt;ArraySize&lt;/a&gt; annotatio
 specified once in a list of arguments.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id116&quot; id=&quot;arraysize&quot; name=&quot;arraysize&quot;&gt;8.1.3&amp;nbsp;&amp;nbsp;&amp;nbsp;ArraySize&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id121&quot; id=&quot;arraysize&quot; name=&quot;arraysize&quot;&gt;8.1.3&amp;nbsp;&amp;nbsp;&amp;nbsp;ArraySize&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation specifies that the corresponding argument (which
 should be either &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;short&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;short&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;int&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;unsigned&lt;/span&gt;&lt;/tt&gt;,
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;long&lt;/span&gt;&lt;/tt&gt; or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;long&lt;/span&gt;&lt;/tt&gt;) refers to the size of an array.  There must be
@@ -3555,7 +3723,7 @@ a corresponding argument with the &lt;a class=&quot;reference&quot; href=&quot;#array&quot;&gt;Array&lt;/a&gt; a
 may only be specified once in a list of arguments.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id117&quot; id=&quot;constrained&quot; name=&quot;constrained&quot;&gt;8.1.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Constrained&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id122&quot; id=&quot;constrained&quot; name=&quot;constrained&quot;&gt;8.1.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Constrained&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;Python will automatically convert between certain compatible types.  For
 example, if a floating pointer number is expected and an integer supplied,
 then the integer will be converted appropriately.  This can cause problems
@@ -3584,7 +3752,7 @@ void foo(int);
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id118&quot; id=&quot;getwrapper&quot; name=&quot;getwrapper&quot;&gt;8.1.5&amp;nbsp;&amp;nbsp;&amp;nbsp;GetWrapper&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id123&quot; id=&quot;getwrapper&quot; name=&quot;getwrapper&quot;&gt;8.1.5&amp;nbsp;&amp;nbsp;&amp;nbsp;GetWrapper&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is only ever used in conjunction with handwritten code
 specified with the &lt;a class=&quot;reference&quot; href=&quot;#methodcode&quot;&gt;%MethodCode&lt;/a&gt; directive.  It causes an extra variable to
 be generated for the corresponding argument (which should be a wrapped C
@@ -3593,7 +3761,7 @@ wraps the argument.&lt;/p&gt;
 &lt;p&gt;See the &lt;a class=&quot;reference&quot; href=&quot;#methodcode&quot;&gt;%MethodCode&lt;/a&gt; directive for more detail.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id119&quot; id=&quot;in&quot; name=&quot;in&quot;&gt;8.1.6&amp;nbsp;&amp;nbsp;&amp;nbsp;In&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id124&quot; id=&quot;in&quot; name=&quot;in&quot;&gt;8.1.6&amp;nbsp;&amp;nbsp;&amp;nbsp;In&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used to specify that the corresponding argument
 (which should be a pointer type) is used to pass a value to the function.&lt;/p&gt;
 &lt;p&gt;For pointers to wrapped C structures or C++ class instances, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; and
@@ -3604,7 +3772,7 @@ if required.  The argument will be dereferenced to obtain the actual value.&lt;/p&gt;
 &lt;p&gt;Both &lt;a class=&quot;reference&quot; href=&quot;#in&quot;&gt;In&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;#out&quot;&gt;Out&lt;/a&gt; may be specified for the same argument.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id120&quot; id=&quot;out&quot; name=&quot;out&quot;&gt;8.1.7&amp;nbsp;&amp;nbsp;&amp;nbsp;Out&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id125&quot; id=&quot;out&quot; name=&quot;out&quot;&gt;8.1.7&amp;nbsp;&amp;nbsp;&amp;nbsp;Out&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used to specify that the corresponding argument
 (which should be a pointer type) is used by the function to return a value as
 an element of a tuple.&lt;/p&gt;
@@ -3616,7 +3784,7 @@ annotation is specified.&lt;/p&gt;
 &lt;p&gt;Both &lt;a class=&quot;reference&quot; href=&quot;#in&quot;&gt;In&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;#out&quot;&gt;Out&lt;/a&gt; may be specified for the same argument.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id121&quot; id=&quot;resultsize&quot; name=&quot;resultsize&quot;&gt;8.1.8&amp;nbsp;&amp;nbsp;&amp;nbsp;ResultSize&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id126&quot; id=&quot;resultsize&quot; name=&quot;resultsize&quot;&gt;8.1.8&amp;nbsp;&amp;nbsp;&amp;nbsp;ResultSize&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used with functions or methods that return a
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt;.  It identifies an argument that defines the
 size of the block of memory whose address is being returned.  This allows the
@@ -3625,13 +3793,13 @@ protocol and allows the memory to be read and updated when wrapped by the
 Python &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;buffer()&lt;/span&gt;&lt;/tt&gt; builtin.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id122&quot; id=&quot;singleshot&quot; name=&quot;singleshot&quot;&gt;8.1.9&amp;nbsp;&amp;nbsp;&amp;nbsp;SingleShot&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id127&quot; id=&quot;singleshot&quot; name=&quot;singleshot&quot;&gt;8.1.9&amp;nbsp;&amp;nbsp;&amp;nbsp;SingleShot&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used only with arguments of type &lt;a class=&quot;reference&quot; href=&quot;#sip-rxobj-con&quot;&gt;SIP_RXOBJ_CON&lt;/a&gt; to
 specify that the signal connected to the slot will only ever be emitted once.
 This prevents a certain class of memory leaks.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id123&quot; id=&quot;transfer&quot; name=&quot;transfer&quot;&gt;8.1.10&amp;nbsp;&amp;nbsp;&amp;nbsp;Transfer&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id128&quot; id=&quot;transfer&quot; name=&quot;transfer&quot;&gt;8.1.10&amp;nbsp;&amp;nbsp;&amp;nbsp;Transfer&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used to specify that ownership of the corresponding
 argument (which should be a wrapped C structure or C++ class instance) is
 transferred from Python to C++.  In addition, if the argument is of a class
@@ -3641,7 +3809,7 @@ cyclic garbage collector.&lt;/p&gt;
 &lt;p&gt;See &lt;a class=&quot;reference&quot; href=&quot;#ownership-of-objects&quot;&gt;Ownership of Objects&lt;/a&gt; for more detail.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id124&quot; id=&quot;transferback&quot; name=&quot;transferback&quot;&gt;8.1.11&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferBack&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id129&quot; id=&quot;transferback&quot; name=&quot;transferback&quot;&gt;8.1.11&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferBack&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used to specify that ownership of the corresponding
 argument (which should be a wrapped C structure or C++ class instance) is
 transferred back to Python from C++.  In addition, any association of the
@@ -3651,7 +3819,7 @@ removed.&lt;/p&gt;
 &lt;p&gt;See &lt;a class=&quot;reference&quot; href=&quot;#ownership-of-objects&quot;&gt;Ownership of Objects&lt;/a&gt; for more detail.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id125&quot; id=&quot;transferthis&quot; name=&quot;transferthis&quot;&gt;8.1.12&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferThis&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id130&quot; id=&quot;transferthis&quot; name=&quot;transferthis&quot;&gt;8.1.12&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferThis&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is only used in C++ constructors or methods.  In the
 context of a constructor or factory method it specifies that ownership of the
 instance being created is transferred from Python to C++ if the corresponding
@@ -3668,15 +3836,15 @@ transferred to last instance that is not &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span clas
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id126&quot; id=&quot;class-annotations&quot; name=&quot;class-annotations&quot;&gt;8.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Class Annotations&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id131&quot; id=&quot;class-annotations&quot; name=&quot;class-annotations&quot;&gt;8.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Class Annotations&lt;/a&gt;&lt;/h2&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id127&quot; id=&quot;abstract&quot; name=&quot;abstract&quot;&gt;8.2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Abstract&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id132&quot; id=&quot;abstract&quot; name=&quot;abstract&quot;&gt;8.2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Abstract&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used to specify that the class has additional pure
 virtual methods that have not been specified and so it cannot be instantiated
 or sub-classed from Python.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id128&quot; id=&quot;delaydtor&quot; name=&quot;delaydtor&quot;&gt;8.2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;DelayDtor&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id133&quot; id=&quot;delaydtor&quot; name=&quot;delaydtor&quot;&gt;8.2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;DelayDtor&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used to specify that the class's destructor should
 not be called until the Python interpreter exits.  It would normally only be
 applied to singleton classes.&lt;/p&gt;
@@ -3713,46 +3881,60 @@ last one.&lt;/dd&gt;
 Python.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id129&quot; id=&quot;deprecated&quot; name=&quot;deprecated&quot;&gt;8.2.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Deprecated&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id134&quot; id=&quot;deprecated&quot; name=&quot;deprecated&quot;&gt;8.2.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Deprecated&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used to specify that the class is deprecated.  It is
 the equivalent of annotating all the class's constructors, function and methods
 as being deprecated.&lt;/p&gt;
 &lt;p&gt;Note that this can also be used as a function annotation.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id130&quot; id=&quot;external&quot; name=&quot;external&quot;&gt;8.2.4&amp;nbsp;&amp;nbsp;&amp;nbsp;External&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id135&quot; id=&quot;external&quot; name=&quot;external&quot;&gt;8.2.4&amp;nbsp;&amp;nbsp;&amp;nbsp;External&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used to specify that the class is defined in another
 module.  Declarations of external classes are private to the module in which
 they appear.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id131&quot; id=&quot;nodefaultctors&quot; name=&quot;nodefaultctors&quot;&gt;8.2.5&amp;nbsp;&amp;nbsp;&amp;nbsp;NoDefaultCtors&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id136&quot; id=&quot;metatype&quot; name=&quot;metatype&quot;&gt;8.2.5&amp;nbsp;&amp;nbsp;&amp;nbsp;Metatype&lt;/a&gt;&lt;/h3&gt;
+&lt;p&gt;This dotted name annotation specifies the name of the Python type object (i.e.
+the value of the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;tp_name&lt;/span&gt;&lt;/tt&gt; field) used as the meta-type used when creating
+the type object for this C structure or C++ type.&lt;/p&gt;
+&lt;p&gt;See the section &lt;a class=&quot;reference&quot; href=&quot;#types-and-meta-types&quot;&gt;Types and Meta-types&lt;/a&gt; for more details.&lt;/p&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id137&quot; id=&quot;nodefaultctors&quot; name=&quot;nodefaultctors&quot;&gt;8.2.6&amp;nbsp;&amp;nbsp;&amp;nbsp;NoDefaultCtors&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used to suppress the automatic generation of default
 constructors for the class.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id132&quot; id=&quot;pyname&quot; name=&quot;pyname&quot;&gt;8.2.6&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id138&quot; id=&quot;pyname&quot; name=&quot;pyname&quot;&gt;8.2.7&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This name annotation specifies an alternative name for the class being wrapped
 which is used when it is referred to from Python.  It is required when a class
 name is the same as a Python keyword.  It may also be used to avoid name
 clashes with other objects (e.g. enums, exceptions, functions) that have the
 same name in the same C++ scope.&lt;/p&gt;
 &lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id139&quot; id=&quot;supertype&quot; name=&quot;supertype&quot;&gt;8.2.8&amp;nbsp;&amp;nbsp;&amp;nbsp;Supertype&lt;/a&gt;&lt;/h3&gt;
+&lt;p&gt;This dotted name annotation specifies the name of the Python type object (i.e.
+the value of the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;tp_name&lt;/span&gt;&lt;/tt&gt; field) used as the super-type used when creating
+the type object for this C structure or C++ type.&lt;/p&gt;
+&lt;p&gt;See the section &lt;a class=&quot;reference&quot; href=&quot;#types-and-meta-types&quot;&gt;Types and Meta-types&lt;/a&gt; for more details.&lt;/p&gt;
+&lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id133&quot; id=&quot;mapped-type-annotations&quot; name=&quot;mapped-type-annotations&quot;&gt;8.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Mapped Type Annotations&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id140&quot; id=&quot;mapped-type-annotations&quot; name=&quot;mapped-type-annotations&quot;&gt;8.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Mapped Type Annotations&lt;/a&gt;&lt;/h2&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id134&quot; id=&quot;norelease&quot; name=&quot;norelease&quot;&gt;8.3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;NoRelease&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id141&quot; id=&quot;norelease&quot; name=&quot;norelease&quot;&gt;8.3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;NoRelease&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used to specify that the mapped type does not
-support the &lt;a class=&quot;reference&quot; href=&quot;#sipreleasemappedtype&quot;&gt;sipReleaseMappedType()&lt;/a&gt; function.  Any &lt;a class=&quot;reference&quot; href=&quot;#converttotypecode&quot;&gt;%ConvertToTypeCode&lt;/a&gt;
-should not create temporary instances of the mapped type, i.e. it should not
-return &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;SIP_TEMPORARY&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+support the &lt;a class=&quot;reference&quot; href=&quot;#sipreleasetype&quot;&gt;sipReleaseType()&lt;/a&gt; function.  Any &lt;a class=&quot;reference&quot; href=&quot;#converttotypecode&quot;&gt;%ConvertToTypeCode&lt;/a&gt; should not
+create temporary instances of the mapped type, i.e. it should not return
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;SIP_TEMPORARY&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id135&quot; id=&quot;enum-annotations&quot; name=&quot;enum-annotations&quot;&gt;8.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Enum Annotations&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id142&quot; id=&quot;enum-annotations&quot; name=&quot;enum-annotations&quot;&gt;8.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Enum Annotations&lt;/a&gt;&lt;/h2&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id136&quot; id=&quot;id17&quot; name=&quot;id17&quot;&gt;8.4.1&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id143&quot; id=&quot;id17&quot; name=&quot;id17&quot;&gt;8.4.1&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This name annotation specifies an alternative name for the enum or enum member
 being wrapped which is used when it is referred to from Python.  It is required
 when an enum or enum member name is the same as a Python keyword.  It may also
@@ -3761,9 +3943,9 @@ functions) that have the same name in the same C++ scope.&lt;/p&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id137&quot; id=&quot;exception-annotations&quot; name=&quot;exception-annotations&quot;&gt;8.5&amp;nbsp;&amp;nbsp;&amp;nbsp;Exception Annotations&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id144&quot; id=&quot;exception-annotations&quot; name=&quot;exception-annotations&quot;&gt;8.5&amp;nbsp;&amp;nbsp;&amp;nbsp;Exception Annotations&lt;/a&gt;&lt;/h2&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id138&quot; id=&quot;id18&quot; name=&quot;id18&quot;&gt;8.5.1&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id145&quot; id=&quot;id18&quot; name=&quot;id18&quot;&gt;8.5.1&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This name annotation specifies an alternative name for the exception being
 defined which is used when it is referred to from Python.  It is required when
 an exception name is the same as a Python keyword.  It may also be used to
@@ -3772,16 +3954,16 @@ have the same name.&lt;/p&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id139&quot; id=&quot;function-annotations&quot; name=&quot;function-annotations&quot;&gt;8.6&amp;nbsp;&amp;nbsp;&amp;nbsp;Function Annotations&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id146&quot; id=&quot;function-annotations&quot; name=&quot;function-annotations&quot;&gt;8.6&amp;nbsp;&amp;nbsp;&amp;nbsp;Function Annotations&lt;/a&gt;&lt;/h2&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id140&quot; id=&quot;autogen&quot; name=&quot;autogen&quot;&gt;8.6.1&amp;nbsp;&amp;nbsp;&amp;nbsp;AutoGen&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id147&quot; id=&quot;autogen&quot; name=&quot;autogen&quot;&gt;8.6.1&amp;nbsp;&amp;nbsp;&amp;nbsp;AutoGen&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This optional name annotation is used with class methods to specify that the
 method be automatically included in all sub-classes.  The value is the name of
 a feature (specified using the &lt;a class=&quot;reference&quot; href=&quot;#feature&quot;&gt;%Feature&lt;/a&gt; directive) which must be enabled
 for the method to be generated.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id141&quot; id=&quot;default&quot; name=&quot;default&quot;&gt;8.6.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Default&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id148&quot; id=&quot;default&quot; name=&quot;default&quot;&gt;8.6.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Default&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is only used with C++ constructors.  Sometimes SIP
 needs to create a class instance.  By default it uses a constructor with no
 compulsory arguments if one is specified.  (SIP will automatically generate a
@@ -3790,36 +3972,36 @@ annotation is used to explicitly specify which constructor to use.  Zero is
 passed as the value of any arguments to the constructor.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id142&quot; id=&quot;id19&quot; name=&quot;id19&quot;&gt;8.6.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Deprecated&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id149&quot; id=&quot;id19&quot; name=&quot;id19&quot;&gt;8.6.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Deprecated&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used to specify that the constructor or function is
 deprecated.  A deprecation warning is issued whenever the constructor or
 function is called.&lt;/p&gt;
 &lt;p&gt;Note that this can also be used as a class annotation.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id143&quot; id=&quot;factory&quot; name=&quot;factory&quot;&gt;8.6.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Factory&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id150&quot; id=&quot;factory&quot; name=&quot;factory&quot;&gt;8.6.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Factory&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation specifies that the value returned by the function
 (which should be a wrapped C structure or C++ class instance) is a newly
 created instance and is owned by Python.&lt;/p&gt;
 &lt;p&gt;See &lt;a class=&quot;reference&quot; href=&quot;#ownership-of-objects&quot;&gt;Ownership of Objects&lt;/a&gt; for more detail.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id144&quot; id=&quot;holdgil&quot; name=&quot;holdgil&quot;&gt;8.6.5&amp;nbsp;&amp;nbsp;&amp;nbsp;HoldGIL&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id151&quot; id=&quot;holdgil&quot; name=&quot;holdgil&quot;&gt;8.6.5&amp;nbsp;&amp;nbsp;&amp;nbsp;HoldGIL&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation specifies that the Python Global Interpreter Lock (GIL)
 is not released before the call to the underlying C or C++ function.  See
 &lt;a class=&quot;reference&quot; href=&quot;#the-python-global-interpreter-lock&quot;&gt;The Python Global Interpreter Lock&lt;/a&gt; and the &lt;a class=&quot;reference&quot; href=&quot;#releasegil&quot;&gt;ReleaseGIL&lt;/a&gt; annotation.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id145&quot; id=&quot;newthread&quot; name=&quot;newthread&quot;&gt;8.6.6&amp;nbsp;&amp;nbsp;&amp;nbsp;NewThread&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id152&quot; id=&quot;newthread&quot; name=&quot;newthread&quot;&gt;8.6.6&amp;nbsp;&amp;nbsp;&amp;nbsp;NewThread&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation specifies that the function will create a new thread.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id146&quot; id=&quot;noargparser&quot; name=&quot;noargparser&quot;&gt;8.6.7&amp;nbsp;&amp;nbsp;&amp;nbsp;NoArgParser&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id153&quot; id=&quot;noargparser&quot; name=&quot;noargparser&quot;&gt;8.6.7&amp;nbsp;&amp;nbsp;&amp;nbsp;NoArgParser&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is used with global functions to specify that the
 supplied &lt;a class=&quot;reference&quot; href=&quot;#methodcode&quot;&gt;%MethodCode&lt;/a&gt; will handle the parsing of the arguments.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id147&quot; id=&quot;noderived&quot; name=&quot;noderived&quot;&gt;8.6.8&amp;nbsp;&amp;nbsp;&amp;nbsp;NoDerived&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id154&quot; id=&quot;noderived&quot; name=&quot;noderived&quot;&gt;8.6.8&amp;nbsp;&amp;nbsp;&amp;nbsp;NoDerived&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation is only used with C++ constructors.  In many cases SIP
 generates a derived class for each class being wrapped (see &lt;a class=&quot;reference&quot; href=&quot;#generated-derived-classes&quot;&gt;Generated Derived
 Classes&lt;/a&gt;).  This derived class contains constructors with the same C++
@@ -3828,7 +4010,7 @@ Python constructor that has no corresponding C++ constructor.  This annotation
 is used to suppress the generation of the constructor in the derived class.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id148&quot; id=&quot;numeric&quot; name=&quot;numeric&quot;&gt;8.6.9&amp;nbsp;&amp;nbsp;&amp;nbsp;Numeric&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id155&quot; id=&quot;numeric&quot; name=&quot;numeric&quot;&gt;8.6.9&amp;nbsp;&amp;nbsp;&amp;nbsp;Numeric&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation specifies that the operator should be interpreted as a
 numeric operator rather than a sequence operator.  Python uses the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;+&lt;/span&gt;&lt;/tt&gt;
 operator for adding numbers and concatanating sequences, and the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; operator
@@ -3842,21 +4024,21 @@ operators.  This annotation is used to force SIP to treat the operator as
 numeric.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id149&quot; id=&quot;posthook&quot; name=&quot;posthook&quot;&gt;8.6.10&amp;nbsp;&amp;nbsp;&amp;nbsp;PostHook&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id156&quot; id=&quot;posthook&quot; name=&quot;posthook&quot;&gt;8.6.10&amp;nbsp;&amp;nbsp;&amp;nbsp;PostHook&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This name annotation is used to specify the name of a Python builtin that is
 called immediately after the call to the underlying C or C++ function or any
 handwritten code.  The builtin is not called if an error occurred.  It is
 primarily used to integrate with debuggers.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id150&quot; id=&quot;prehook&quot; name=&quot;prehook&quot;&gt;8.6.11&amp;nbsp;&amp;nbsp;&amp;nbsp;PreHook&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id157&quot; id=&quot;prehook&quot; name=&quot;prehook&quot;&gt;8.6.11&amp;nbsp;&amp;nbsp;&amp;nbsp;PreHook&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This name annotation is used to specify the name of a Python builtin that is
 called immediately after the function's arguments have been successfully
 parsed and before the call to the underlying C or C++ function or any
 handwritten code.  It is primarily used to integrate with debuggers.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id151&quot; id=&quot;id20&quot; name=&quot;id20&quot;&gt;8.6.12&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id158&quot; id=&quot;id20&quot; name=&quot;id20&quot;&gt;8.6.12&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This name annotation specifies an alternative name for the function being
 wrapped which is used when it is referred to from Python.  It is required when
 a function or method name is the same as a Python keyword.  It may also be used
@@ -3864,7 +4046,7 @@ to avoid name clashes with other objects (e.g. classes, enums, exceptions) that
 have the same name in the same C++ scope.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id152&quot; id=&quot;releasegil&quot; name=&quot;releasegil&quot;&gt;8.6.13&amp;nbsp;&amp;nbsp;&amp;nbsp;ReleaseGIL&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id159&quot; id=&quot;releasegil&quot; name=&quot;releasegil&quot;&gt;8.6.13&amp;nbsp;&amp;nbsp;&amp;nbsp;ReleaseGIL&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation specifies that the Python Global Interpreter Lock (GIL)
 is released before the call to the underlying C or C++ function and reacquired
 afterwards.  It should be used for functions that might block or take a
@@ -3872,7 +4054,7 @@ significant amount of time to execute.  See &lt;a class=&quot;reference&quot; href=&quot;#the-pyth
 Lock&lt;/a&gt; and the &lt;a class=&quot;reference&quot; href=&quot;#holdgil&quot;&gt;HoldGIL&lt;/a&gt; annotation.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id153&quot; id=&quot;id21&quot; name=&quot;id21&quot;&gt;8.6.14&amp;nbsp;&amp;nbsp;&amp;nbsp;Transfer&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id160&quot; id=&quot;id21&quot; name=&quot;id21&quot;&gt;8.6.14&amp;nbsp;&amp;nbsp;&amp;nbsp;Transfer&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation specifies that ownership of the value returned by the
 function (which should be a wrapped C structure or C++ class instance) is
 transferred to C++.  It is only used in the context of a class constructor or a
@@ -3885,7 +4067,7 @@ the method is created with regard to the cyclic garbage collector.&lt;/p&gt;
 &lt;p&gt;See &lt;a class=&quot;reference&quot; href=&quot;#ownership-of-objects&quot;&gt;Ownership of Objects&lt;/a&gt; for more detail.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id154&quot; id=&quot;id22&quot; name=&quot;id22&quot;&gt;8.6.15&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferBack&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id161&quot; id=&quot;id22&quot; name=&quot;id22&quot;&gt;8.6.15&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferBack&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation specifies that ownership of the value returned by the
 function (which should be a wrapped C structure or C++ class instance) is
 transferred back to Python from C++.  Normally returned values (unless they are
@@ -3896,7 +4078,7 @@ with another instance is removed.&lt;/p&gt;
 &lt;p&gt;See &lt;a class=&quot;reference&quot; href=&quot;#ownership-of-objects&quot;&gt;Ownership of Objects&lt;/a&gt; for more detail.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id155&quot; id=&quot;id23&quot; name=&quot;id23&quot;&gt;8.6.16&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferThis&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id162&quot; id=&quot;id23&quot; name=&quot;id23&quot;&gt;8.6.16&amp;nbsp;&amp;nbsp;&amp;nbsp;TransferThis&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation specifies that ownership of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;this&lt;/span&gt;&lt;/tt&gt; is transferred
 from Python to C++.&lt;/p&gt;
 &lt;p&gt;Note that this can also be used as an argument annotation.&lt;/p&gt;
@@ -3904,36 +4086,36 @@ from Python to C++.&lt;/p&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id156&quot; id=&quot;license-annotations&quot; name=&quot;license-annotations&quot;&gt;8.7&amp;nbsp;&amp;nbsp;&amp;nbsp;License Annotations&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id163&quot; id=&quot;license-annotations&quot; name=&quot;license-annotations&quot;&gt;8.7&amp;nbsp;&amp;nbsp;&amp;nbsp;License Annotations&lt;/a&gt;&lt;/h2&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id157&quot; id=&quot;licensee&quot; name=&quot;licensee&quot;&gt;8.7.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Licensee&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id164&quot; id=&quot;licensee&quot; name=&quot;licensee&quot;&gt;8.7.1&amp;nbsp;&amp;nbsp;&amp;nbsp;Licensee&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This optional string annotation specifies the license's licensee.  No
 restrictions are placed on the contents of the string.&lt;/p&gt;
 &lt;p&gt;See the &lt;a class=&quot;reference&quot; href=&quot;#id14&quot;&gt;%License&lt;/a&gt; directive.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id158&quot; id=&quot;signature&quot; name=&quot;signature&quot;&gt;8.7.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Signature&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id165&quot; id=&quot;signature&quot; name=&quot;signature&quot;&gt;8.7.2&amp;nbsp;&amp;nbsp;&amp;nbsp;Signature&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This optional string annotation specifies the license's signature.  No
 restrictions are placed on the contents of the string.&lt;/p&gt;
 &lt;p&gt;See the &lt;a class=&quot;reference&quot; href=&quot;#id14&quot;&gt;%License&lt;/a&gt; directive.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id159&quot; id=&quot;timestamp&quot; name=&quot;timestamp&quot;&gt;8.7.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Timestamp&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id166&quot; id=&quot;timestamp&quot; name=&quot;timestamp&quot;&gt;8.7.3&amp;nbsp;&amp;nbsp;&amp;nbsp;Timestamp&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This optional string annotation specifies the license's timestamp.  No
 restrictions are placed on the contents of the string.&lt;/p&gt;
 &lt;p&gt;See the &lt;a class=&quot;reference&quot; href=&quot;#id14&quot;&gt;%License&lt;/a&gt; directive.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id160&quot; id=&quot;type&quot; name=&quot;type&quot;&gt;8.7.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Type&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id167&quot; id=&quot;type&quot; name=&quot;type&quot;&gt;8.7.4&amp;nbsp;&amp;nbsp;&amp;nbsp;Type&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This string annotation specifies the license's type.  No restrictions are
 placed on the contents of the string.&lt;/p&gt;
 &lt;p&gt;See the &lt;a class=&quot;reference&quot; href=&quot;#id14&quot;&gt;%License&lt;/a&gt; directive.&lt;/p&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id161&quot; id=&quot;typedef-annotations&quot; name=&quot;typedef-annotations&quot;&gt;8.8&amp;nbsp;&amp;nbsp;&amp;nbsp;Typedef Annotations&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id168&quot; id=&quot;typedef-annotations&quot; name=&quot;typedef-annotations&quot;&gt;8.8&amp;nbsp;&amp;nbsp;&amp;nbsp;Typedef Annotations&lt;/a&gt;&lt;/h2&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id162&quot; id=&quot;notypename&quot; name=&quot;notypename&quot;&gt;8.8.1&amp;nbsp;&amp;nbsp;&amp;nbsp;NoTypeName&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id169&quot; id=&quot;notypename&quot; name=&quot;notypename&quot;&gt;8.8.1&amp;nbsp;&amp;nbsp;&amp;nbsp;NoTypeName&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This boolean annotation specifies that the definition of the type rather than
 the name of the type being defined should be used in the generated code.&lt;/p&gt;
 &lt;p&gt;Normally a typedef would be defined as follows:&lt;/p&gt;
@@ -3946,9 +4128,9 @@ code instead.&lt;/p&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id163&quot; id=&quot;variable-annotations&quot; name=&quot;variable-annotations&quot;&gt;8.9&amp;nbsp;&amp;nbsp;&amp;nbsp;Variable Annotations&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id170&quot; id=&quot;variable-annotations&quot; name=&quot;variable-annotations&quot;&gt;8.9&amp;nbsp;&amp;nbsp;&amp;nbsp;Variable Annotations&lt;/a&gt;&lt;/h2&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id164&quot; id=&quot;id24&quot; name=&quot;id24&quot;&gt;8.9.1&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/h3&gt;
+&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id171&quot; id=&quot;id24&quot; name=&quot;id24&quot;&gt;8.9.1&amp;nbsp;&amp;nbsp;&amp;nbsp;PyName&lt;/a&gt;&lt;/h3&gt;
 &lt;p&gt;This name annotation specifies an alternative name for the variable being
 wrapped which is used when it is referred to from Python.  It is required when
 a variable name is the same as a Python keyword.  It may also be used to avoid
@@ -3958,53 +4140,53 @@ name in the same C++ scope.&lt;/p&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id165&quot; id=&quot;sip-api-for-handwritten-code&quot; name=&quot;sip-api-for-handwritten-code&quot;&gt;9&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP API for Handwritten Code&lt;/a&gt;&lt;/h1&gt;
+&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id172&quot; id=&quot;sip-api-for-handwritten-code&quot; name=&quot;sip-api-for-handwritten-code&quot;&gt;9&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP API for Handwritten Code&lt;/a&gt;&lt;/h1&gt;
 &lt;p&gt;In this section we describe the API that can be used by handwritten code in
 specification files.&lt;/p&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id166&quot; id=&quot;sip-api-major-nr&quot; name=&quot;sip-api-major-nr&quot;&gt;9.1&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_API_MAJOR_NR&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id173&quot; id=&quot;sip-api-major-nr&quot; name=&quot;sip-api-major-nr&quot;&gt;9.1&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_API_MAJOR_NR&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;This is a C preprocessor symbol that defines the major number of the SIP API.
 Its value is a number.  There is no direct relationship between this and the
 SIP version number.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id167&quot; id=&quot;sip-api-minor-nr&quot; name=&quot;sip-api-minor-nr&quot;&gt;9.2&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_API_MINOR_NR&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id174&quot; id=&quot;sip-api-minor-nr&quot; name=&quot;sip-api-minor-nr&quot;&gt;9.2&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_API_MINOR_NR&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;This is a C preprocessor symbol that defines the minor number of the SIP API.
 Its value is a number.  There is no direct relationship between this and the
 SIP version number.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id168&quot; id=&quot;sip-block-threads&quot; name=&quot;sip-block-threads&quot;&gt;9.3&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_BLOCK_THREADS&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id175&quot; id=&quot;sip-block-threads&quot; name=&quot;sip-block-threads&quot;&gt;9.3&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_BLOCK_THREADS&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;This is a C preprocessor macro that will make sure the Python Global
 Interpreter Lock (GIL) is acquired.  Python API calls must only be made when
 the GIL has been acquired.  There must be a corresponding
 &lt;a class=&quot;reference&quot; href=&quot;#sip-unblock-threads&quot;&gt;SIP_UNBLOCK_THREADS&lt;/a&gt; at the same lexical scope.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id169&quot; id=&quot;sip-ssize-t&quot; name=&quot;sip-ssize-t&quot;&gt;9.4&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SSIZE_T&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id176&quot; id=&quot;sip-ssize-t&quot; name=&quot;sip-ssize-t&quot;&gt;9.4&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_SSIZE_T&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;This is a C preprocessor macro that is defined as &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_ssize_t&lt;/span&gt;&lt;/tt&gt; for Python
 v2.5 and later, and as &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;int&lt;/span&gt;&lt;/tt&gt; for earlier versions of Python.  It makes it
 easier to write PEP 353 compliant handwritten code.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id170&quot; id=&quot;sip-unblock-threads&quot; name=&quot;sip-unblock-threads&quot;&gt;9.5&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_UNBLOCK_THREADS&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id177&quot; id=&quot;sip-unblock-threads&quot; name=&quot;sip-unblock-threads&quot;&gt;9.5&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_UNBLOCK_THREADS&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;This is a C preprocessor macro that will restore the Python Global Interpreter
 Lock (GIL) to the state it was prior to the corresponding &lt;a class=&quot;reference&quot; href=&quot;#sip-block-threads&quot;&gt;SIP_BLOCK_THREADS&lt;/a&gt;.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id171&quot; id=&quot;sip-version&quot; name=&quot;sip-version&quot;&gt;9.6&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_VERSION&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id178&quot; id=&quot;sip-version&quot; name=&quot;sip-version&quot;&gt;9.6&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_VERSION&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;This is a C preprocessor symbol that defines the SIP version number
 represented as a 3 part hexadecimal number (e.g. v4.0.0 is represented as
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;0x040000&lt;/span&gt;&lt;/tt&gt;).&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id172&quot; id=&quot;sip-version-str&quot; name=&quot;sip-version-str&quot;&gt;9.7&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_VERSION_STR&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id179&quot; id=&quot;sip-version-str&quot; name=&quot;sip-version-str&quot;&gt;9.7&amp;nbsp;&amp;nbsp;&amp;nbsp;SIP_VERSION_STR&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;This is a C preprocessor symbol that defines the SIP version number
 represented as a string.  For development snapshots it will start with
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;snapshot-&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id173&quot; id=&quot;sipbadcatcherresult&quot; name=&quot;sipbadcatcherresult&quot;&gt;9.8&amp;nbsp;&amp;nbsp;&amp;nbsp;sipBadCatcherResult()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id180&quot; id=&quot;sipbadcatcherresult&quot; name=&quot;sipbadcatcherresult&quot;&gt;9.8&amp;nbsp;&amp;nbsp;&amp;nbsp;sipBadCatcherResult()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void sipBadCatcherResult(PyObject *method)&lt;/dt&gt;
 &lt;dd&gt;This raises a Python exception when the result of a Python reimplementation
@@ -4015,7 +4197,7 @@ handwritten code specified with the &lt;a class=&quot;reference&quot; href=&quot;#virtualcatcherco
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id174&quot; id=&quot;sipbadlengthforslice&quot; name=&quot;sipbadlengthforslice&quot;&gt;9.9&amp;nbsp;&amp;nbsp;&amp;nbsp;sipBadLengthForSlice()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id181&quot; id=&quot;sipbadlengthforslice&quot; name=&quot;sipbadlengthforslice&quot;&gt;9.9&amp;nbsp;&amp;nbsp;&amp;nbsp;sipBadLengthForSlice()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void sipBadLengthForSlice(SIP_SSIZE_T seqlen, SIP_SSIZE_T slicelen)&lt;/dt&gt;
 &lt;dd&gt;This raises a Python exception when the length of a slice object is
@@ -4026,7 +4208,7 @@ versions of Python prior to v2.5 the arguments have type &lt;tt class=&quot;docutils lit
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id175&quot; id=&quot;sipbuildresult&quot; name=&quot;sipbuildresult&quot;&gt;9.10&amp;nbsp;&amp;nbsp;&amp;nbsp;sipBuildResult()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id182&quot; id=&quot;sipbuildresult&quot; name=&quot;sipbuildresult&quot;&gt;9.10&amp;nbsp;&amp;nbsp;&amp;nbsp;sipBuildResult()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;PyObject *sipBuildResult(int *iserr, const char *format, ...)&lt;/dt&gt;
 &lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This creates a Python object based on a format string and associated
@@ -4042,10 +4224,6 @@ entry in parentheses is the Python object type that the format character
 will create, and the entry in brackets are the types of the C/C++ values
 to be passed.&lt;/p&gt;
 &lt;dl class=&quot;last docutils&quot;&gt;
-&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;a&lt;/span&gt;&lt;/tt&gt; (string) [char *, int]&lt;/dt&gt;
-&lt;dd&gt;Convert a C/C++ character array and its length to a Python string.  If
-the array is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then the length is ignored and the result is
-&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt;.  This is deprecated, use &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;g&lt;/span&gt;&lt;/tt&gt; instead.&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;b&lt;/span&gt;&lt;/tt&gt; (boolean) [int]&lt;/dt&gt;
 &lt;dd&gt;Convert a C/C++ &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;int&lt;/span&gt;&lt;/tt&gt; to a Python boolean.&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;c&lt;/span&gt;&lt;/tt&gt; (string) [char]&lt;/dt&gt;
@@ -4085,21 +4263,19 @@ string pointer is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt
 &lt;dd&gt;Convert a C/C++ &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;L'\0'&lt;/span&gt;&lt;/tt&gt; terminated wide character string to a Python
 unicode object.  If the string pointer is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then the result is
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
-&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;A&lt;/span&gt;&lt;/tt&gt; (unicode) [wchar_t *, int]&lt;/dt&gt;
-&lt;dd&gt;Convert a C/C++ wide character array and its length to a Python unicode
-object.  If the array is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then the length is ignored and the
-result is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt;.  This is deprecated, use &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;G&lt;/span&gt;&lt;/tt&gt; instead.&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;B&lt;/span&gt;&lt;/tt&gt; (wrapped instance) [&lt;em&gt;type&lt;/em&gt; *, sipWrapperType *, PyObject *]&lt;/dt&gt;
-&lt;dd&gt;Convert a new C structure or a new C++ class instance to a Python class
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;Convert a new C structure or a new C++ class instance to a Python class
 instance object.  Ownership of the structure or instance is determined
 by the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; argument.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; and the instance has
 already been wrapped then the ownership is unchanged.  If it is
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; then ownership will be with Python.  Otherwise
 ownership will be with C/C++ and the instance associated with the
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; argument.  The Python class is influenced by any
-applicable &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code.&lt;/dd&gt;
+applicable &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;N&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;C&lt;/span&gt;&lt;/tt&gt; (wrapped instance) [&lt;em&gt;type&lt;/em&gt; *, sipWrapperType *, PyObject *]&lt;/dt&gt;
-&lt;dd&gt;Convert a C structure or a C++ class instance to a Python class
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;Convert a C structure or a C++ class instance to a Python class
 instance object.  If the structure or class instance has already been
 wrapped then the result is a new reference to the existing class
 instance object.  Ownership of the structure or instance is determined
@@ -4110,59 +4286,48 @@ C/C++.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/
 via a call to &lt;a class=&quot;reference&quot; href=&quot;#siptransferback&quot;&gt;sipTransferBack()&lt;/a&gt;.  Otherwise ownership is transferred
 to C/C++ and the instance associated with the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; argument
 via a call to &lt;a class=&quot;reference&quot; href=&quot;#siptransferto&quot;&gt;sipTransferTo()&lt;/a&gt;.  The Python class is influenced by
-any applicable &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code.&lt;/dd&gt;
-&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;D&lt;/span&gt;&lt;/tt&gt; (object) [&lt;em&gt;type&lt;/em&gt; *, const sipMappedType *, PyObject *]&lt;/dt&gt;
-&lt;dd&gt;Convert a C structure or a C++ class instance wrapped as a mapped type
-to a Python object.  Ownership of the structure or instance is
-determined by the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; argument.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then the
-ownership is unchanged.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; then ownership is
-transferred to Python via a call to &lt;a class=&quot;reference&quot; href=&quot;#siptransferback&quot;&gt;sipTransferBack()&lt;/a&gt;.  Otherwise
-ownership is transferred to C/C++ and the instance associated with the
-&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; argument via a call to &lt;a class=&quot;reference&quot; href=&quot;#siptransferto&quot;&gt;sipTransferTo()&lt;/a&gt;.&lt;/dd&gt;
+any applicable &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;D&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;/dd&gt;
+&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;D&lt;/span&gt;&lt;/tt&gt; (wrapped instance) [&lt;em&gt;type&lt;/em&gt; *, const sipTypeDef *, PyObject *]&lt;/dt&gt;
+&lt;dd&gt;Convert a C structure, C++ class or mapped type instance to a Python
+object.  If the instance has already been wrapped then the result is a
+new reference to the existing object.  Ownership of the instance is
+determined by the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; argument.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; and the
+instance has already been wrapped then the ownership is unchanged.  If
+it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; and the instance is newly wrapped then ownership will be
+with C/C++.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; then ownership is transferred to
+Python via a call to &lt;a class=&quot;reference&quot; href=&quot;#siptransferback&quot;&gt;sipTransferBack()&lt;/a&gt;.  Otherwise ownership is
+transferred to C/C++ and the instance associated with the
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; argument via a call to &lt;a class=&quot;reference&quot; href=&quot;#siptransferto&quot;&gt;sipTransferTo()&lt;/a&gt;.  The Python
+class is influenced by any applicable &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code.&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;E&lt;/span&gt;&lt;/tt&gt; (wrapped enum) [enum, PyTypeObject *]&lt;/dt&gt;
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;Convert a named C/C++ &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;enum&lt;/span&gt;&lt;/tt&gt; to an instance of the corresponding
+Python named enum type.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;F&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;/dd&gt;
+&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;F&lt;/span&gt;&lt;/tt&gt; (wrapped enum) [enum, sipTypeDef *]&lt;/dt&gt;
 &lt;dd&gt;Convert a named C/C++ &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;enum&lt;/span&gt;&lt;/tt&gt; to an instance of the corresponding
 Python named enum type.&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;G&lt;/span&gt;&lt;/tt&gt; (unicode) [wchar_t *, SIP_SSIZE_T]&lt;/dt&gt;
 &lt;dd&gt;Convert a C/C++ wide character array and its length to a Python unicode
 object.  If the array is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then the length is ignored and the
 result is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
-&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;M&lt;/span&gt;&lt;/tt&gt; (wrapped instance) [&lt;em&gt;type&lt;/em&gt; *, sipWrapperType *]&lt;/dt&gt;
-&lt;dd&gt;Convert a C structure or a C++ class instance to a Python class
-instance object.  If the structure or class instance has already been
-wrapped then the result is a new reference to the existing class
-instance object.  If the instance has already been wrapped then the
-ownership is unchanged.  If the instance is newly wrapped then
-ownership will be with C/C++.  The Python class is influenced by any
-applicable &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code.  This is deprecated from
-SIP v4.4.&lt;/dd&gt;
-&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;N&lt;/span&gt;&lt;/tt&gt; (wrapped instance) [&lt;em&gt;type&lt;/em&gt; *, sipWrapperType *]&lt;/dt&gt;
-&lt;dd&gt;Convert a C structure or a C++ class instance to a Python class
-instance object.  This should not be used if the structure or class
-instance might already have been wrapped.  Ownership of the structure
-or instance will be with Python.  The Python class is influenced by
-any applicable &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code.  This is deprecated
-from SIP v4.4.&lt;/dd&gt;
-&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;O&lt;/span&gt;&lt;/tt&gt; (wrapped instance) [&lt;em&gt;type&lt;/em&gt; *, sipWrapperType *]&lt;/dt&gt;
-&lt;dd&gt;Convert a C structure or a C++ class instance to a Python class
-instance object.  If the structure or class instance has already been
-wrapped then the result is a new reference to the existing class
-instance object.  Ownership of the structure or instance will be with
-C/C++.  This is deprecated from SIP v4.4.&lt;/dd&gt;
-&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;P&lt;/span&gt;&lt;/tt&gt; (wrapped instance) [&lt;em&gt;type&lt;/em&gt; *, sipWrapperType *]&lt;/dt&gt;
-&lt;dd&gt;Convert a C structure or a C++ class instance to a Python class
-instance object.  This should not be used if the structure or class
-instance might already have been wrapped.  Ownership of the structure
-or instance will be with Python.  This is deprecated from SIP v4.4.&lt;/dd&gt;
+&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;N&lt;/span&gt;&lt;/tt&gt; (wrapped instance) [&lt;em&gt;type&lt;/em&gt; *, sipTypeDef *, PyObject *]&lt;/dt&gt;
+&lt;dd&gt;Convert a new C structure, C++ class or mapped type instance to a
+Python object.  Ownership of the instance is determined by the
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; argument.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; and the instance has
+already been wrapped then the ownership is unchanged.  If it is
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; then ownership will be with Python.  Otherwise
+ownership will be with C/C++ and the instance associated with the
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; argument.  The Python class is influenced by any
+applicable &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code.&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;R&lt;/span&gt;&lt;/tt&gt; (object) [PyObject *]&lt;/dt&gt;
 &lt;dd&gt;The result is value passed without any conversions.  The reference
 count is unaffected, i.e. a reference is taken.&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;S&lt;/span&gt;&lt;/tt&gt; (object) [PyObject *]&lt;/dt&gt;
 &lt;dd&gt;The result is value passed without any conversions.  The reference
 count is incremented.&lt;/dd&gt;
-&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;T&lt;/span&gt;&lt;/tt&gt; (object) [void *, PyObject *(*)(void *cppptr)]&lt;/dt&gt;
-&lt;dd&gt;Convert a C structure or a C++ class instance to a Python object using
-a convertor function.  See &lt;a class=&quot;reference&quot; href=&quot;#generated-type-convertors&quot;&gt;Generated Type Convertors&lt;/a&gt;.  This is
-deprecated from SIP v4.4.&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;V&lt;/span&gt;&lt;/tt&gt; (sip.voidptr) [void *]&lt;/dt&gt;
 &lt;dd&gt;Convert a C/C++ &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; Python &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.voidptr&lt;/span&gt;&lt;/tt&gt; object.&lt;/dd&gt;
 &lt;/dl&gt;
@@ -4170,7 +4335,7 @@ deprecated from SIP v4.4.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id176&quot; id=&quot;sipcallmethod&quot; name=&quot;sipcallmethod&quot;&gt;9.11&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCallMethod()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id183&quot; id=&quot;sipcallmethod&quot; name=&quot;sipcallmethod&quot;&gt;9.11&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCallMethod()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;PyObject *sipCallMethod(int *iserr, PyObject *method, const char *format, ...)&lt;/dt&gt;
 &lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This calls a Python method passing a tuple of arguments based on a format
@@ -4187,7 +4352,7 @@ Python bound method to call.  &lt;em&gt;format&lt;/em&gt; is the string of format characters
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id177&quot; id=&quot;sipcanconverttoinstance&quot; name=&quot;sipcanconverttoinstance&quot;&gt;9.12&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCanConvertToInstance()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id184&quot; id=&quot;sipcanconverttoinstance&quot; name=&quot;sipcanconverttoinstance&quot;&gt;9.12&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCanConvertToInstance()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;int sipCanConvertToInstance(PyObject *obj, sipWrapperType *type, int flags)&lt;/dt&gt;
 &lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This returns a non-zero value if a Python object can be converted to an
@@ -4195,18 +4360,20 @@ instance of a C structure or C++ class.  &lt;em&gt;obj&lt;/em&gt; is the Python object.
 &lt;em&gt;type&lt;/em&gt; is the generated type corresponding to the C/C++ type being checked.
 &lt;em&gt;flags&lt;/em&gt; is any combination of the following values used to fine tune the
 check.&lt;/p&gt;
-&lt;blockquote class=&quot;last&quot;&gt;
+&lt;blockquote&gt;
 &lt;ul class=&quot;simple&quot;&gt;
 &lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;SIP_NOT_NONE&lt;/span&gt;&lt;/tt&gt; causes the check to fail if &lt;em&gt;obj&lt;/em&gt; is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;None&lt;/span&gt;&lt;/tt&gt;.&lt;/li&gt;
 &lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;SIP_NO_CONVERTORS&lt;/span&gt;&lt;/tt&gt; suppresses the use of of any
 &lt;a class=&quot;reference&quot; href=&quot;#converttotypecode&quot;&gt;%ConvertToTypeCode&lt;/a&gt; for &lt;em&gt;type&lt;/em&gt;.&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/blockquote&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use
+&lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttotype&quot;&gt;sipCanConvertToType()&lt;/a&gt;.&lt;/p&gt;
 &lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id178&quot; id=&quot;sipcanconverttomappedtype&quot; name=&quot;sipcanconverttomappedtype&quot;&gt;9.13&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCanConvertToMappedType()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id185&quot; id=&quot;sipcanconverttomappedtype&quot; name=&quot;sipcanconverttomappedtype&quot;&gt;9.13&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCanConvertToMappedType()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;int sipCanConvertToMappedType(PyObject *obj, const sipMappedType *mt, int flags)&lt;/dt&gt;
 &lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This returns a non-zero value if a Python object can be converted to an
@@ -4214,40 +4381,50 @@ instance of a C structure or C++ class which has been implemented as a
 mapped type.  &lt;em&gt;obj&lt;/em&gt; is the Python object.  &lt;em&gt;mt&lt;/em&gt; is an opaque structure
 returned by &lt;a class=&quot;reference&quot; href=&quot;#sipfindmappedtype&quot;&gt;sipFindMappedType()&lt;/a&gt;.  &lt;em&gt;flags&lt;/em&gt; is any combination of the
 following values used to fine tune the check.&lt;/p&gt;
-&lt;blockquote class=&quot;last&quot;&gt;
+&lt;blockquote&gt;
 &lt;ul class=&quot;simple&quot;&gt;
 &lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;SIP_NOT_NONE&lt;/span&gt;&lt;/tt&gt; causes the check to fail if &lt;em&gt;obj&lt;/em&gt; is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;None&lt;/span&gt;&lt;/tt&gt;.&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/blockquote&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use
+&lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttotype&quot;&gt;sipCanConvertToType()&lt;/a&gt;.&lt;/p&gt;
 &lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id179&quot; id=&quot;sipclassname&quot; name=&quot;sipclassname&quot;&gt;9.14&amp;nbsp;&amp;nbsp;&amp;nbsp;sipClassName()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id186&quot; id=&quot;sipcanconverttotype&quot; name=&quot;sipcanconverttotype&quot;&gt;9.14&amp;nbsp;&amp;nbsp;&amp;nbsp;sipCanConvertToType()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
-&lt;dt&gt;PyObject *sipClassName(PyObject *obj)&lt;/dt&gt;
-&lt;dd&gt;This returns the class name of a wrapped instance as a Python string.  It
-comes with a reference.&lt;/dd&gt;
+&lt;dt&gt;int sipCanConvertToType(PyObject *obj, const sipTypeDef *td, int flags)&lt;/dt&gt;
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This returns a non-zero value if a Python object can be converted to an
+instance of a C structure, C++ class or mapped type.  &lt;em&gt;obj&lt;/em&gt; is the Python
+object.  &lt;em&gt;td&lt;/em&gt; is the generated type structure corresponding to the C/C++
+type being checked.  &lt;em&gt;flags&lt;/em&gt; is any combination of the following values
+used to fine tune the check.&lt;/p&gt;
+&lt;blockquote class=&quot;last&quot;&gt;
+&lt;ul class=&quot;simple&quot;&gt;
+&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;SIP_NOT_NONE&lt;/span&gt;&lt;/tt&gt; causes the check to fail if &lt;em&gt;obj&lt;/em&gt; is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;None&lt;/span&gt;&lt;/tt&gt;.&lt;/li&gt;
+&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;SIP_NO_CONVERTORS&lt;/span&gt;&lt;/tt&gt; suppresses the use of of any
+&lt;a class=&quot;reference&quot; href=&quot;#converttotypecode&quot;&gt;%ConvertToTypeCode&lt;/a&gt; for &lt;em&gt;td&lt;/em&gt;.  It is ignored for mapped types.&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/blockquote&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id180&quot; id=&quot;sipconnectrx&quot; name=&quot;sipconnectrx&quot;&gt;9.15&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConnectRx()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id187&quot; id=&quot;sipclassname&quot; name=&quot;sipclassname&quot;&gt;9.15&amp;nbsp;&amp;nbsp;&amp;nbsp;sipClassName()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
-&lt;dt&gt;PyObject *sipConnectRx(PyObject *sender, const char *signal, PyObject *receiver, const char *slot, int type)&lt;/dt&gt;
-&lt;dd&gt;This connects a signal to a signal or slot and returns &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_True&lt;/span&gt;&lt;/tt&gt; if the
-signal was connected or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_False&lt;/span&gt;&lt;/tt&gt; if not.  If there was some other
-error then a Python exception is raised and &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; is returned.  &lt;em&gt;sender&lt;/em&gt;
-is the wrapped &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt;&lt;/tt&gt; derived instance that emits the signal.
-&lt;em&gt;signal&lt;/em&gt; is the typed name of the signal.  &lt;em&gt;receiver&lt;/em&gt; is the wrapped
-&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt;&lt;/tt&gt; derived instance or Python callable that the signal is
-connected to.  &lt;em&gt;slot&lt;/em&gt; is the typed name of the slot, or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; if
-&lt;em&gt;receiver&lt;/em&gt; is a Python callable.  &lt;em&gt;type&lt;/em&gt; is the type of connection and is
-cast from Qt::ConnectionType.  It is normally only used by PyQt to
-implement &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject.connect()&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
+&lt;dt&gt;PyObject *sipClassName(PyObject *obj)&lt;/dt&gt;
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This returns the class name of a wrapped instance as a Python string.  It
+comes with a reference.&lt;/p&gt;
+&lt;p&gt;This is deprecated from SIP v4.8.  Instead you should use the following:&lt;/p&gt;
+&lt;pre class=&quot;last literal-block&quot;&gt;
+PyString_FromString(obj-&amp;gt;ob_type-&amp;gt;tp_name)
+&lt;/pre&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id181&quot; id=&quot;sipconvertfromconstvoidptr&quot; name=&quot;sipconvertfromconstvoidptr&quot;&gt;9.16&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromConstVoidPtr()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id188&quot; id=&quot;sipconvertfromconstvoidptr&quot; name=&quot;sipconvertfromconstvoidptr&quot;&gt;9.16&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromConstVoidPtr()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;PyObject *sipConvertFromConstVoidPtr(const void *cpp)&lt;/dt&gt;
 &lt;dd&gt;This creates a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.voidptr&lt;/span&gt;&lt;/tt&gt; object for a memory address.  The object
@@ -4256,7 +4433,7 @@ address.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id182&quot; id=&quot;sipconvertfromconstvoidptrandsize&quot; name=&quot;sipconvertfromconstvoidptrandsize&quot;&gt;9.17&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromConstVoidPtrAndSize()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id189&quot; id=&quot;sipconvertfromconstvoidptrandsize&quot; name=&quot;sipconvertfromconstvoidptrandsize&quot;&gt;9.17&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromConstVoidPtrAndSize()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;PyObject *sipConvertFromConstVoidPtrAndSize(const void *cpp, SIP_SSIZE_T size)&lt;/dt&gt;
 &lt;dd&gt;This creates a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.voidptr&lt;/span&gt;&lt;/tt&gt; object for a memory address.  The object
@@ -4266,10 +4443,20 @@ object.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id183&quot; id=&quot;sipconvertfrominstance&quot; name=&quot;sipconvertfrominstance&quot;&gt;9.18&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromInstance()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id190&quot; id=&quot;sipconvertfromenum&quot; name=&quot;sipconvertfromenum&quot;&gt;9.18&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromEnum()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;PyObject *sipConvertFromEnum(int eval, const sipTypeDef *td)&lt;/dt&gt;
+&lt;dd&gt;This converts a named C/C++ &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;enum&lt;/span&gt;&lt;/tt&gt; to an instance of the corresponding
+generated Python named enum type.  &lt;em&gt;eval&lt;/em&gt; is the enumerated value to
+convert.  &lt;em&gt;td&lt;/em&gt; is the generated Python type structure (see &lt;a class=&quot;reference&quot; href=&quot;#generated-type-structures&quot;&gt;Generated Type
+Structures&lt;/a&gt;).&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id191&quot; id=&quot;sipconvertfrominstance&quot; name=&quot;sipconvertfrominstance&quot;&gt;9.19&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromInstance()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;PyObject *sipConvertFromInstance(void *cpp, sipWrapperType *type, PyObject *transferObj)&lt;/dt&gt;
-&lt;dd&gt;This converts a C structure or a C++ class instance to a Python class
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This converts a C structure or a C++ class instance to a Python class
 instance object.  &lt;em&gt;cpp&lt;/em&gt; is the C/C++ instance.  If the instance has already
 been wrapped then the result is a new reference to the existing instance
 object.  &lt;em&gt;type&lt;/em&gt; is the generated type corresponding to the C/C++ type.
@@ -4282,48 +4469,73 @@ with C/C++.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/sp
 via a call to &lt;a class=&quot;reference&quot; href=&quot;#siptransferback&quot;&gt;sipTransferBack()&lt;/a&gt;.  Otherwise ownership is transferred to
 C/C++ and the instance associated with &lt;em&gt;transferObj&lt;/em&gt; via a call to
 &lt;a class=&quot;reference&quot; href=&quot;#siptransferto&quot;&gt;sipTransferTo()&lt;/a&gt;.  The Python class is influenced by any applicable
-&lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code.&lt;/dd&gt;
+&lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use
+&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromtype&quot;&gt;sipConvertFromType()&lt;/a&gt;.&lt;/p&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id184&quot; id=&quot;sipconvertfrommappedtype&quot; name=&quot;sipconvertfrommappedtype&quot;&gt;9.19&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromMappedType()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id192&quot; id=&quot;sipconvertfrommappedtype&quot; name=&quot;sipconvertfrommappedtype&quot;&gt;9.20&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromMappedType()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;PyObject *sipConvertFromMappedType(void *cpp, const sipMappedType *mt, PyObject *transferObj)&lt;/dt&gt;
-&lt;dd&gt;This converts a C structure or a C++ class instance wrapped as a mapped
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This converts a C structure or a C++ class instance wrapped as a mapped
 type to a Python object.  &lt;em&gt;cpp&lt;/em&gt; is the C/C++ instance.  &lt;em&gt;mt&lt;/em&gt; is the opaque
 structure returned by &lt;a class=&quot;reference&quot; href=&quot;#sipfindmappedtype&quot;&gt;sipFindMappedType()&lt;/a&gt;.  &lt;em&gt;transferObj&lt;/em&gt; controls any
 ownership changes to &lt;em&gt;obj&lt;/em&gt;.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then the ownership is
 unchanged.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; then ownership is transferred to Python
 via a call to &lt;a class=&quot;reference&quot; href=&quot;#siptransferback&quot;&gt;sipTransferBack()&lt;/a&gt;.  Otherwise ownership is transferred to
 C/C++ and the instance associated with the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt; argument via a
-call to &lt;a class=&quot;reference&quot; href=&quot;#siptransferto&quot;&gt;sipTransferTo()&lt;/a&gt;.&lt;/dd&gt;
+call to &lt;a class=&quot;reference&quot; href=&quot;#siptransferto&quot;&gt;sipTransferTo()&lt;/a&gt;.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use
+&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromtype&quot;&gt;sipConvertFromType()&lt;/a&gt;.&lt;/p&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id185&quot; id=&quot;sipconvertfromnamedenum&quot; name=&quot;sipconvertfromnamedenum&quot;&gt;9.20&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromNamedEnum()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id193&quot; id=&quot;sipconvertfromnamedenum&quot; name=&quot;sipconvertfromnamedenum&quot;&gt;9.21&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromNamedEnum()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;PyObject *sipConvertFromNamedEnum(int eval, PyTypeObject *type)&lt;/dt&gt;
-&lt;dd&gt;This converts a named C/C++ &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;enum&lt;/span&gt;&lt;/tt&gt; to an instance of the corresponding
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This converts a named C/C++ &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;enum&lt;/span&gt;&lt;/tt&gt; to an instance of the corresponding
 Python named enum type.  &lt;em&gt;eval&lt;/em&gt; is the enumerated value to convert.  &lt;em&gt;type&lt;/em&gt;
 is the generated Python type object (see &lt;a class=&quot;reference&quot; href=&quot;#generated-named-enum-type-objects&quot;&gt;Generated Named Enum Type
-Objects&lt;/a&gt;).&lt;/dd&gt;
+Objects&lt;/a&gt;).&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use
+&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromenum&quot;&gt;sipConvertFromEnum()&lt;/a&gt;.&lt;/p&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id186&quot; id=&quot;sipconvertfromnewinstance&quot; name=&quot;sipconvertfromnewinstance&quot;&gt;9.21&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromNewInstance()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id194&quot; id=&quot;sipconvertfromnewinstance&quot; name=&quot;sipconvertfromnewinstance&quot;&gt;9.22&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromNewInstance()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;PyObject *sipConvertFromNewInstance(void *cpp, sipWrapperType *type, PyObject *transferObj)&lt;/dt&gt;
-&lt;dd&gt;This converts a new C structure or a new C++ class instance to a Python
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This converts a new C structure or a new C++ class instance to a Python
 class instance object.  &lt;em&gt;cpp&lt;/em&gt; is the C/C++ instance.  &lt;em&gt;type&lt;/em&gt; is the
 generated type corresponding to the C/C++ type.  &lt;em&gt;transferObj&lt;/em&gt; controls the
 ownership of the returned value.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; then
 ownership will be with Python.  Otherwise ownership will be with C/C++ and
 the instance associated with &lt;em&gt;transferObj&lt;/em&gt;.  The Python class is influenced
+by any applicable &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use
+&lt;a class=&quot;reference&quot; href=&quot;#sipconvertfromnewtype&quot;&gt;sipConvertFromNewType()&lt;/a&gt;.&lt;/p&gt;
+&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id195&quot; id=&quot;sipconvertfromnewtype&quot; name=&quot;sipconvertfromnewtype&quot;&gt;9.23&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromNewType()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;PyObject *sipConvertFromNewType(void *cpp, const sipTypeDef *td, PyObject *transferObj)&lt;/dt&gt;
+&lt;dd&gt;This converts a new C structure, C++ class or mapped type instance to a
+Python object.  &lt;em&gt;cpp&lt;/em&gt; is the C/C++ instance.  &lt;em&gt;td&lt;/em&gt; is the generated type
+structure corresponding to the C/C++ type.  &lt;em&gt;transferObj&lt;/em&gt; controls the
+ownership of the returned value.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; then
+ownership will be with Python.  Otherwise ownership will be with C/C++ and
+the instance associated with &lt;em&gt;transferObj&lt;/em&gt;.  The Python class is influenced
 by any applicable &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id187&quot; id=&quot;sipconvertfromsequenceindex&quot; name=&quot;sipconvertfromsequenceindex&quot;&gt;9.22&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromSequenceIndex()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id196&quot; id=&quot;sipconvertfromsequenceindex&quot; name=&quot;sipconvertfromsequenceindex&quot;&gt;9.24&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromSequenceIndex()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;SIP_SSIZE_T sipConvertFromSequenceIndex(SIP_SSIZE_T idx, SIP_SSIZE_T len)&lt;/dt&gt;
 &lt;dd&gt;This converts a Python sequence index (i.e. where a negative value refers
@@ -4334,7 +4546,7 @@ arguments have type &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;int&lt;/span&gt;&lt;/t
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id188&quot; id=&quot;sipconvertfromsliceobject&quot; name=&quot;sipconvertfromsliceobject&quot;&gt;9.23&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromSliceObject()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id197&quot; id=&quot;sipconvertfromsliceobject&quot; name=&quot;sipconvertfromsliceobject&quot;&gt;9.25&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromSliceObject()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;int sipConvertFromSliceObject(PyObject *slice, SIP_SSIZE_T length, SIP_SSIZE_T *start, SIP_SSIZE_T *stop, SIP_SSIZE_T *step, SIP_SSIZE_T *slicelength)&lt;/dt&gt;
 &lt;dd&gt;This is a thin wrapper around the Python &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PySlice_GetIndicesEx()&lt;/span&gt;&lt;/tt&gt;
@@ -4343,7 +4555,27 @@ compatible with SIP v3.x and versions of Python earlier that v2.3.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id189&quot; id=&quot;sipconvertfromvoidptr&quot; name=&quot;sipconvertfromvoidptr&quot;&gt;9.24&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromVoidPtr()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id198&quot; id=&quot;sipconvertfromtype&quot; name=&quot;sipconvertfromtype&quot;&gt;9.26&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromType()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;PyObject *sipConvertFromType(void *cpp, const sipTypeDef *td, PyObject *transferObj)&lt;/dt&gt;
+&lt;dd&gt;This converts a C structure, a C++ class instance or a mapped type to a
+Python object.  &lt;em&gt;cpp&lt;/em&gt; is the C/C++ instance.  If the instance has already
+been wrapped then the result is a new reference to the existing object.
+&lt;em&gt;td&lt;/em&gt; is the generated type structure corresponding to the C/C++ type.
+&lt;em&gt;transferObj&lt;/em&gt; controls the ownership of the returned value.  If the
+structure or class instance has already been wrapped then the result is a
+new reference to the existing object.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; and the instance
+has already been wrapped then the ownership is unchanged.  If it is
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; and the instance is newly wrapped then ownership will be with
+C/C++.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; then ownership is transferred to Python via a
+call to &lt;a class=&quot;reference&quot; href=&quot;#siptransferback&quot;&gt;sipTransferBack()&lt;/a&gt;.  Otherwise ownership is transferred to C/C++
+and the instance associated with &lt;em&gt;transferObj&lt;/em&gt; via a call to
+&lt;a class=&quot;reference&quot; href=&quot;#siptransferto&quot;&gt;sipTransferTo()&lt;/a&gt;.  The Python class is influenced by any applicable
+&lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code.&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id199&quot; id=&quot;sipconvertfromvoidptr&quot; name=&quot;sipconvertfromvoidptr&quot;&gt;9.27&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromVoidPtr()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;PyObject *sipConvertFromVoidPtr(void *cpp)&lt;/dt&gt;
 &lt;dd&gt;This creates a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.voidptr&lt;/span&gt;&lt;/tt&gt; object for a memory address.  The object
@@ -4351,7 +4583,7 @@ will be writeable but has no associated size.  &lt;em&gt;cpp&lt;/em&gt; is the memory addres
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id190&quot; id=&quot;sipconvertfromvoidptrandsize&quot; name=&quot;sipconvertfromvoidptrandsize&quot;&gt;9.25&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromVoidPtrAndSize()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id200&quot; id=&quot;sipconvertfromvoidptrandsize&quot; name=&quot;sipconvertfromvoidptrandsize&quot;&gt;9.28&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertFromVoidPtrAndSize()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;PyObject *sipConvertFromVoidPtrAndSize(void *cpp, SIP_SSIZE_T size)&lt;/dt&gt;
 &lt;dd&gt;This creates a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.voidptr&lt;/span&gt;&lt;/tt&gt; object for a memory address.  The object
@@ -4361,18 +4593,7 @@ object.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id191&quot; id=&quot;sipconverttocpp&quot; name=&quot;sipconverttocpp&quot;&gt;9.26&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToCpp()&lt;/a&gt;&lt;/h2&gt;
-&lt;dl class=&quot;docutils&quot;&gt;
-&lt;dt&gt;void *sipConvertToCpp(PyObject *obj, sipWrapperType *type, int *iserr)&lt;/dt&gt;
-&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This function is deprecated from SIP v4.4.  It is equivalent to:&lt;/p&gt;
-&lt;pre class=&quot;last literal-block&quot;&gt;
-sipConvertToInstance(obj, type, NULL, SIP_NO_CONVERTORS, NULL, iserr);
-&lt;/pre&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;
-&lt;/div&gt;
-&lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id192&quot; id=&quot;sipconverttoinstance&quot; name=&quot;sipconverttoinstance&quot;&gt;9.27&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToInstance()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id201&quot; id=&quot;sipconverttoinstance&quot; name=&quot;sipconverttoinstance&quot;&gt;9.29&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToInstance()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void *sipConvertToInstance(PyObject *obj, sipWrapperType *type, PyObject *transferObj, int flags, int *state, int *iserr)&lt;/dt&gt;
 &lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This converts a Python object to an instance of a C structure or C++ class
@@ -4393,7 +4614,7 @@ check.&lt;/p&gt;
 &lt;a class=&quot;reference&quot; href=&quot;#converttotypecode&quot;&gt;%ConvertToTypeCode&lt;/a&gt; for &lt;em&gt;type&lt;/em&gt;.&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/blockquote&gt;
-&lt;p class=&quot;last&quot;&gt;If &lt;em&gt;state&lt;/em&gt; is not &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then the location it points to is set to
+&lt;p&gt;If &lt;em&gt;state&lt;/em&gt; is not &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then the location it points to is set to
 describe the state of the returned C/C++ instance and is the value returned
 by any &lt;a class=&quot;reference&quot; href=&quot;#converttotypecode&quot;&gt;%ConvertToTypeCode&lt;/a&gt;.  The calling code must then release the value
 at some point to prevent a memory leak by calling &lt;a class=&quot;reference&quot; href=&quot;#sipreleaseinstance&quot;&gt;sipReleaseInstance()&lt;/a&gt;.
@@ -4402,11 +4623,13 @@ non-zero value.  If it was initially a non-zero value then the conversion
 isn't attempted in the first place.  (This allows several calls to be made
 that share the same error flag so that it only needs to be tested once
 rather than after each call.)&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use
+&lt;a class=&quot;reference&quot; href=&quot;#sipconverttotype&quot;&gt;sipConvertToType()&lt;/a&gt;&lt;/p&gt;
 &lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id193&quot; id=&quot;sipconverttomappedtype&quot; name=&quot;sipconverttomappedtype&quot;&gt;9.28&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToMappedType()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id202&quot; id=&quot;sipconverttomappedtype&quot; name=&quot;sipconverttomappedtype&quot;&gt;9.30&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToMappedType()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void *sipConvertToMappedType(PyObject *obj, const sipMappedType *mt, PyObject *transferObj, int flags, int *state, int *iserr)&lt;/dt&gt;
 &lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This converts a Python object to an instance of a C structure or C++
@@ -4424,7 +4647,7 @@ following values used to fine tune the check.&lt;/p&gt;
 &lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;SIP_NOT_NONE&lt;/span&gt;&lt;/tt&gt; causes the check to fail if &lt;em&gt;obj&lt;/em&gt; is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;None&lt;/span&gt;&lt;/tt&gt;.&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/blockquote&gt;
-&lt;p class=&quot;last&quot;&gt;If &lt;em&gt;state&lt;/em&gt; is not &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then the location it points to is set to
+&lt;p&gt;If &lt;em&gt;state&lt;/em&gt; is not &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then the location it points to is set to
 describe the state of the returned C/C++ instance and is the value returned
 by any &lt;a class=&quot;reference&quot; href=&quot;#converttotypecode&quot;&gt;%ConvertToTypeCode&lt;/a&gt;.  The calling code must then release the value
 at some point to prevent a memory leak by calling
@@ -4433,11 +4656,47 @@ points to is set to a non-zero value.  If it was initially a non-zero value
 then the conversion isn't attempted in the first place.  (This allows
 several calls to be made that share the same error flag so that it only
 needs to be tested once rather than after each call.)&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use
+&lt;a class=&quot;reference&quot; href=&quot;#sipconverttotype&quot;&gt;sipConvertToType()&lt;/a&gt;&lt;/p&gt;
+&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id203&quot; id=&quot;sipconverttotype&quot; name=&quot;sipconverttotype&quot;&gt;9.31&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToType()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;void *sipConvertToType(PyObject *obj, const sipTypeDef *td, PyObject *transferObj, int flags, int *state, int *iserr)&lt;/dt&gt;
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This converts a Python object to an instance of a C structure, C++ class or
+mapped type assuming that a previous call to &lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttotype&quot;&gt;sipCanConvertToType()&lt;/a&gt; has
+been successful.  &lt;em&gt;obj&lt;/em&gt; is the Python object.  &lt;em&gt;td&lt;/em&gt; is the generated type
+structure corresponding to the C/C++ type returned.  It may be any class in
+the object's class hierarchy.  &lt;em&gt;transferObj&lt;/em&gt; controls any ownership changes
+to &lt;em&gt;obj&lt;/em&gt;.  If it is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then the ownership is unchanged.  If it is
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; then ownership is transferred to Python via a call to
+&lt;a class=&quot;reference&quot; href=&quot;#siptransferback&quot;&gt;sipTransferBack()&lt;/a&gt;.  Otherwise ownership is transferred to C/C++ and
+&lt;em&gt;obj&lt;/em&gt; associated with &lt;em&gt;transferObj&lt;/em&gt; via a call to &lt;a class=&quot;reference&quot; href=&quot;#siptransferto&quot;&gt;sipTransferTo()&lt;/a&gt;.
+&lt;em&gt;flags&lt;/em&gt; is any combination of the following values used to fine tune the
+check.&lt;/p&gt;
+&lt;blockquote&gt;
+&lt;ul class=&quot;simple&quot;&gt;
+&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;SIP_NOT_NONE&lt;/span&gt;&lt;/tt&gt; causes the check to fail if &lt;em&gt;obj&lt;/em&gt; is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;None&lt;/span&gt;&lt;/tt&gt;.&lt;/li&gt;
+&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;SIP_NO_CONVERTORS&lt;/span&gt;&lt;/tt&gt; suppresses the use of of any
+&lt;a class=&quot;reference&quot; href=&quot;#converttotypecode&quot;&gt;%ConvertToTypeCode&lt;/a&gt; for &lt;em&gt;td&lt;/em&gt;.  It is ignored for mapped types.&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/blockquote&gt;
+&lt;p class=&quot;last&quot;&gt;If &lt;em&gt;state&lt;/em&gt; is not &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then the location it points to is set to
+describe the state of the returned C/C++ instance and is the value returned
+by any &lt;a class=&quot;reference&quot; href=&quot;#converttotypecode&quot;&gt;%ConvertToTypeCode&lt;/a&gt;.  The calling code must then release the value
+at some point to prevent a memory leak by calling &lt;a class=&quot;reference&quot; href=&quot;#sipreleasetype&quot;&gt;sipReleaseType()&lt;/a&gt;.  If
+there is an error then the location &lt;em&gt;iserr&lt;/em&gt; points to is set to a non-zero
+value.  If it was initially a non-zero value then the conversion isn't
+attempted in the first place.  (This allows several calls to be made that
+share the same error flag so that it only needs to be tested once rather
+than after each call.)&lt;/p&gt;
 &lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id194&quot; id=&quot;sipconverttovoidptr&quot; name=&quot;sipconverttovoidptr&quot;&gt;9.29&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToVoidPtr()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id204&quot; id=&quot;sipconverttovoidptr&quot; name=&quot;sipconverttovoidptr&quot;&gt;9.32&amp;nbsp;&amp;nbsp;&amp;nbsp;sipConvertToVoidPtr()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void *sipConvertToVoidPtr(PyObject *obj)&lt;/dt&gt;
 &lt;dd&gt;This converts a Python object to a memory address.  &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;obj&lt;/span&gt;&lt;/tt&gt; may be
@@ -4447,34 +4706,7 @@ was successful.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id195&quot; id=&quot;sipdisconnectrx&quot; name=&quot;sipdisconnectrx&quot;&gt;9.30&amp;nbsp;&amp;nbsp;&amp;nbsp;sipDisconnectRx()&lt;/a&gt;&lt;/h2&gt;
-&lt;dl class=&quot;docutils&quot;&gt;
-&lt;dt&gt;PyObject *sipDisconnectRx(PyObject *sender, const char *signal, PyObject *receiver, const char *slot)&lt;/dt&gt;
-&lt;dd&gt;This disconnects a signal from a signal or slot and returns &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_True&lt;/span&gt;&lt;/tt&gt; if
-the signal was disconnected or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_False&lt;/span&gt;&lt;/tt&gt; if not.  If there was some
-other error then a Python exception is raised and &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; is returned.
-&lt;em&gt;sender&lt;/em&gt; is the wrapped &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt;&lt;/tt&gt; derived instance that emits the signal.
-&lt;em&gt;signal&lt;/em&gt; is the typed name of the signal.  &lt;em&gt;receiver&lt;/em&gt; is the wrapped
-&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt;&lt;/tt&gt; derived instance or Python callable that the signal is
-connected to.  &lt;em&gt;slot&lt;/em&gt; is the typed name of the slot, or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; if
-&lt;em&gt;receiver&lt;/em&gt; is a Python callable.  It is normally only used by PyQt to
-implement &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject.disconnect()&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
-&lt;/dl&gt;
-&lt;/div&gt;
-&lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id196&quot; id=&quot;sipemitsignal&quot; name=&quot;sipemitsignal&quot;&gt;9.31&amp;nbsp;&amp;nbsp;&amp;nbsp;sipEmitSignal()&lt;/a&gt;&lt;/h2&gt;
-&lt;dl class=&quot;docutils&quot;&gt;
-&lt;dt&gt;int sipEmitSignal(PyObject *txobj, const char *signal, PyObject *args)&lt;/dt&gt;
-&lt;dd&gt;This emits a signal and returns zero if there was no error.  If there was
-an error then a Python exception is raised and a negative value is
-returned.  &lt;em&gt;txobj&lt;/em&gt; is the wrapped &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt;&lt;/tt&gt; derived instance that emits
-the signal.  &lt;em&gt;signal&lt;/em&gt; is the typed name of the signal.  &lt;em&gt;args&lt;/em&gt; is a Python
-tuple of the signal arguments.  It is normally only used by PyQt to
-implement &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject.emit()&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
-&lt;/dl&gt;
-&lt;/div&gt;
-&lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id197&quot; id=&quot;sipexportsymbol&quot; name=&quot;sipexportsymbol&quot;&gt;9.32&amp;nbsp;&amp;nbsp;&amp;nbsp;sipExportSymbol()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id205&quot; id=&quot;sipexportsymbol&quot; name=&quot;sipexportsymbol&quot;&gt;9.33&amp;nbsp;&amp;nbsp;&amp;nbsp;sipExportSymbol()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;int sipExportSymbol(const char *name, void *sym)&lt;/dt&gt;
 &lt;dd&gt;Python does not allow extension modules to directly access symbols in
@@ -4486,58 +4718,90 @@ already associated with a symbol or there was some other error.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id198&quot; id=&quot;sipfindclass&quot; name=&quot;sipfindclass&quot;&gt;9.33&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindClass()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id206&quot; id=&quot;sipfindclass&quot; name=&quot;sipfindclass&quot;&gt;9.34&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindClass()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;sipWrapperType *sipFindClass(const char *type)&lt;/dt&gt;
-&lt;dd&gt;This returns a pointer to the generated type corresponding to a C/C++ type.
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This returns a pointer to the generated type corresponding to a C/C++ type.
 &lt;em&gt;type&lt;/em&gt; is the C/C++ declaration of the type.  &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; is returned if the
 C/C++ type doesn't exist.  The value of the pointer will not change and
-may be saved in a static cache.&lt;/dd&gt;
+may be saved in a static cache.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use &lt;a class=&quot;reference&quot; href=&quot;#sipfindtype&quot;&gt;sipFindType()&lt;/a&gt;.&lt;/p&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id199&quot; id=&quot;sipfindmappedtype&quot; name=&quot;sipfindmappedtype&quot;&gt;9.34&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindMappedType()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id207&quot; id=&quot;sipfindmappedtype&quot; name=&quot;sipfindmappedtype&quot;&gt;9.35&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindMappedType()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;const sipMappedType *sipFindMappedType(const char *type)&lt;/dt&gt;
-&lt;dd&gt;This returns a pointer to an opaque structure describing a mapped type.
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This returns a pointer to an opaque structure describing a mapped type.
 &lt;em&gt;type&lt;/em&gt; is the C/C++ declaration of the type.  &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; is returned if the
 mapped type doesn't exist.  The value of the pointer will not change and
-may be saved in a static cache.&lt;/dd&gt;
+may be saved in a static cache.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use &lt;a class=&quot;reference&quot; href=&quot;#sipfindtype&quot;&gt;sipFindType()&lt;/a&gt;.&lt;/p&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id200&quot; id=&quot;sipfindnamedenum&quot; name=&quot;sipfindnamedenum&quot;&gt;9.35&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindNamedEnum()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id208&quot; id=&quot;sipfindnamedenum&quot; name=&quot;sipfindnamedenum&quot;&gt;9.36&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindNamedEnum()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;PyTypeObject *sipFindNamedEnum(const char *type)&lt;/dt&gt;
-&lt;dd&gt;This returns a pointer to the generated type corresponding to a named C/C++
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This returns a pointer to the generated type corresponding to a named C/C++
 enum.  &lt;em&gt;type&lt;/em&gt; is the C/C++ declaration of the enum.  &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; is returned
 if the named C/C++ enum doesn't exist.  The value of the pointer will not
+change and may be saved in a static cache.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use &lt;a class=&quot;reference&quot; href=&quot;#sipfindtype&quot;&gt;sipFindType()&lt;/a&gt;.&lt;/p&gt;
+&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id209&quot; id=&quot;sipfindtype&quot; name=&quot;sipfindtype&quot;&gt;9.37&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFindType()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;const sipTypeDef *sipFindType(const char *type)&lt;/dt&gt;
+&lt;dd&gt;This returns a pointer to the SIP generated type structure corresponding to
+a C/C++ type.  &lt;em&gt;type&lt;/em&gt; is the C/C++ declaration of the type.  NULL is
+returned if the type doesn't exist.  The value of the pointer will not
 change and may be saved in a static cache.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id201&quot; id=&quot;sipforceconverttoinstance&quot; name=&quot;sipforceconverttoinstance&quot;&gt;9.36&amp;nbsp;&amp;nbsp;&amp;nbsp;sipForceConvertToInstance()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id210&quot; id=&quot;sipforceconverttoinstance&quot; name=&quot;sipforceconverttoinstance&quot;&gt;9.38&amp;nbsp;&amp;nbsp;&amp;nbsp;sipForceConvertToInstance()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void *sipForceConvertToInstance(PyObject *obj, sipWrapperType *type, PyObject *transferObj, int flags, int *state, int *iserr)&lt;/dt&gt;
-&lt;dd&gt;This converts a Python object to an instance of a C structure or C++ class
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This converts a Python object to an instance of a C structure or C++ class
 by calling &lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttoinstance&quot;&gt;sipCanConvertToInstance()&lt;/a&gt; and, if it is successfull, calling
 &lt;a class=&quot;reference&quot; href=&quot;#sipconverttoinstance&quot;&gt;sipConvertToInstance()&lt;/a&gt;.  See &lt;a class=&quot;reference&quot; href=&quot;#sipconverttoinstance&quot;&gt;sipConvertToInstance()&lt;/a&gt; for a full
-description of the arguments.&lt;/dd&gt;
+description of the arguments.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use
+&lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttotype&quot;&gt;sipForceConvertToType()&lt;/a&gt;.&lt;/p&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id202&quot; id=&quot;sipforceconverttomappedtype&quot; name=&quot;sipforceconverttomappedtype&quot;&gt;9.37&amp;nbsp;&amp;nbsp;&amp;nbsp;sipForceConvertToMappedType()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id211&quot; id=&quot;sipforceconverttomappedtype&quot; name=&quot;sipforceconverttomappedtype&quot;&gt;9.39&amp;nbsp;&amp;nbsp;&amp;nbsp;sipForceConvertToMappedType()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void *sipForceConvertToMappedType(PyObject *obj, const sipMappedType *mt, PyObject *transferObj, int flags, int *state, int *iserr)&lt;/dt&gt;
-&lt;dd&gt;This converts a Python object to an instance of a C structure or C++ class
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This converts a Python object to an instance of a C structure or C++ class
 which has been implemented as a mapped type by calling
 &lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttomappedtype&quot;&gt;sipCanConvertToMappedType()&lt;/a&gt; and, if it is successfull, calling
 &lt;a class=&quot;reference&quot; href=&quot;#sipconverttomappedtype&quot;&gt;sipConvertToMappedType()&lt;/a&gt;.  See &lt;a class=&quot;reference&quot; href=&quot;#sipconverttomappedtype&quot;&gt;sipConvertToMappedType()&lt;/a&gt; for a full
+description of the arguments.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use
+&lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttotype&quot;&gt;sipForceConvertToType()&lt;/a&gt;.&lt;/p&gt;
+&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id212&quot; id=&quot;sipforceconverttotype&quot; name=&quot;sipforceconverttotype&quot;&gt;9.40&amp;nbsp;&amp;nbsp;&amp;nbsp;sipForceConvertToType()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;void *sipForceConvertToType(PyObject *obj, const sipTypeDef *td, PyObject *transferObj, int flags, int *state, int *iserr)&lt;/dt&gt;
+&lt;dd&gt;This converts a Python object to an instance of a C structure, C++ class or
+mapped type by calling &lt;a class=&quot;reference&quot; href=&quot;#sipcanconverttotype&quot;&gt;sipCanConvertToType()&lt;/a&gt; and, if it is successfull,
+calling &lt;a class=&quot;reference&quot; href=&quot;#sipconverttotype&quot;&gt;sipConvertToType()&lt;/a&gt;.  See &lt;a class=&quot;reference&quot; href=&quot;#sipconverttotype&quot;&gt;sipConvertToType()&lt;/a&gt; for a full
 description of the arguments.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id203&quot; id=&quot;sipfree&quot; name=&quot;sipfree&quot;&gt;9.38&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFree()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id213&quot; id=&quot;sipfree&quot; name=&quot;sipfree&quot;&gt;9.41&amp;nbsp;&amp;nbsp;&amp;nbsp;sipFree()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void sipFree(void *mem)&lt;/dt&gt;
 &lt;dd&gt;This returns an area of memory allocated by &lt;a class=&quot;reference&quot; href=&quot;#sipmalloc&quot;&gt;sipMalloc()&lt;/a&gt; to the heap.
@@ -4545,27 +4809,32 @@ description of the arguments.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id204&quot; id=&quot;sipgetsender&quot; name=&quot;sipgetsender&quot;&gt;9.39&amp;nbsp;&amp;nbsp;&amp;nbsp;sipGetSender()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id214&quot; id=&quot;sipgetpyobject&quot; name=&quot;sipgetpyobject&quot;&gt;9.42&amp;nbsp;&amp;nbsp;&amp;nbsp;sipGetPyObject()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
-&lt;dt&gt;const void *sipGetSender()&lt;/dt&gt;
-&lt;dd&gt;This returns a pointer to the last &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject&lt;/span&gt;&lt;/tt&gt; instance that emitted a Qt
-signal.  It is normally only used by PyQt to implement
-&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;QObject.sender()&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
+&lt;dt&gt;PyObject *sipGetPyObject(void *cppptr, const sipTypeDef *td)&lt;/dt&gt;
+&lt;dd&gt;This returns a borrowed reference to the Python object for a C structure or
+C++ class instance.  If the structure or class instance hasn't been wrapped
+then &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; is returned (and no Python exception is raised).  &lt;em&gt;cppptr&lt;/em&gt; is
+the pointer to the structure or class instance.  &lt;em&gt;td&lt;/em&gt; is the generated type
+structure corresponding to the C/C++ type.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id205&quot; id=&quot;sipgetwrapper&quot; name=&quot;sipgetwrapper&quot;&gt;9.40&amp;nbsp;&amp;nbsp;&amp;nbsp;sipGetWrapper()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id215&quot; id=&quot;sipgetwrapper&quot; name=&quot;sipgetwrapper&quot;&gt;9.43&amp;nbsp;&amp;nbsp;&amp;nbsp;sipGetWrapper()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;PyObject *sipGetWrapper(void *cppptr, sipWrapperType *type)&lt;/dt&gt;
-&lt;dd&gt;This returns a borrowed reference to the wrapped instance object for a C
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This returns a borrowed reference to the wrapped instance object for a C
 structure or C++ class instance.  If the structure or class instance
 hasn't been wrapped then &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; is returned (and no Python exception is
 raised).  &lt;em&gt;cppptr&lt;/em&gt; is the pointer to the structure or class instance.
-&lt;em&gt;type&lt;/em&gt; is the generated type corresponding to the C/C++ type.&lt;/dd&gt;
+&lt;em&gt;type&lt;/em&gt; is the generated type corresponding to the C/C++ type.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use
+&lt;a class=&quot;reference&quot; href=&quot;#sipgetpyobject&quot;&gt;sipGetPyObject()&lt;/a&gt;.&lt;/p&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id206&quot; id=&quot;sipimportsymbol&quot; name=&quot;sipimportsymbol&quot;&gt;9.41&amp;nbsp;&amp;nbsp;&amp;nbsp;sipImportSymbol()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id216&quot; id=&quot;sipimportsymbol&quot; name=&quot;sipimportsymbol&quot;&gt;9.44&amp;nbsp;&amp;nbsp;&amp;nbsp;sipImportSymbol()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void *sipImportSymbol(const char *name)&lt;/dt&gt;
 &lt;dd&gt;Python does not allow extension modules to directly access symbols in
@@ -4577,7 +4846,7 @@ symbol.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id207&quot; id=&quot;sipinttypeclassmap&quot; name=&quot;sipinttypeclassmap&quot;&gt;9.42&amp;nbsp;&amp;nbsp;&amp;nbsp;sipIntTypeClassMap&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id217&quot; id=&quot;sipinttypeclassmap&quot; name=&quot;sipinttypeclassmap&quot;&gt;9.45&amp;nbsp;&amp;nbsp;&amp;nbsp;sipIntTypeClassMap&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;This C structure is used with &lt;a class=&quot;reference&quot; href=&quot;#sipmapinttoclass&quot;&gt;sipMapIntToClass()&lt;/a&gt; to define a mapping
 between integer based RTTI and &lt;a class=&quot;reference&quot; href=&quot;#generated-type-objects&quot;&gt;generated type objects&lt;/a&gt;.  The structure
 elements are as follows.&lt;/p&gt;
@@ -4587,20 +4856,10 @@ elements are as follows.&lt;/p&gt;
 &lt;dt&gt;sipWrapperType **pyType.&lt;/dt&gt;
 &lt;dd&gt;A pointer to the corresponding Python type object.&lt;/dd&gt;
 &lt;/dl&gt;
+&lt;p&gt;This is deprecated from SIP v4.8.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id208&quot; id=&quot;sipissubclassinstance&quot; name=&quot;sipissubclassinstance&quot;&gt;9.43&amp;nbsp;&amp;nbsp;&amp;nbsp;sipIsSubClassInstance()&lt;/a&gt;&lt;/h2&gt;
-&lt;dl class=&quot;docutils&quot;&gt;
-&lt;dt&gt;int sipIsSubClassInstance(PyObject *obj, sipWrapperType *type)&lt;/dt&gt;
-&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This function is deprecated from SIP v4.4.  It is equivalent to:&lt;/p&gt;
-&lt;pre class=&quot;last literal-block&quot;&gt;
-sipCanConvertToInstance(obj, type, SIP_NOT_NONE | SIP_NO_CONVERTORS);
-&lt;/pre&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;
-&lt;/div&gt;
-&lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id209&quot; id=&quot;siplong-asunsignedlong&quot; name=&quot;siplong-asunsignedlong&quot;&gt;9.44&amp;nbsp;&amp;nbsp;&amp;nbsp;sipLong_AsUnsignedLong()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id218&quot; id=&quot;siplong-asunsignedlong&quot; name=&quot;siplong-asunsignedlong&quot;&gt;9.46&amp;nbsp;&amp;nbsp;&amp;nbsp;sipLong_AsUnsignedLong()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;unsigned long sipLong_AsUnsignedLong(PyObject *obj)&lt;/dt&gt;
 &lt;dd&gt;This function is a thin wrapper around PyLong_AsUnsignedLong() that works
@@ -4608,7 +4867,7 @@ around a bug in Python v2.3.x and earlier when converting integer objects.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id210&quot; id=&quot;sipmalloc&quot; name=&quot;sipmalloc&quot;&gt;9.45&amp;nbsp;&amp;nbsp;&amp;nbsp;sipMalloc()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id219&quot; id=&quot;sipmalloc&quot; name=&quot;sipmalloc&quot;&gt;9.47&amp;nbsp;&amp;nbsp;&amp;nbsp;sipMalloc()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void *sipMalloc(size_t nbytes)&lt;/dt&gt;
 &lt;dd&gt;This allocates an area of memory of size &lt;em&gt;nytes&lt;/em&gt; on the heap using the
@@ -4617,33 +4876,37 @@ returned and a Python exception raised.  See &lt;a class=&quot;reference&quot; href=&quot;#sipfree
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id211&quot; id=&quot;sipmapinttoclass&quot; name=&quot;sipmapinttoclass&quot;&gt;9.46&amp;nbsp;&amp;nbsp;&amp;nbsp;sipMapIntToClass()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id220&quot; id=&quot;sipmapinttoclass&quot; name=&quot;sipmapinttoclass&quot;&gt;9.48&amp;nbsp;&amp;nbsp;&amp;nbsp;sipMapIntToClass()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;sipWrapperType *sipMapIntToClass(int type, const sipIntTypeClassMap *map, int maplen)&lt;/dt&gt;
-&lt;dd&gt;This is used in &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code as a convenient way of
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This is used in &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code as a convenient way of
 converting integer based RTTI to the corresponding Python type object.
 &lt;em&gt;type&lt;/em&gt; is the RTTI.  &lt;em&gt;map&lt;/em&gt; is the table of known RTTI and the corresponding
 type objects (see &lt;a class=&quot;reference&quot; href=&quot;#sipinttypeclassmap&quot;&gt;sipIntTypeClassMap&lt;/a&gt;).  The entries in the table must be
 sorted in ascending order of RTTI.  &lt;em&gt;maplen&lt;/em&gt; is the number of entries in
 the table.  The corresponding Python type object is returned, or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt;
-if &lt;em&gt;type&lt;/em&gt; wasn't in &lt;em&gt;map&lt;/em&gt;.&lt;/dd&gt;
+if &lt;em&gt;type&lt;/em&gt; wasn't in &lt;em&gt;map&lt;/em&gt;.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.&lt;/p&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id212&quot; id=&quot;sipmapstringtoclass&quot; name=&quot;sipmapstringtoclass&quot;&gt;9.47&amp;nbsp;&amp;nbsp;&amp;nbsp;sipMapStringToClass()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id221&quot; id=&quot;sipmapstringtoclass&quot; name=&quot;sipmapstringtoclass&quot;&gt;9.49&amp;nbsp;&amp;nbsp;&amp;nbsp;sipMapStringToClass()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;sipWrapperType *sipMapStringToClass(char *type, const sipStringTypeClassMap *map, int maplen)&lt;/dt&gt;
-&lt;dd&gt;This is used in &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code as a convenient way of
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This is used in &lt;a class=&quot;reference&quot; href=&quot;#converttosubclasscode&quot;&gt;%ConvertToSubClassCode&lt;/a&gt; code as a convenient way of
 converting &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;'\0'&lt;/span&gt;&lt;/tt&gt; terminated string based RTTI to the corresponding
 Python type object.  &lt;em&gt;type&lt;/em&gt; is the RTTI.  &lt;em&gt;map&lt;/em&gt; is the table of known RTTI
 and the corresponding type objects (see &lt;a class=&quot;reference&quot; href=&quot;#sipstringtypeclassmap&quot;&gt;sipStringTypeClassMap&lt;/a&gt;).  The
 entries in the table must be sorted in ascending order of RTTI.  &lt;em&gt;maplen&lt;/em&gt;
 is the number of entries in the table.  The corresponding Python type
-object is returned, or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; if &lt;em&gt;type&lt;/em&gt; wasn't in &lt;em&gt;map&lt;/em&gt;.&lt;/dd&gt;
+object is returned, or &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; if &lt;em&gt;type&lt;/em&gt; wasn't in &lt;em&gt;map&lt;/em&gt;.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.&lt;/p&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id213&quot; id=&quot;sipparseresult&quot; name=&quot;sipparseresult&quot;&gt;9.48&amp;nbsp;&amp;nbsp;&amp;nbsp;sipParseResult()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id222&quot; id=&quot;sipparseresult&quot; name=&quot;sipparseresult&quot;&gt;9.50&amp;nbsp;&amp;nbsp;&amp;nbsp;sipParseResult()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;int sipParseResult(int *iserr, PyObject *method, PyObject *result, const char *format, ...)&lt;/dt&gt;
 &lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This converts a Python object (usually returned by a method) to C/C++ based
@@ -4664,10 +4927,6 @@ entry in parentheses is the Python object type that the format character
 will convert, and the entry in brackets are the types of the C/C++ values
 to be passed.&lt;/p&gt;
 &lt;dl class=&quot;last docutils&quot;&gt;
-&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;a&lt;/span&gt;&lt;/tt&gt; (string) [const char **, int *]&lt;/dt&gt;
-&lt;dd&gt;Convert a Python string to a C/C++ character array and its length.  If
-the Python object is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; then the array and length are &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt;
-and zero respectively.  This is deprecated, use &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;g&lt;/span&gt;&lt;/tt&gt; instead.&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;b&lt;/span&gt;&lt;/tt&gt; (integer) [bool *]&lt;/dt&gt;
 &lt;dd&gt;Convert a Python integer to a C/C++ &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;bool&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;c&lt;/span&gt;&lt;/tt&gt; (string) [char *]&lt;/dt&gt;
@@ -4707,17 +4966,12 @@ Python object is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/
 &lt;dd&gt;Convert a Python unicode object to a C/C++ &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;L'\0'&lt;/span&gt;&lt;/tt&gt; terminated wide
 character string.  If the Python object is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; then the string
 is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
-&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;A&lt;/span&gt;&lt;/tt&gt; (unicode) [wchar_t **, int *]&lt;/dt&gt;
-&lt;dd&gt;Convert a Python unicode object to a C/C++ wide character array and its
-length.  If the Python object is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; then the array and length
-are &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; and zero respectively.  This is deprecated, use &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;G&lt;/span&gt;&lt;/tt&gt;
-instead.&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Cf&lt;/span&gt;&lt;/tt&gt; (wrapped class) [sipWrapperType *, int *, void **]&lt;/dt&gt;
 &lt;dd&gt;&lt;p class=&quot;first&quot;&gt;Convert a Python object to a C structure or a C++ class instance and
 return its state as described in &lt;a class=&quot;reference&quot; href=&quot;#sipconverttoinstance&quot;&gt;sipConvertToInstance()&lt;/a&gt;.  &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;f&lt;/span&gt;&lt;/tt&gt; is a
 combination of the following flags encoded as an ASCII character by
 adding &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;0&lt;/span&gt;&lt;/tt&gt; to the combined value:&lt;/p&gt;
-&lt;blockquote class=&quot;last&quot;&gt;
+&lt;blockquote&gt;
 &lt;p&gt;0x01 disallows the conversion of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; to &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;
 &lt;p&gt;0x02 implements the &lt;a class=&quot;reference&quot; href=&quot;#factory&quot;&gt;Factory&lt;/a&gt; annotation&lt;/p&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
@@ -4726,13 +4980,13 @@ adding &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;0&lt;/span&gt;&lt;/tt&gt; to the combi
 not passed if this flag is specified.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/blockquote&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Df&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
 &lt;/dd&gt;
-&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Df&lt;/span&gt;&lt;/tt&gt; (mapped type) [const sipMappedType *, int *, void **]&lt;/dt&gt;
-&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;Convert a Python object to a C structure or a C++ class instance
-implemented as a mapped type and return its state as described in
-&lt;a class=&quot;reference&quot; href=&quot;#sipconverttomappedtype&quot;&gt;sipConvertToMappedType()&lt;/a&gt;.  &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;f&lt;/span&gt;&lt;/tt&gt; is a combination of the following
-flags encoded as an ASCII character by adding &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;0&lt;/span&gt;&lt;/tt&gt; to the combined
-value:&lt;/p&gt;
+&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Df&lt;/span&gt;&lt;/tt&gt; (wrapped instance) [const sipTypeDef *, int *, void **]&lt;/dt&gt;
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;Convert a Python object to a C structure, C++ class or mapped type
+instance and return its state as described in &lt;a class=&quot;reference&quot; href=&quot;#sipconverttotype&quot;&gt;sipConvertToType()&lt;/a&gt;.
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;f&lt;/span&gt;&lt;/tt&gt; is a combination of the following flags encoded as an ASCII
+character by adding &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;0&lt;/span&gt;&lt;/tt&gt; to the combined value:&lt;/p&gt;
 &lt;blockquote class=&quot;last&quot;&gt;
 &lt;p&gt;0x01 disallows the conversion of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; to &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;
 &lt;p&gt;0x02 implements the &lt;a class=&quot;reference&quot; href=&quot;#factory&quot;&gt;Factory&lt;/a&gt; annotation&lt;/p&gt;
@@ -4744,20 +4998,15 @@ not passed if this flag is specified.&lt;/dd&gt;
 &lt;/blockquote&gt;
 &lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;E&lt;/span&gt;&lt;/tt&gt; (wrapped enum) [PyTypeObject *, enum *]&lt;/dt&gt;
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;Convert a Python named enum type to the corresponding C/C++ &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;enum&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;F&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;/dd&gt;
+&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;F&lt;/span&gt;&lt;/tt&gt; (wrapped enum) [sipTypeDef *, enum *]&lt;/dt&gt;
 &lt;dd&gt;Convert a Python named enum type to the corresponding C/C++ &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;enum&lt;/span&gt;&lt;/tt&gt;.&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;G&lt;/span&gt;&lt;/tt&gt; (unicode) [wchar_t **, SIP_SSIZE_T *]&lt;/dt&gt;
 &lt;dd&gt;Convert a Python unicode object to a C/C++ wide character array and its
 length.  If the Python object is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_None&lt;/span&gt;&lt;/tt&gt; then the array and length
 are &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; and zero respectively.&lt;/dd&gt;
-&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;L&lt;/span&gt;&lt;/tt&gt; (object) [&lt;em&gt;type&lt;/em&gt; *(*)(PyObject *obj, int *iserr), void **]&lt;/dt&gt;
-&lt;dd&gt;Convert a Python object to a C structure or a C++ class instance using
-a convertor function.  See &lt;a class=&quot;reference&quot; href=&quot;#generated-type-convertors&quot;&gt;Generated Type Convertors&lt;/a&gt;.  This is
-deprecated from SIP v4.4.&lt;/dd&gt;
-&lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;M&lt;/span&gt;&lt;/tt&gt; (object) [&lt;em&gt;type&lt;/em&gt; *(*)(PyObject *obj, int *iserr), void **]&lt;/dt&gt;
-&lt;dd&gt;Convert a Python object to a C structure or a C++ class instance using
-a convertor function.  If the structure or class instance pointer is
-&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then return an error.  See &lt;a class=&quot;reference&quot; href=&quot;#generated-type-convertors&quot;&gt;Generated Type Convertors&lt;/a&gt;.  This
-is deprecated from SIP v4.4.&lt;/dd&gt;
 &lt;dt&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;N&lt;/span&gt;&lt;/tt&gt; (object) [PyTypeObject *, PyObject **]&lt;/dt&gt;
 &lt;dd&gt;A Python object is checked to see if it is a certain type and then
 returned without any conversions.  The reference count is incremented.
@@ -4778,29 +5027,104 @@ The Python object may not be &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Py_N
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id214&quot; id=&quot;sipreleaseinstance&quot; name=&quot;sipreleaseinstance&quot;&gt;9.49&amp;nbsp;&amp;nbsp;&amp;nbsp;sipReleaseInstance()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id223&quot; id=&quot;sipregisterattributegetter&quot; name=&quot;sipregisterattributegetter&quot;&gt;9.51&amp;nbsp;&amp;nbsp;&amp;nbsp;sipRegisterAttributeGetter()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;int sipRegisterAttributeGetter(const sipTypeDef *td, sipAttrGetterFunc getter)&lt;/dt&gt;
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This registers a handler that will called just before SIP needs to get an
+attribute from a wrapped type's dictionary for the first time.  The handler
+must then populate the type's dictionary with any lazy attributes.  -1 is
+returned if there was an error registering the handler, 0 is returned
+otherwise.&lt;/p&gt;
+&lt;p&gt;&lt;em&gt;td&lt;/em&gt; is an optional generated type definition which means that the handler
+will only be called for types with that type or sub-classed from it.  If it
+is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; then the handler will be called for all types.&lt;/p&gt;
+&lt;p&gt;&lt;em&gt;getter&lt;/em&gt; is the handler and it has the following signature.&lt;/p&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;int handler(const sipTypeDef *td, PyObject *dict)&lt;/dt&gt;
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;&lt;em&gt;td&lt;/em&gt; is the generated type definition of the type whose dictionary is
+to be populated.&lt;/p&gt;
+&lt;p&gt;&lt;em&gt;dict&lt;/em&gt; is the dictionary to be populated.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;-1 is returned if there is an error, 0 is returned otherwise.&lt;/p&gt;
+&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;p class=&quot;last&quot;&gt;See the section &lt;a class=&quot;reference&quot; href=&quot;#lazy-type-attributes&quot;&gt;Lazy Type Attributes&lt;/a&gt; for more details.&lt;/p&gt;
+&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id224&quot; id=&quot;sipregisterpytype&quot; name=&quot;sipregisterpytype&quot;&gt;9.52&amp;nbsp;&amp;nbsp;&amp;nbsp;sipRegisterPyType()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;int sipRegisterPyType(PyTypeObject *type)&lt;/dt&gt;
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This registers a type object that can be used as the meta-type or
+super-type of a wrapped C++ type.  &lt;em&gt;type&lt;/em&gt; is the type.  -1 is returned if
+there was an error registering the type, 0 is returned otherwise.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;See the section &lt;a class=&quot;reference&quot; href=&quot;#types-and-meta-types&quot;&gt;Types and Meta-types&lt;/a&gt; for more details.&lt;/p&gt;
+&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id225&quot; id=&quot;sipreleaseinstance&quot; name=&quot;sipreleaseinstance&quot;&gt;9.53&amp;nbsp;&amp;nbsp;&amp;nbsp;sipReleaseInstance()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void sipReleaseInstance(void *cpp, sipWrapperType *type, int state)&lt;/dt&gt;
-&lt;dd&gt;This destroys a wrapped C/C++ instance if it was a temporary instance.  It
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This destroys a wrapped C/C++ instance if it was a temporary instance.  It
 is called after a call to either &lt;a class=&quot;reference&quot; href=&quot;#sipconverttoinstance&quot;&gt;sipConvertToInstance()&lt;/a&gt; or
 &lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttoinstance&quot;&gt;sipForceConvertToInstance()&lt;/a&gt;.  &lt;em&gt;cpp&lt;/em&gt; is the wrapped C/C++ instance.
 &lt;em&gt;type&lt;/em&gt; is the generated type corresponding to &lt;em&gt;cpp&lt;/em&gt;.  &lt;em&gt;state&lt;/em&gt; describes the
-state of the instance.&lt;/dd&gt;
+state of the instance.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use
+&lt;a class=&quot;reference&quot; href=&quot;#sipreleasetype&quot;&gt;sipReleaseType()&lt;/a&gt;.&lt;/p&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id215&quot; id=&quot;sipreleasemappedtype&quot; name=&quot;sipreleasemappedtype&quot;&gt;9.50&amp;nbsp;&amp;nbsp;&amp;nbsp;sipReleaseMappedType()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id226&quot; id=&quot;sipreleasemappedtype&quot; name=&quot;sipreleasemappedtype&quot;&gt;9.54&amp;nbsp;&amp;nbsp;&amp;nbsp;sipReleaseMappedType()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void sipReleaseMappedType(void *cpp, const sipMappedType *mt, int state)&lt;/dt&gt;
-&lt;dd&gt;This destroys a wrapped C/C++ mapped type if it was a temporary instance.
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This destroys a wrapped C/C++ mapped type if it was a temporary instance.
 It is called after a call to either &lt;a class=&quot;reference&quot; href=&quot;#sipconverttomappedtype&quot;&gt;sipConvertToMappedType()&lt;/a&gt; or
 &lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttomappedtype&quot;&gt;sipForceConvertToMappedType()&lt;/a&gt;.  &lt;em&gt;cpp&lt;/em&gt; is the wrapped C/C++ instance.
 &lt;em&gt;mt&lt;/em&gt; is the opaque structure returned by &lt;a class=&quot;reference&quot; href=&quot;#sipfindmappedtype&quot;&gt;sipFindMappedType()&lt;/a&gt;.  &lt;em&gt;state&lt;/em&gt;
-describes the state of the instance.&lt;/dd&gt;
+describes the state of the instance.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;This is deprecated from SIP v4.8.  Instead you should use
+&lt;a class=&quot;reference&quot; href=&quot;#sipreleasetype&quot;&gt;sipReleaseType()&lt;/a&gt;.&lt;/p&gt;
+&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id227&quot; id=&quot;sipreleasetype&quot; name=&quot;sipreleasetype&quot;&gt;9.55&amp;nbsp;&amp;nbsp;&amp;nbsp;sipReleaseType()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;void sipReleaseType(void *cpp, const sipTypeDef *td, int state)&lt;/dt&gt;
+&lt;dd&gt;This destroys a wrapped C/C++ or mapped type instance if it was a temporary
+instance.  It is called after a call to either &lt;a class=&quot;reference&quot; href=&quot;#sipconverttotype&quot;&gt;sipConvertToType()&lt;/a&gt; or
+&lt;a class=&quot;reference&quot; href=&quot;#sipforceconverttotype&quot;&gt;sipForceConvertToType()&lt;/a&gt;.  &lt;em&gt;cpp&lt;/em&gt; is the wrapped C/C++ instance.  &lt;em&gt;td&lt;/em&gt; is
+the generated type structure.  &lt;em&gt;state&lt;/em&gt; describes the state of the instance.&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id228&quot; id=&quot;sipresolvetypedef&quot; name=&quot;sipresolvetypedef&quot;&gt;9.56&amp;nbsp;&amp;nbsp;&amp;nbsp;sipResolveTypedef()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;const char *sipResolveTypedef(const char *name)&lt;/dt&gt;
+&lt;dd&gt;If &lt;em&gt;name&lt;/em&gt; refers to a C/C++ typedef then the value of that typedef is
+returned, otherwise &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; is returned.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id216&quot; id=&quot;sipstringtypeclassmap&quot; name=&quot;sipstringtypeclassmap&quot;&gt;9.51&amp;nbsp;&amp;nbsp;&amp;nbsp;sipStringTypeClassMap&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id229&quot; id=&quot;sipsimplewrapper&quot; name=&quot;sipsimplewrapper&quot;&gt;9.57&amp;nbsp;&amp;nbsp;&amp;nbsp;sipSimpleWrapper&lt;/a&gt;&lt;/h2&gt;
+&lt;p&gt;This is a C structure that represents a Python wrapped instance whose type is
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.simplewrapper&lt;/span&gt;&lt;/tt&gt;.  It is an extension of the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt;&lt;/tt&gt; structure and so
+may be safely cast to it.&lt;/p&gt;
+&lt;p&gt;It includes a member called &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;user&lt;/span&gt;&lt;/tt&gt; which is of type &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt;.  This can
+be used for any purpose by handwritten code and will automatically be garbage
+collected at the appropriate time.&lt;/p&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id230&quot; id=&quot;sipsimplewrapper-type&quot; name=&quot;sipsimplewrapper-type&quot;&gt;9.58&amp;nbsp;&amp;nbsp;&amp;nbsp;sipSimpleWrapper_Type&lt;/a&gt;&lt;/h2&gt;
+&lt;p&gt;This is a pointer to a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyTypeObject&lt;/span&gt;&lt;/tt&gt; structure that is the type of a
+&lt;a class=&quot;reference&quot; href=&quot;#sipsimplewrapper&quot;&gt;sipSimpleWrapper&lt;/a&gt; structure and is the C implementation of
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.simplewrapper&lt;/span&gt;&lt;/tt&gt;.  It may be safely cast to &lt;a class=&quot;reference&quot; href=&quot;#sipwrappertype&quot;&gt;sipWrapperType&lt;/a&gt;.&lt;/p&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id231&quot; id=&quot;sipstringtypeclassmap&quot; name=&quot;sipstringtypeclassmap&quot;&gt;9.59&amp;nbsp;&amp;nbsp;&amp;nbsp;sipStringTypeClassMap&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;This C structure is used with &lt;a class=&quot;reference&quot; href=&quot;#sipmapstringtoclass&quot;&gt;sipMapStringToClass()&lt;/a&gt; to define a mapping
 between &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;'\0'&lt;/span&gt;&lt;/tt&gt; terminated string based RTTI and &lt;a class=&quot;reference&quot; href=&quot;#generated-type-objects&quot;&gt;generated type objects&lt;/a&gt;.
 The structure elements are as follows.&lt;/p&gt;
@@ -4810,25 +5134,10 @@ The structure elements are as follows.&lt;/p&gt;
 &lt;dt&gt;sipWrapperType **pyType.&lt;/dt&gt;
 &lt;dd&gt;A pointer to the corresponding Python type object.&lt;/dd&gt;
 &lt;/dl&gt;
+&lt;p&gt;This is deprecated from SIP v4.8.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id217&quot; id=&quot;siptransfer&quot; name=&quot;siptransfer&quot;&gt;9.52&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransfer()&lt;/a&gt;&lt;/h2&gt;
-&lt;dl class=&quot;docutils&quot;&gt;
-&lt;dt&gt;void sipTransfer(PyObject *obj, int tocpp)&lt;/dt&gt;
-&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This function is deprecated from SIP v4.3.  If &lt;em&gt;tocpp&lt;/em&gt; is non-zero then the
-equivalent call is:&lt;/p&gt;
-&lt;pre class=&quot;literal-block&quot;&gt;
-sipTransferTo(obj, obj);
-&lt;/pre&gt;
-&lt;p&gt;If &lt;em&gt;tocpp&lt;/em&gt; is zero then the equivalent call is:&lt;/p&gt;
-&lt;pre class=&quot;last literal-block&quot;&gt;
-sipTransferBack(obj);
-&lt;/pre&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;
-&lt;/div&gt;
-&lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id218&quot; id=&quot;siptransferback&quot; name=&quot;siptransferback&quot;&gt;9.53&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransferBack()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id232&quot; id=&quot;siptransferback&quot; name=&quot;siptransferback&quot;&gt;9.60&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransferBack()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void sipTransferBack(PyObject *obj)&lt;/dt&gt;
 &lt;dd&gt;This transfers ownership of a Python wrapped instance to Python (see
@@ -4838,7 +5147,7 @@ collector with another instance is removed.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id219&quot; id=&quot;siptransferbreak&quot; name=&quot;siptransferbreak&quot;&gt;9.54&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransferBreak()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id233&quot; id=&quot;siptransferbreak&quot; name=&quot;siptransferbreak&quot;&gt;9.61&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransferBreak()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void sipTransferBreak(PyObject *obj)&lt;/dt&gt;
 &lt;dd&gt;Any association of a Python wrapped instance with regard to the cyclic
@@ -4847,7 +5156,7 @@ instance.  Ownership of the instance should be with C++.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id220&quot; id=&quot;siptransferto&quot; name=&quot;siptransferto&quot;&gt;9.55&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransferTo()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id234&quot; id=&quot;siptransferto&quot; name=&quot;siptransferto&quot;&gt;9.62&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTransferTo()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;void sipTransferTo(PyObject *obj, PyObject *owner)&lt;/dt&gt;
 &lt;dd&gt;This transfers ownership of a Python wrapped instance to C++ (see
@@ -4861,75 +5170,160 @@ destructor is always transfered to C++.&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id221&quot; id=&quot;sipwrapper&quot; name=&quot;sipwrapper&quot;&gt;9.56&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapper&lt;/a&gt;&lt;/h2&gt;
-&lt;p&gt;This is a C structure that represents a Python wrapped instance.  It is an
-extension of the Python &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt;&lt;/tt&gt; structure and so may be safely cast to
-&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt;&lt;/tt&gt;.  It includes a member called &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;user&lt;/span&gt;&lt;/tt&gt; which is of type
-&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt;.  This can be used for any purpose by handwritten code and will
-automatically be garbage collected at the appropriate time.&lt;/p&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id235&quot; id=&quot;siptypeaspytypeobject&quot; name=&quot;siptypeaspytypeobject&quot;&gt;9.63&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeAsPyTypeObject()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;PyTypeObject *sipTypeAsPyTypeObject(sipTypeDef *td)&lt;/dt&gt;
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This returns a pointer to the Python type object that SIP creates from a
+generated type structure.  &lt;em&gt;td&lt;/em&gt; is the type structure.&lt;/p&gt;
+&lt;p&gt;If the type structure refers to a C structure or C++ class then it may be
+safely cast to a &lt;a class=&quot;reference&quot; href=&quot;#sipwrappertype&quot;&gt;sipWrapperType&lt;/a&gt;.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;If the type structure refers to a mapped type then &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; will be
+returned.&lt;/p&gt;
+&lt;/dd&gt;
+&lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id222&quot; id=&quot;sipwrapper-check&quot; name=&quot;sipwrapper-check&quot;&gt;9.57&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapper_Check()&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id236&quot; id=&quot;siptypefrompytypeobject&quot; name=&quot;siptypefrompytypeobject&quot;&gt;9.64&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeFromPyTypeObject()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
-&lt;dt&gt;int sipWrapper_Check(PyObject *obj)&lt;/dt&gt;
-&lt;dd&gt;This returns a non-zero value if a Python object is a wrapped instance.
-&lt;em&gt;obj&lt;/em&gt; is the Python object.&lt;/dd&gt;
+&lt;dt&gt;const sipTypeDef *sipTypeFromPyTypeObject(PyTypeObject *py_type)&lt;/dt&gt;
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This returns a pointer to the SIP generated type structure for a Python
+type.  &lt;em&gt;py_type&lt;/em&gt; is the Python type object.&lt;/p&gt;
+&lt;p class=&quot;last&quot;&gt;If the Python type doesn't correspond to a SIP generated type then &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt;
+will be returned.&lt;/p&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id223&quot; id=&quot;sipwrappertype&quot; name=&quot;sipwrappertype&quot;&gt;9.58&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapperType&lt;/a&gt;&lt;/h2&gt;
-&lt;p&gt;This is a C structure that represents a SIP generated type object.  It is an
-extension of the Python &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyTypeObject&lt;/span&gt;&lt;/tt&gt; structure (which is itself an
-extension of the Python &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt;&lt;/tt&gt; structure) and so may be safely cast to
-&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyTypeObject&lt;/span&gt;&lt;/tt&gt; (and &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt;&lt;/tt&gt;).&lt;/p&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id237&quot; id=&quot;siptypeisclass&quot; name=&quot;siptypeisclass&quot;&gt;9.65&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeIsClass()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;int sipTypeIsClass(sipTypeDef *td)&lt;/dt&gt;
+&lt;dd&gt;This returns a non-zero value if the generated type structure refers to a
+C structure or C++ class.  &lt;em&gt;td&lt;/em&gt; is the type structure.&lt;/dd&gt;
+&lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id224&quot; id=&quot;generated-type-convertors&quot; name=&quot;generated-type-convertors&quot;&gt;9.59&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Type Convertors&lt;/a&gt;&lt;/h2&gt;
-&lt;p&gt;These functions are deprecated from SIP v4.4.&lt;/p&gt;
-&lt;p&gt;SIP generates functions for all types being wrapped (including mapped types
-defined with the &lt;a class=&quot;reference&quot; href=&quot;#mappedtype&quot;&gt;%MappedType&lt;/a&gt; directive) that convert a Python object to the
-C structure or C++ class instance.  The name of this convertor is the name of
-the structure or class prefixed by &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipForceConvertTo_&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id238&quot; id=&quot;siptypeisenum&quot; name=&quot;siptypeisenum&quot;&gt;9.66&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeIsEnum()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
-&lt;dt&gt;void *sipForceConvertTo_*class*(PyObject *obj, int *iserr)&lt;/dt&gt;
-&lt;dd&gt;&lt;em&gt;obj&lt;/em&gt; is the Python object to convert.  If &lt;em&gt;obj&lt;/em&gt; is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; or the
-location pointed to by &lt;em&gt;iserr&lt;/em&gt; is non-zero then the conversion is not
-attempted and &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; is returned.  If there was an error then the
-location pointed to by &lt;em&gt;iserr&lt;/em&gt; is set to a non-zero value, a Python
-exception is raised, and &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; is returned.&lt;/dd&gt;
+&lt;dt&gt;int sipTypeIsEnum(sipTypeDef *td)&lt;/dt&gt;
+&lt;dd&gt;This returns a non-zero value if the generated type structure refers to a
+named enum.  &lt;em&gt;td&lt;/em&gt; is the type structure.&lt;/dd&gt;
 &lt;/dl&gt;
-&lt;p&gt;SIP also generates functions for mapped types that convert a C structure or
-C++ class instance to a Python object.  The name of this convertor is the name
-of the structure or class prefixed by &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipConvertFrom_&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id239&quot; id=&quot;siptypeismapped&quot; name=&quot;siptypeismapped&quot;&gt;9.67&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeIsMapped()&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
-&lt;dt&gt;PyObject *sipConvertFrom_*class*(void *cppptr)&lt;/dt&gt;
-&lt;dd&gt;&lt;em&gt;cppptr&lt;/em&gt; is a pointer to the C structure or C++ class instance to convert.
-If there was an error then &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; is returned and a Python exception
-raised.&lt;/dd&gt;
+&lt;dt&gt;int sipTypeIsMapped(sipTypeDef *td)&lt;/dt&gt;
+&lt;dd&gt;This returns a non-zero value if the generated type structure refers to a
+mapped type.  &lt;em&gt;td&lt;/em&gt; is the type structure.&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id240&quot; id=&quot;siptypeisnamespace&quot; name=&quot;siptypeisnamespace&quot;&gt;9.68&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeIsNamespace()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;int sipTypeIsNamespace(sipTypeDef *td)&lt;/dt&gt;
+&lt;dd&gt;This returns a non-zero value if the generated type structure refers to a
+C++ namespace.  &lt;em&gt;td&lt;/em&gt; is the type structure.&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id241&quot; id=&quot;siptypename&quot; name=&quot;siptypename&quot;&gt;9.69&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeName()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;const char *sipTypeName(const sipTypeDef *td)&lt;/dt&gt;
+&lt;dd&gt;This returns the C/C++ name of a SIP generated type.  &lt;em&gt;td&lt;/em&gt; is the type
+structure.&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id242&quot; id=&quot;siptypescope&quot; name=&quot;siptypescope&quot;&gt;9.70&amp;nbsp;&amp;nbsp;&amp;nbsp;sipTypeScope()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;const sipTypeDef *sipTypeScope(const sipTypeDef *td)&lt;/dt&gt;
+&lt;dd&gt;This returns the SIP generated type structure of the scope of another
+SIP generated type structure.  &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;NULL&lt;/span&gt;&lt;/tt&gt; will be returned if the type has no
+scope.&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id243&quot; id=&quot;sipvoidptr-type&quot; name=&quot;sipvoidptr-type&quot;&gt;9.71&amp;nbsp;&amp;nbsp;&amp;nbsp;sipVoidPtr_Type&lt;/a&gt;&lt;/h2&gt;
+&lt;p&gt;This is a pointer to a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyTypeObject&lt;/span&gt;&lt;/tt&gt; structure that is the type of a
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt;&lt;/tt&gt; structure that is used to wrap a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;*&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id244&quot; id=&quot;sipwrapper&quot; name=&quot;sipwrapper&quot;&gt;9.72&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapper&lt;/a&gt;&lt;/h2&gt;
+&lt;p&gt;This is a C structure that represents a Python wrapped instance whose type is
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.wrapper&lt;/span&gt;&lt;/tt&gt;.  It is an extension of the &lt;a class=&quot;reference&quot; href=&quot;#sipsimplewrapper&quot;&gt;sipSimpleWrapper&lt;/a&gt; and
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt;&lt;/tt&gt; structures and so may be safely cast to both.&lt;/p&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id245&quot; id=&quot;sipwrapper-check&quot; name=&quot;sipwrapper-check&quot;&gt;9.73&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapper_Check()&lt;/a&gt;&lt;/h2&gt;
+&lt;dl class=&quot;docutils&quot;&gt;
+&lt;dt&gt;int sipWrapper_Check(PyObject *obj)&lt;/dt&gt;
+&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This returns a non-zero value if a Python object is a wrapped instance.
+&lt;em&gt;obj&lt;/em&gt; is the Python object.&lt;/p&gt;
+&lt;p&gt;This is deprecated from SIP v4.8.  Instead you should use the following:&lt;/p&gt;
+&lt;pre class=&quot;last literal-block&quot;&gt;
+PyObject_TypeCheck(obj, sipWrapper_Type)
+&lt;/pre&gt;
+&lt;/dd&gt;
 &lt;/dl&gt;
-&lt;p&gt;The convertor functions of all imported types are available to handwritten
-code.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id225&quot; id=&quot;generated-type-objects&quot; name=&quot;generated-type-objects&quot;&gt;9.60&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Type Objects&lt;/a&gt;&lt;/h2&gt;
-&lt;p&gt;SIP generates a type object for each C structure or C++ class being wrapped.
-These are &lt;a class=&quot;reference&quot; href=&quot;#sipwrappertype&quot;&gt;sipWrapperType&lt;/a&gt; structures and are used extensively by the SIP API.&lt;/p&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id246&quot; id=&quot;sipwrapper-type&quot; name=&quot;sipwrapper-type&quot;&gt;9.74&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapper_Type&lt;/a&gt;&lt;/h2&gt;
+&lt;p&gt;This is a pointer to a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyTypeObject&lt;/span&gt;&lt;/tt&gt; structure that is the type of a
+&lt;a class=&quot;reference&quot; href=&quot;#sipwrapper&quot;&gt;sipWrapper&lt;/a&gt; structure and is the C implementation of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.wrapper&lt;/span&gt;&lt;/tt&gt;.  It may
+be safely cast to &lt;a class=&quot;reference&quot; href=&quot;#sipwrappertype&quot;&gt;sipWrapperType&lt;/a&gt;.&lt;/p&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id247&quot; id=&quot;sipwrappertype&quot; name=&quot;sipwrappertype&quot;&gt;9.75&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapperType&lt;/a&gt;&lt;/h2&gt;
+&lt;p&gt;This is a C structure that represents a SIP generated type object.  It is an
+extension of the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyTypeObject&lt;/span&gt;&lt;/tt&gt; structure (which is itself an extension of
+the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt;&lt;/tt&gt; structure) and so may be safely cast to &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyTypeObject&lt;/span&gt;&lt;/tt&gt; (and
+&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyObject&lt;/span&gt;&lt;/tt&gt;).&lt;/p&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id248&quot; id=&quot;sipwrappertype-type&quot; name=&quot;sipwrappertype-type&quot;&gt;9.76&amp;nbsp;&amp;nbsp;&amp;nbsp;sipWrapperType_Type&lt;/a&gt;&lt;/h2&gt;
+&lt;p&gt;This is a pointer to a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;PyTypeObject&lt;/span&gt;&lt;/tt&gt; structure that is the type of a
+&lt;a class=&quot;reference&quot; href=&quot;#sipwrappertype&quot;&gt;sipWrapperType&lt;/a&gt; structure and is the C implementation of &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip.wrappertype&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id249&quot; id=&quot;generated-type-structures&quot; name=&quot;generated-type-structures&quot;&gt;9.77&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Type Structures&lt;/a&gt;&lt;/h2&gt;
+&lt;p&gt;SIP generates an opaque type structure for each C structure, C++ class, C++
+namespace, named enum or mapped type being wrapped.  These are &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipTypeDef&lt;/span&gt;&lt;/tt&gt;
+structures and are used extensively by the SIP API.&lt;/p&gt;
+&lt;p&gt;The names of these structure are prefixed by &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipType_&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;p&gt;For those structures that correspond to C structures, C++ classes, C++
+namespaces or named enums the remaining part of the name is the fully
+qualified name of the structure, class, namespace or enum name.  Any &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;::&lt;/span&gt;&lt;/tt&gt;
+scope separators are replaced by an underscore.  For example, the type object
+for class &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Klass&lt;/span&gt;&lt;/tt&gt; is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipType_Klass&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
+&lt;p&gt;For those structure that correspond to mapped types the remaining part of the
+name is generated by SIP.  The only way for handwritten code to obtain a
+pointer to a structure for a mapped type is to use &lt;a class=&quot;reference&quot; href=&quot;#sipfindtype&quot;&gt;sipFindType()&lt;/a&gt;.&lt;/p&gt;
+&lt;p&gt;The type structures of all imported types are available to handwritten code.&lt;/p&gt;
+&lt;/div&gt;
+&lt;div class=&quot;section&quot;&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id250&quot; id=&quot;generated-type-objects&quot; name=&quot;generated-type-objects&quot;&gt;9.78&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Type Objects&lt;/a&gt;&lt;/h2&gt;
+&lt;p&gt;SIP generates a &lt;a class=&quot;reference&quot; href=&quot;#sipwrappertype&quot;&gt;sipWrapperType&lt;/a&gt; type object for each C structure or C++ class
+being wrapped.&lt;/p&gt;
 &lt;p&gt;These objects are named with the structure or class name prefixed by
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipClass_&lt;/span&gt;&lt;/tt&gt;.  For example, the type object for class &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Klass&lt;/span&gt;&lt;/tt&gt; is
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipClass_Klass&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
-&lt;p&gt;The type objects of all imported classes are available to handwritten code.&lt;/p&gt;
+&lt;p&gt;Using these names is deprecated from SIP v4.8.  Instead use the corresponding
+generated type structure (see &lt;a class=&quot;reference&quot; href=&quot;#generated-type-structures&quot;&gt;Generated Type Structures&lt;/a&gt;) and
+&lt;a class=&quot;reference&quot; href=&quot;#siptypeaspytypeobject&quot;&gt;sipTypeAsPyTypeObject()&lt;/a&gt;.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id226&quot; id=&quot;generated-named-enum-type-objects&quot; name=&quot;generated-named-enum-type-objects&quot;&gt;9.61&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Named Enum Type Objects&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id251&quot; id=&quot;generated-named-enum-type-objects&quot; name=&quot;generated-named-enum-type-objects&quot;&gt;9.79&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Named Enum Type Objects&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;SIP generates a type object for each named enum being wrapped.  These are
 PyTypeObject structures.  (Anonymous enums are wrapped as Python integers.)&lt;/p&gt;
 &lt;p&gt;These objects are named with the fully qualified enum name (i.e. including any
 enclosing scope) prefixed by &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipEnum_&lt;/span&gt;&lt;/tt&gt;.  For example, the type object for
 enum &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Enum&lt;/span&gt;&lt;/tt&gt; defined in class &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Klass&lt;/span&gt;&lt;/tt&gt; is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipEnum_Klass_Enum&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
-&lt;p&gt;The type objects of all imported named enums are available to handwritten code.&lt;/p&gt;
+&lt;p&gt;Using these names is deprecated from SIP v4.8.  Instead use the corresponding
+generated type structure (see &lt;a class=&quot;reference&quot; href=&quot;#generated-type-structures&quot;&gt;Generated Type Structures&lt;/a&gt;) and
+&lt;a class=&quot;reference&quot; href=&quot;#siptypeaspytypeobject&quot;&gt;sipTypeAsPyTypeObject()&lt;/a&gt;.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id227&quot; id=&quot;generated-derived-classes&quot; name=&quot;generated-derived-classes&quot;&gt;9.62&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Derived Classes&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id252&quot; id=&quot;generated-derived-classes&quot; name=&quot;generated-derived-classes&quot;&gt;9.80&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Derived Classes&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;For most C++ classes being wrapped SIP generates a derived class with the same
 name prefixed by &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sip&lt;/span&gt;&lt;/tt&gt;.  For example, the derived class for class &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Klass&lt;/span&gt;&lt;/tt&gt;
 is &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipKlass&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
@@ -4942,7 +5336,7 @@ exception is that handwritten constructor code specified using the
 has the same C++ signature) rather then the wrapped class's constructor.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id228&quot; id=&quot;generated-exception-objects&quot; name=&quot;generated-exception-objects&quot;&gt;9.63&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Exception Objects&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id253&quot; id=&quot;generated-exception-objects&quot; name=&quot;generated-exception-objects&quot;&gt;9.81&amp;nbsp;&amp;nbsp;&amp;nbsp;Generated Exception Objects&lt;/a&gt;&lt;/h2&gt;
 &lt;p&gt;SIP generates a Python object for each exception defined with the &lt;cite&gt;%Exception_&lt;/cite&gt;
 directive.&lt;/p&gt;
 &lt;p&gt;These objects are named with the fully qualified exception name (i.e. including
@@ -4953,7 +5347,7 @@ object for enum &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Except&lt;/span&gt;&lt;/tt
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id229&quot; id=&quot;using-the-sip-api-when-embedding&quot; name=&quot;using-the-sip-api-when-embedding&quot;&gt;10&amp;nbsp;&amp;nbsp;&amp;nbsp;Using the SIP API when Embedding&lt;/a&gt;&lt;/h1&gt;
+&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id254&quot; id=&quot;using-the-sip-api-when-embedding&quot; name=&quot;using-the-sip-api-when-embedding&quot;&gt;10&amp;nbsp;&amp;nbsp;&amp;nbsp;Using the SIP API when Embedding&lt;/a&gt;&lt;/h1&gt;
 &lt;p&gt;The SIP API described in the previous section is intended to be called from
 handwritten code in SIP generated modules.  However it is also often necessary
 to call it from C or C++ applications that embed the Python interpreter and
@@ -4972,11 +5366,10 @@ name to lower case and preceding it with an underscore.  For example:&lt;/p&gt;
 &lt;p&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipWrapperCheck&lt;/span&gt;&lt;/tt&gt; becomes &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;api_wrapper_check&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;
 &lt;/blockquote&gt;
 &lt;p&gt;Note that the type objects that SIP generates for a wrapped module (see
-&lt;a class=&quot;reference&quot; href=&quot;#generated-type-objects&quot;&gt;Generated Type Objects&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#generated-named-enum-type-objects&quot;&gt;Generated Named Enum Type Objects&lt;/a&gt; and
+&lt;a class=&quot;reference&quot; href=&quot;#generated-type-structures&quot;&gt;Generated Type Structures&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#generated-named-enum-type-objects&quot;&gt;Generated Named Enum Type Objects&lt;/a&gt; and
 &lt;a class=&quot;reference&quot; href=&quot;#generated-exception-objects&quot;&gt;Generated Exception Objects&lt;/a&gt;) cannot be refered to directly and must be
-obtained using the &lt;a class=&quot;reference&quot; href=&quot;#sipfindclass&quot;&gt;sipFindClass()&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;#sipfindmappedtype&quot;&gt;sipFindMappedType()&lt;/a&gt; and
-&lt;a class=&quot;reference&quot; href=&quot;#sipfindnamedenum&quot;&gt;sipFindNamedEnum()&lt;/a&gt; functions.  Of course, the corresponding modules must
-already have been imported into the interpreter.&lt;/p&gt;
+obtained using the &lt;a class=&quot;reference&quot; href=&quot;#sipfindtype&quot;&gt;sipFindType()&lt;/a&gt; function.  Of course, the corresponding
+modules must already have been imported into the interpreter.&lt;/p&gt;
 &lt;p&gt;The following code fragment shows how to get a pointer to the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipAPIDef&lt;/span&gt;&lt;/tt&gt;
 data structure:&lt;/p&gt;
 &lt;pre class=&quot;literal-block&quot;&gt;
@@ -5013,7 +5406,7 @@ const sipAPIDef *get_sip_api()
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id230&quot; id=&quot;using-the-sip-module-in-applications&quot; name=&quot;using-the-sip-module-in-applications&quot;&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;Using the SIP Module in Applications&lt;/a&gt;&lt;/h1&gt;
+&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id255&quot; id=&quot;using-the-sip-module-in-applications&quot; name=&quot;using-the-sip-module-in-applications&quot;&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;Using the SIP Module in Applications&lt;/a&gt;&lt;/h1&gt;
 &lt;p&gt;The main purpose of the SIP module is to provide functionality common to all
 SIP generated bindings.  It is loaded automatically and most of the time you
 will completely ignore it.  However, it does expose some functionality that can
@@ -5064,17 +5457,6 @@ It was first implemented in SIP v4.2.&lt;/dd&gt;
 &lt;dd&gt;This is a Python string object that defines the SIP version number as
 represented as a string.  For development snapshots it will start with
 &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;snapshot-&lt;/span&gt;&lt;/tt&gt;.  It was first implemented in SIP v4.3.&lt;/dd&gt;
-&lt;dt&gt;transfer(obj, direction)&lt;/dt&gt;
-&lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This function is deprecated from SIP v4.3.  If &lt;em&gt;direction&lt;/em&gt; is non-zero then
-the equivalent call is:&lt;/p&gt;
-&lt;pre class=&quot;literal-block&quot;&gt;
-sip.transferto(obj, None)
-&lt;/pre&gt;
-&lt;p&gt;If &lt;em&gt;direction&lt;/em&gt; is zero then the equivalent call is:&lt;/p&gt;
-&lt;pre class=&quot;last literal-block&quot;&gt;
-sip.transferback(obj)
-&lt;/pre&gt;
-&lt;/dd&gt;
 &lt;dt&gt;transferback(obj)&lt;/dt&gt;
 &lt;dd&gt;This function is a wrapper around &lt;a class=&quot;reference&quot; href=&quot;#siptransferback&quot;&gt;sipTransferBack()&lt;/a&gt;.&lt;/dd&gt;
 &lt;dt&gt;transferto(obj, owner)&lt;/dt&gt;
@@ -5132,7 +5514,7 @@ the instance represented as a number.  &lt;em&gt;type&lt;/em&gt; is the type of the object
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id231&quot; id=&quot;the-sip-build-system&quot; name=&quot;the-sip-build-system&quot;&gt;12&amp;nbsp;&amp;nbsp;&amp;nbsp;The SIP Build System&lt;/a&gt;&lt;/h1&gt;
+&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id256&quot; id=&quot;the-sip-build-system&quot; name=&quot;the-sip-build-system&quot;&gt;12&amp;nbsp;&amp;nbsp;&amp;nbsp;The SIP Build System&lt;/a&gt;&lt;/h1&gt;
 &lt;p&gt;The purpose of the build system is to make it easy for you to write
 configuration scripts in Python for your own bindings.  The build system takes
 care of the details of particular combinations of platform and compiler.  It
@@ -5153,7 +5535,7 @@ classes intended to be used by the configuration scripts of bindings built on
 top of PyQt.  The SIP build system includes facilities that do a lot of the
 work of creating these additional configuration modules.&lt;/p&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id232&quot; id=&quot;sipconfig-functions&quot; name=&quot;sipconfig-functions&quot;&gt;12.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipconfig&lt;/span&gt;&lt;/tt&gt; Functions&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id257&quot; id=&quot;sipconfig-functions&quot; name=&quot;sipconfig-functions&quot;&gt;12.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipconfig&lt;/span&gt;&lt;/tt&gt; Functions&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;create_config_module(module, template, content, macros=None)&lt;/dt&gt;
 &lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This creates a configuration module (e.g. &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;pyqtconfig&lt;/span&gt;&lt;/tt&gt;) from a template
@@ -5261,7 +5643,7 @@ string.&lt;/p&gt;
 &lt;/dl&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id233&quot; id=&quot;sipconfig-classes&quot; name=&quot;sipconfig-classes&quot;&gt;12.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipconfig&lt;/span&gt;&lt;/tt&gt; Classes&lt;/a&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id258&quot; id=&quot;sipconfig-classes&quot; name=&quot;sipconfig-classes&quot;&gt;12.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;sipconfig&lt;/span&gt;&lt;/tt&gt; Classes&lt;/a&gt;&lt;/h2&gt;
 &lt;dl class=&quot;docutils&quot;&gt;
 &lt;dt&gt;Configuration&lt;/dt&gt;
 &lt;dd&gt;&lt;p class=&quot;first&quot;&gt;This class encapsulates configuration values that can be accessed as
@@ -5649,7 +6031,7 @@ extension module.&lt;/p&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id234&quot; id=&quot;building-your-extension-with-distutils&quot; name=&quot;building-your-extension-with-distutils&quot;&gt;13&amp;nbsp;&amp;nbsp;&amp;nbsp;Building Your Extension with distutils&lt;/a&gt;&lt;/h1&gt;
+&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id259&quot; id=&quot;building-your-extension-with-distutils&quot; name=&quot;building-your-extension-with-distutils&quot;&gt;13&amp;nbsp;&amp;nbsp;&amp;nbsp;Building Your Extension with distutils&lt;/a&gt;&lt;/h1&gt;
 &lt;p&gt;To build the example in &lt;a class=&quot;reference&quot; href=&quot;#a-simple-c-example&quot;&gt;A Simple C++ Example&lt;/a&gt; using distutils, it is
 sufficient to create a standard &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;setup.py&lt;/span&gt;&lt;/tt&gt;, listing &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;word.sip&lt;/span&gt;&lt;/tt&gt; among the
 files to build, and hook-up SIP into distutils:&lt;/p&gt;
@@ -5672,7 +6054,7 @@ special line which is needed so that SIP can see and process &lt;tt class=&quot;docutils
 Then, running &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;setup.py&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;build&lt;/span&gt;&lt;/tt&gt; will build our extension module.&lt;/p&gt;
 &lt;/div&gt;
 &lt;div class=&quot;section&quot;&gt;
-&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id235&quot; id=&quot;builtin-modules-and-custom-interpreters&quot; name=&quot;builtin-modules-and-custom-interpreters&quot;&gt;14&amp;nbsp;&amp;nbsp;&amp;nbsp;Builtin Modules and Custom Interpreters&lt;/a&gt;&lt;/h1&gt;
+&lt;h1&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;#id260&quot; id=&quot;builtin-modules-and-custom-interpreters&quot; name=&quot;builtin-modules-and-custom-interpreters&quot;&gt;14&amp;nbsp;&amp;nbsp;&amp;nbsp;Builtin Modules and Custom Interpreters&lt;/a&gt;&lt;/h1&gt;
 &lt;p&gt;Sometimes you want to create a custom Python interpreter with some modules
 built in to the interpreter itself rather than being dynamically loaded.  To
 do this the module must be created as a static library and linked with a</diff>
      <filename>doc/sipref.html</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@
 -----------------
 
 :Contact:   info@riverbankcomputing.com
-:Version:   4.7.8-snapshot-20081102
+:Version:   4.8-snapshot-20090225
 :Copyright: Copyright (c) 2008 Riverbank Computing Limited
 
 .. contents::
@@ -17,7 +17,7 @@
 Introduction
 ============
 
-This is the reference guide for SIP 4.7.8-snapshot-20081102.  SIP is a tool for
+This is the reference guide for SIP 4.8-snapshot-20090225.  SIP is a tool for
 automatically generating `Python &lt;http://www.python.org&gt;`__ bindings for C and
 C++ libraries.  SIP was originally developed in 1998 for
 `PyQt &lt;http://www.riverbankcomputing.com/software/pyqt/&gt;`__ - the Python
@@ -90,6 +90,9 @@ SIP, and the bindings it produces, have the following features.
       information to ensure that the class of a Python instance object matches
       the class of the corresponding C++ instance
 
+    - the ability to change the type and meta-type of the Python object used to
+      wrap a C/C++ data type
+
     - full support of the Python global interpreter lock, including the ability
       to specify that a C++ function of method may block, therefore allowing
       the lock to be released and other Python threads to run
@@ -176,6 +179,101 @@ SIP itself does not require Qt to be installed.
 Potential Incompatibilities with Earlier Versions
 =================================================
 
+SIP v4.8
+--------
+
+Prior to this version the `sipWrapper`_ structure had a member called ``user``
+which is available for handwritten code to use.  From this version ``user`` is
+a member of the `sipSimpleWrapper`_ structure.  `sipWrapper`_ pointers can be
+safely cast to `sipSimpleWrapper`_ pointers, so if your code does something
+like::
+
+    ((sipWrapper *)obj)-&gt;user = an_object_reference;
+
+then you just need to change it to::
+
+    ((sipSimpleWrapper *)obj)-&gt;user = an_object_reference;
+
+The generated class names are now ``const char *`` rather than ``char *``.
+
+The following deprecated parts of the API have been removed.
+
+    - The ``a``, ``A``, ``M``, ``N``, ``O``, ``P`` and ``T`` format characters
+      from `sipBuildResult()`_ and `sipCallMethod()`_.
+
+    - The ``a``, ``A``, ``L`` and ``M`` format characters from
+      `sipParseResult()`_.
+
+    - ``sipConvertToCpp()``, ``sipIsSubClassInstance()`` and ``sipTransfer()``.
+
+    - The old-style generated type convertors.
+
+    - The ``transfer()`` function of the ``sip`` module.
+
+In addition the deprecated ``-a`` command line option to ``configure.py`` has
+been removed.
+
+The following parts of the API are now deprecated (but still supported).
+
+    - The `Generated Type Objects`_.
+
+    - The `Generated Named Enum Type Objects`_.
+
+    - `sipConvertFromInstance()`_
+
+    - `sipConvertFromMappedType()`_
+
+    - `sipConvertFromNamedEnum()`_
+
+    - `sipConvertFromNewInstance()`_
+
+    - `sipCanConvertToInstance()`_
+
+    - `sipCanConvertToMappedType()`_
+
+    - `sipConvertToInstance()`_
+
+    - `sipConvertToMappedType()`_
+
+    - `sipForceConvertToInstance()`_
+
+    - `sipForceConvertToMappedType()`_
+
+    - `sipClassName()`_
+
+    - `sipFindClass()`_
+
+    - `sipFindNamedEnum()`_
+
+    - `sipFindMappedType()`_
+
+    - `sipGetWrapper()`_
+
+    - `sipReleaseInstance()`_
+
+    - `sipReleaseMappedType()`_
+
+    - `sipWrapper_Check()`_
+
+    - The ``B``, ``C`` and ``E`` format characters of `sipBuildResult()`_ and
+      `sipCallMethod()`_.
+
+    - The ``C`` and ``E`` format character of `sipParseResult()`_.
+
+The following PyQt-specific support functions have been removed.
+
+    - ``sipConnectRx()``
+
+    - ``sipDisconnectRx()``
+
+    - ``sipEmitSlot()``
+
+    - ``sipGetSender()``
+
+The handling of virtual methods in `%MethodCode`_ has been simplified slightly
+and the ``sipProtectVirt_*()`` functions are no longer generated.
+
+
 SIP v4.7.8
 ----------
 
@@ -206,13 +304,11 @@ SIP v4.4
 
     - The ``SIP_BUILD`` C preprocessor symbol has been removed.
 
-    - `sipConvertToCpp()`_, `sipIsSubClassInstance()`_ and the old `Generated
-      Type Convertors`_ have been deprecated.  The functions
-      `sipCanConvertToInstance()`_, `sipConvertToInstance()`_,
-      `sipForceConvertToInstance()`_, `sipConvertFromInstance()`_,
-      `sipConvertFromNewInstance()`_, `sipCanConvertToMappedType()`_,
-      `sipConvertToMappedType()`_, `sipForceConvertToMappedType()`_ and
-      `sipConvertFromMappedType()`_ should be used instead.  Handwritten
+    - ``sipConvertToCpp()``, ``sipIsSubClassInstance()`` and the old-style
+      generated type convertors have been deprecated.  The functions
+      `sipCanConvertToType()`_, `sipConvertToType()`_,
+      `sipForceConvertToType()`_, `sipConvertFromType()`_ and
+      `sipConvertFromNewType()`_ should be used instead.  Handwritten
       `%ConvertFromTypeCode`_ and `%ConvertToTypeCode`_ now has the
       responsibility for using these to implement the ``Transfer`` and
       ``TransferBack`` annotations.
@@ -254,11 +350,6 @@ interpreter for which you wish SIP to generate bindings for.
 The full set of command line options is:
 
 -h       Display a help message.
--a       Export all symbols in any SIP generated module and the SIP module
-         itself.  This was the default behaviour of SIP prior to v4.2.
-         Normally only a module's inititialisation function is exported.  This
-         option is deprecated as the ``ModuleMakefile`` class of `The SIP Build
-         System`_ allows this to be specified on a per module basis.
 -b dir   The SIP code generator will be installed in the directory ``dir``.
 -d dir   The SIP module will be installed in the directory ``dir``.
 -e dir   The SIP header file will be installed in the directory ``dir``.
@@ -806,6 +897,65 @@ heap using the ``free()`` function.
 See also `sipTransferTo()`_, `sipTransferBack()`_ and `sipTransferBreak()`_.
 
 
+Types and Meta-types
+--------------------
+
+Every Python object (with the exception of the ``object`` object itself) has a
+meta-type and at least one super-type.  By default an object's meta-type is the
+meta-type of its first super-type.
+
+SIP implements two super-types, ``sip.simplewrapper`` and ``sip.wrapper``, and
+a meta-type, ``sip.wrappertype``.
+
+``sip.simplewrapper`` is the super-type of ``sip.wrapper``.  The super-type of
+``sip.simplewrapper`` is ``object``.
+
+``sip.wrappertype`` is the meta-type of both ``sip.simplewrapper`` and
+``sip.wrapper``.  The super-type of ``sip.wrappertype`` is ``type``.
+
+``sip.wrapper`` supports the concept of object ownership described in
+`Ownership of Objects`_ and, by default, is the super-type of all the types
+that SIP generates.
+
+``sip.simplewrapper`` does not support the concept of object ownership but SIP
+generated types that are sub-classed from it have Python objects that take less
+memory.
+
+SIP allows a class's meta-type and super-type to be explicitly specified using
+the `Metatype`_ and `Supertype`_ class annotations.
+
+SIP also allows the default meta-type and super-type to be changed for a module
+using the `%DefaultMetatype`_ and `%DefaultSupertype`_ directives.
+
+If you want to use your own meta-type or super-type then they must be
+sub-classed from one of the SIP provided types.  Your types must be registered
+using `sipRegisterPyType()`_.  This is normally done in code specified using
+the `%InitialisationCode`_ directive.
+
+As an example, PyQt4 uses `%DefaultMetatype`_ to specify a new meta-type that
+handles the interaction with Qt's own meta-type system.  It also uses
+`%DefaultSupertype`_ to specify that the smaller ``sip.simplewrapper``
+super-type is normally used.  Finally it uses `Supertype`_ as an annotation of
+the ``QObject`` class to override the default and use ``sip.wrapper`` as the
+super-type so that the parent/child relationships of ``QObject`` instances are
+properly maintained.
+
+
+Lazy Type Attributes
+--------------------
+
+Instead of populating a wrapped type's dictionary with its attributes (or
+descriptors for those attributes) SIP only creates objects for those attributes
+when they are actually needed.  This is done to reduce the memory footprint and
+start up time when used to wrap large libraries with hundreds of classes and
+tens of thousands of attributes.
+
+SIP allows you to extend the handling of lazy attributes to your own attribute
+types by allowing you to register an attribute getter handler (using
+`sipRegisterAttributeGetter()`_).  This will be called just before a type's
+dictionary is accessed for the first time.
+
+
 Support for Python's Buffer Interface
 -------------------------------------
 
@@ -987,17 +1137,14 @@ file.
     *module-statement* ::= [*module-directive* | *statement*]
 
     *module-directive* ::= [`%CModule`_ | `%CompositeModule`_ |
-            `%ConsolidatedModule`_ | `%Copying`_ | `%Doc`_ | `%ExportedDoc`_ |
+            `%ConsolidatedModule`_ | `%Copying`_ | `%DefaultMetatype`_ |
+            `%DefaultSupertype`_ | `%Doc`_ | `%ExportedDoc`_ |
             `%ExportedHeaderCode`_ | `%Feature`_ | `%Import`_ | `%Include`_ |
-            `%License`_ | `%MappedType`_ | *mapped-type-template* |
-            `%Module`_ | `%ModuleCode`_ | `%ModuleHeaderCode`_ |
-            `%OptionalInclude`_ | `%Platforms`_ | `%PreInitialisationCode`_ |
-            `%PostInitialisationCode`_ | *sip-option-list* | `%Timeline`_ |
-            `%UnitCode`_]
-
-    *sip-option-list* :: `%SIPOptions`_ ``(`` *option-list* ``)``
-
-    *option-list* ::= *option* [``,`` *option-list*]
+            `%InitialisationCode`_ | `%License`_ | `%MappedType`_ |
+            *mapped-type-template* | `%Module`_ | `%ModuleCode`_ |
+            `%ModuleHeaderCode`_ | `%OptionalInclude`_ | `%Platforms`_ |
+            `%PreInitialisationCode`_ | `%PostInitialisationCode`_ |
+            `%Timeline`_ | `%UnitCode`_]
 
     *statement* :: [*class-statement* | *function* | *variable*]
 
@@ -1206,6 +1353,8 @@ file.
 
     *template* ::= *scoped-name* ``&lt;`` *type-list* ``&gt;``
 
+    *dotted-name* ::= *name* [``.`` *dotted-name*]
+
     *name* ::= _A-Za-z {_A-Za-z0-9}
 
 Here is a short list of differences between C++ and the subset supported by
@@ -1673,7 +1822,7 @@ list of ``QWidget`` instances::
 
             // Get the Python wrapper for the QWidget instance, creating a new
             // one if necessary, and handle any ownership transfer.
-            if ((wobj = sipConvertFromInstance(w, sipClass_QWidget, sipTransferObj)) == NULL)
+            if ((wobj = sipConvertFromType(w, sipType_QWidget, sipTransferObj)) == NULL)
             {
                 // There was an error so garbage collect the Python list.
                 Py_DECREF(l);
@@ -1732,6 +1881,14 @@ void \*\*sipCppRet
     C++ address of the instance when cast (usually using ``static_cast``)
     from the super-class to the sub-class.
 
+const sipTypeDef \*sipType
+    The handwritten code must set this to the SIP generated type structure
+    that corresponds to the class instance.  (The type structure for class
+    ``Klass`` is ``sipType_Klass``.)  If the RTTI of the class instance isn't
+    recognised then ``sipType`` must be set to ``NULL``.  The code doesn't
+    have to recognise the exact class, only the most specific sub-class that
+    it can.
+
 sipWrapperType \*sipClass
     The handwritten code must set this to the SIP generated Python type object
     that corresponds to the class instance.  (The type object for class
@@ -1740,6 +1897,8 @@ sipWrapperType \*sipClass
     have to recognise the exact class, only the most specific sub-class that
     it can.
 
+    This is deprecated from SIP v4.8.  Instead you should use ``sipType``.
+
 The handwritten code must not explicitly return.
 
 The following example shows the sub-class conversion code for ``QEvent`` based
@@ -1749,22 +1908,22 @@ class hierarchy in PyQt::
     {
     %ConvertToSubClassCode
         // QEvent sub-classes provide a unique type ID.
-        switch (sipCpp -&gt; type())
+        switch (sipCpp-&gt;type())
         {
         case QEvent::Timer:
-            sipClass = sipClass_QTimerEvent;
+            sipType = sipType_QTimerEvent;
             break;
 
         case QEvent::KeyPress:
         case QEvent::KeyRelease:
-            sipClass = sipClass_QKeyEvent;
+            sipType = sipType_QKeyEvent;
             break;
 
         // Skip the remaining event types to keep the example short.
 
         default:
             // We don't recognise the type.
-            sipClass = NULL;
+            sipType = NULL;
         }
     %End
 
@@ -1772,10 +1931,6 @@ class hierarchy in PyQt::
 
     };
 
-The SIP API includes the `sipMapIntToClass()`_ and `sipMapStringToClass()`_
-functions that convert integer and string based RTTI to Python type objects
-based on ordered lookup tables.
-
 
 %ConvertToTypeCode
 ------------------
@@ -1855,8 +2010,8 @@ The following example converts a Python list of ``QPoint`` instances to a
             // disallow None because it is a list of QPoint, not of a pointer
             // to a QPoint, so None isn't appropriate.
             for (int i = 0; i &lt; PyList_GET_SIZE(sipPy); ++i)
-                if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i),
-                                             sipClass_QPoint, SIP_NOT_NONE))
+                if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i),
+                                         sipType_QPoint, SIP_NOT_NONE))
                     return 0;
 
             // The type is valid.
@@ -1874,16 +2029,16 @@ The following example converts a Python list of ``QPoint`` instances to a
             // Get the address of the element's C++ instance.  Note that, in
             // this case, we don't apply any ownership changes to the list
             // elements, only to the list itself.
-            qp = reinterpret_cast&lt;QPoint *&gt;(sipConvertToInstance(
+            qp = reinterpret_cast&lt;QPoint *&gt;(sipConvertToType(
                                                     PyList_GET_ITEM(sipPy, i),
-                                                    sipClass_QPoint, 0,
+                                                    sipType_QPoint, 0,
                                                     SIP_NOT_NONE,
                                                     &amp;state, sipIsErr));
 
             // Deal with any errors.
             if (*sipIsErr)
             {
-                sipReleaseInstance(qp, sipClass_QPoint, state);
+                sipReleaseType(qp, sipType_QPoint, state);
 
                 // Tidy up.
                 delete ql;
@@ -1897,8 +2052,8 @@ The following example converts a Python list of ``QPoint`` instances to a
             // A copy of the QPoint was appended to the list so we no longer
             // need it.  It may be a temporary instance that should be
             // destroyed, or a wrapped instance that should not be destroyed.
-            // sipReleaseInstance() will do the right thing.
-            sipReleaseInstance(qp, sipClass_QPoint, state);
+            // sipReleaseType() will do the right thing.
+            sipReleaseType(qp, sipType_QPoint, state);
         }
 
         // Return the instance.
@@ -1915,10 +2070,9 @@ When used in a class specification the handwritten code replaces the code that
 would normally be automatically generated.  This means that the handwritten
 code must also handle instances of the class itself and not just the additional
 types that are being supported.  This should be done by making calls to
-`sipCanConvertToInstance()`_ to check the object type and
-`sipConvertToInstance()`_ to convert the object.  The ``SIP_NO_CONVERTORS``
-flag *must* be passed to both these functions to prevent recursive calls to the
-handwritten code.
+`sipCanConvertToType()`_ to check the object type and `sipConvertToType()`_ to
+convert the object.  The ``SIP_NO_CONVERTORS`` flag *must* be passed to both
+these functions to prevent recursive calls to the handwritten code.
 
 
 %Copying
@@ -1937,10 +2091,54 @@ include copyright and licensing terms.
 For example::
 
     %Copying
-    Copyright (c) 2007 Riverbank Computing Limited
+    Copyright (c) 2008 Riverbank Computing Limited
     %End
 
 
+%DefaultMetatype
+----------------
+
+.. parsed-literal::
+
+    %DefaultMetatype *dotted-name*
+
+This directive is used to specify the Python type that should be used as the
+meta-type for any C/C++ data type that doesn't have an explicit super-type.
+
+If this is not specified then ``sip.wrappertype`` is used.
+
+You can also use the `Metatype`_ class annotation to specify the meta-type
+used by a particular C/C++ type.
+
+See the section `Types and Meta-types`_ for more details.
+
+For example::
+
+    %DefaultMetatype PyQt4.QtCore.pyqtWrapperType
+
+
+%DefaultSupertype
+-----------------
+
+.. parsed-literal::
+
+    %DefaultSupertype *dotted-name*
+
+This directive is used to specify the Python type that should be used as the
+super-type for any C/C++ data type that doesn't have an explicit super-type.
+
+If this is not specified then ``sip.wrapper`` is used.
+
+You can also use the `Supertype`_ class annotation to specify the super-type
+used by a particular C/C++ type.
+
+See the section `Types and Meta-types`_ for more details.
+
+For example::
+
+    %DefaultSupertype sip.simplewrapper
+
+
 %Doc
 ----
 
@@ -2335,6 +2533,7 @@ following parts of a specification are affected by it:
     - `%GCClearCode`_
     - `%GCTraverseCode`_
     - `%If`_
+    - `%InitialisationCode`_
     - `%MappedType`_
     - `%MethodCode`_
     - `%ModuleCode`_
@@ -2396,6 +2595,30 @@ For example::
     %Include qwidget.sip
 
 
+%InitialisationCode
+-------------------
+
+.. parsed-literal::
+
+    %InitialisationCode
+        *code*
+    %End
+
+This directive is used to specify handwritten code that is embedded in-line
+in the generated module initialisation code after the SIP module has been
+imported but before the module itself has been intialised.
+
+It is typically used to call `sipRegisterPyType()`_.
+
+For example::
+
+    %InitialisationCode
+        // The code will be executed when the module is first imported, after
+        // the SIP module has been imported, but before other module-specific
+        // initialisation has been completed.
+    %End
+
+
 %License
 --------
 
@@ -2484,8 +2707,8 @@ For example::
             // Now check each element of the list is of the type we expect.
             // The template is for a pointer type so we don't disallow None.
             for (int i = 0; i &lt; PyList_GET_SIZE(sipPy); ++i)
-                if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i),
-                                             sipClass_Type, 0))
+                if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i),
+                                         sipType_Type, 0))
                     return 0;
 
             return 1;
@@ -2499,9 +2722,9 @@ For example::
             // Use the SIP API to convert the Python object to the
             // corresponding C++ instance.  Note that we apply any ownership
             // transfer to the list itself, not the individual elements.
-            Type *t = reinterpret_cast&lt;Type *&gt;(sipConvertToInstance(
+            Type *t = reinterpret_cast&lt;Type *&gt;(sipConvertToType(
                                                 PyList_GET_ITEM(sipPy, i),
-                                                sipClass_Type, 0, 0, 0,
+                                                sipType_Type, 0, 0, 0,
                                                 sipIsErr));
 
             if (*sipIsErr)
@@ -2538,7 +2761,7 @@ For example::
             Type *t = sipCpp -&gt; at(i);
             PyObject *tobj;
 
-            if ((tobj = sipConvertFromInstance(t, sipClass_Type, sipTransferObj)) == NULL)
+            if ((tobj = sipConvertFromType(t, sipType_Type, sipTransferObj)) == NULL)
             {
                 // There was an error so garbage collect the Python list.
                 Py_DECREF(l);
@@ -2666,17 +2889,6 @@ PyObject \*sipSelf
     or method then this is the Python object that wraps the the structure or
     class instance, i.e. ``self``.
 
-bool sipSelfWasArg
-    This is only made available for non-abstract, virtual methods.  It is set
-    if ``self`` was explicitly passed as the first argument of the method
-    rather than being bound to the method.  In other words, the call was::
-
-        Klass.foo(self, ...)
-
-    rather than::
-
-        self.foo(...)
-
 If the `NoArgParser`_ annotation has been used then only the following
 variables are made available to the handwritten code:
 
@@ -2701,8 +2913,7 @@ The following is a complete example::
             if (PyArg_ParseTuple(a0, &quot;ii&quot;, &amp;iarr[0], &amp;iarr[1]))
             {
                 Py_BEGIN_ALLOW_THREADS
-                sipRes = sipSelfWasArg ? sipCpp -&gt; Klass::foo(iarr)
-                                       : sipCpp -&gt; foo(iarr);
+                sipCpp -&gt; Klass::foo(iarr);
                 Py_END_ALLOW_THREADS
             }
             else
@@ -2713,17 +2924,12 @@ The following is a complete example::
     %End
     };
 
-As the example is a virtual method [#]_, note the use of ``sipSelfWasArg`` to
+As the example is a virtual method [#]_, note the use of an explicit scope to
 determine exactly which implementation of ``foo()`` to call.
 
 If a method is in the ``protected`` section of a C++ class then the call
 should instead be::
 
-    sipRes = sipCpp -&gt; sipProtectVirt_foo(sipSelfWasArg, iarr);
-
-If a method is in the ``protected`` section of a C++ class but is not virtual
-then the call should instead be::
-
     sipRes = sipCpp -&gt; sipProtect_foo(iarr);
 
 .. [#] See `%VirtualCatcherCode`_ for a description of how SIP generated code
@@ -3017,14 +3223,6 @@ PyObject \*sipPyType
 See the `%GetCode`_ directive for an example.
 
 
-%SIPOptions
------------
-
-This directive sets one or more options that controls different aspects of
-SIP's behaviour.  In this version all the available options are provided
-specifically to support PyQt and so are not documented.
-
-
 %Timeline
 ---------
 
@@ -3265,6 +3463,10 @@ name
     The value is a name that is compatible with a C/C++ identifier.  In some
     cases the value is optional.
 
+dotted name
+    The value is a name that is compatible with an identifier preceded by a
+    Python scope.
+
 string
     The value is a double quoted string.
 
@@ -3525,6 +3727,16 @@ module.  Declarations of external classes are private to the module in which
 they appear.
 
 
+Metatype
+********
+
+This dotted name annotation specifies the name of the Python type object (i.e.
+the value of the ``tp_name`` field) used as the meta-type used when creating
+the type object for this C structure or C++ type.
+
+See the section `Types and Meta-types`_ for more details.
+
+
 NoDefaultCtors
 **************
 
@@ -3542,6 +3754,16 @@ clashes with other objects (e.g. enums, exceptions, functions) that have the
 same name in the same C++ scope.
 
 
+Supertype
+*********
+
+This dotted name annotation specifies the name of the Python type object (i.e.
+the value of the ``tp_name`` field) used as the super-type used when creating
+the type object for this C structure or C++ type.
+
+See the section `Types and Meta-types`_ for more details.
+
+
 Mapped Type Annotations
 -----------------------
 
@@ -3549,9 +3771,9 @@ NoRelease
 *********
 
 This boolean annotation is used to specify that the mapped type does not
-support the `sipReleaseMappedType()`_ function.  Any `%ConvertToTypeCode`_
-should not create temporary instances of the mapped type, i.e. it should not
-return ``SIP_TEMPORARY``.
+support the `sipReleaseType()`_ function.  Any `%ConvertToTypeCode`_ should not
+create temporary instances of the mapped type, i.e. it should not return
+``SIP_TEMPORARY``.
 
 
 Enum Annotations
@@ -3928,11 +4150,6 @@ PyObject \*sipBuildResult(int \*iserr, const char \*format, ...)
     will create, and the entry in brackets are the types of the C/C++ values
     to be passed. 
 
-    ``a`` (string) [char \*, int]
-        Convert a C/C++ character array and its length to a Python string.  If
-        the array is ``NULL`` then the length is ignored and the result is
-        ``Py_None``.  This is deprecated, use ``g`` instead.
-
     ``b`` (boolean) [int]
         Convert a C/C++ ``int`` to a Python boolean.
 
@@ -3989,11 +4206,6 @@ PyObject \*sipBuildResult(int \*iserr, const char \*format, ...)
         unicode object.  If the string pointer is ``NULL`` then the result is
         ``Py_None``.
 
-    ``A`` (unicode) [wchar_t \*, int]
-        Convert a C/C++ wide character array and its length to a Python unicode
-        object.  If the array is ``NULL`` then the length is ignored and the
-        result is ``Py_None``.  This is deprecated, use ``G`` instead.
-
     ``B`` (wrapped instance) [*type* \*, sipWrapperType \*, PyObject \*]
         Convert a new C structure or a new C++ class instance to a Python class
         instance object.  Ownership of the structure or instance is determined
@@ -4004,6 +4216,8 @@ PyObject \*sipBuildResult(int \*iserr, const char \*format, ...)
         ``PyObject *`` argument.  The Python class is influenced by any
         applicable `%ConvertToSubClassCode`_ code.
 
+        This is deprecated from SIP v4.8.  Instead you should use ``N``.
+
     ``C`` (wrapped instance) [*type* \*, sipWrapperType \*, PyObject \*]
         Convert a C structure or a C++ class instance to a Python class
         instance object.  If the structure or class instance has already been
@@ -4018,54 +4232,45 @@ PyObject \*sipBuildResult(int \*iserr, const char \*format, ...)
         via a call to `sipTransferTo()`_.  The Python class is influenced by
         any applicable `%ConvertToSubClassCode`_ code.
 
-    ``D`` (object) [*type* \*, const sipMappedType \*, PyObject \*]
-        Convert a C structure or a C++ class instance wrapped as a mapped type
-        to a Python object.  Ownership of the structure or instance is
-        determined by the ``PyObject *`` argument.  If it is ``NULL`` then the
-        ownership is unchanged.  If it is ``Py_None`` then ownership is
-        transferred to Python via a call to `sipTransferBack()`_.  Otherwise
-        ownership is transferred to C/C++ and the instance associated with the
-        ``PyObject *`` argument via a call to `sipTransferTo()`_.
+        This is deprecated from SIP v4.8.  Instead you should use ``D``.
+
+    ``D`` (wrapped instance) [*type* \*, const sipTypeDef \*, PyObject \*]
+        Convert a C structure, C++ class or mapped type instance to a Python
+        object.  If the instance has already been wrapped then the result is a
+        new reference to the existing object.  Ownership of the instance is
+        determined by the ``PyObject *`` argument.  If it is ``NULL`` and the
+        instance has already been wrapped then the ownership is unchanged.  If
+        it is ``NULL`` and the instance is newly wrapped then ownership will be
+        with C/C++.  If it is ``Py_None`` then ownership is transferred to
+        Python via a call to `sipTransferBack()`_.  Otherwise ownership is
+        transferred to C/C++ and the instance associated with the
+        ``PyObject *`` argument via a call to `sipTransferTo()`_.  The Python
+        class is influenced by any applicable `%ConvertToSubClassCode`_ code.
 
     ``E`` (wrapped enum) [enum, PyTypeObject \*]
         Convert a named C/C++ ``enum`` to an instance of the corresponding
         Python named enum type.
 
+        This is deprecated from SIP v4.8.  Instead you should use ``F``.
+
+    ``F`` (wrapped enum) [enum, sipTypeDef \*]
+        Convert a named C/C++ ``enum`` to an instance of the corresponding
+        Python named enum type.
+
     ``G`` (unicode) [wchar_t \*, SIP_SSIZE_T]
         Convert a C/C++ wide character array and its length to a Python unicode
         object.  If the array is ``NULL`` then the length is ignored and the
         result is ``Py_None``.
 
-    ``M`` (wrapped instance) [*type* \*, sipWrapperType \*]
-        Convert a C structure or a C++ class instance to a Python class
-        instance object.  If the structure or class instance has already been
-        wrapped then the result is a new reference to the existing class
-        instance object.  If the instance has already been wrapped then the
-        ownership is unchanged.  If the instance is newly wrapped then
-        ownership will be with C/C++.  The Python class is influenced by any
-        applicable `%ConvertToSubClassCode`_ code.  This is deprecated from
-        SIP v4.4.
-
-    ``N`` (wrapped instance) [*type* \*, sipWrapperType \*]
-        Convert a C structure or a C++ class instance to a Python class
-        instance object.  This should not be used if the structure or class
-        instance might already have been wrapped.  Ownership of the structure
-        or instance will be with Python.  The Python class is influenced by
-        any applicable `%ConvertToSubClassCode`_ code.  This is deprecated
-        from SIP v4.4.
-
-    ``O`` (wrapped instance) [*type* \*, sipWrapperType \*]
-        Convert a C structure or a C++ class instance to a Python class
-        instance object.  If the structure or class instance has already been
-        wrapped then the result is a new reference to the existing class
-        instance object.  Ownership of the structure or instance will be with
-        C/C++.  This is deprecated from SIP v4.4.
-
-    ``P`` (wrapped instance) [*type* \*, sipWrapperType \*]
-        Convert a C structure or a C++ class instance to a Python class
-        instance object.  This should not be used if the structure or class
-        instance might already have been wrapped.  Ownership of the structure
-        or instance will be with Python.  This is deprecated from SIP v4.4.
+    ``N`` (wrapped instance) [*type* \*, sipTypeDef \*, PyObject \*]
+        Convert a new C structure, C++ class or mapped type instance to a
+        Python object.  Ownership of the instance is determined by the
+        ``PyObject *`` argument.  If it is ``NULL`` and the instance has
+        already been wrapped then the ownership is unchanged.  If it is
+        ``NULL`` or ``Py_None`` then ownership will be with Python.  Otherwise
+        ownership will be with C/C++ and the instance associated with the
+        ``PyObject *`` argument.  The Python class is influenced by any
+        applicable `%ConvertToSubClassCode`_ code.
 
     ``R`` (object) [PyObject \*]
         The result is value passed without any conversions.  The reference
@@ -4075,11 +4280,6 @@ PyObject \*sipBuildResult(int \*iserr, const char \*format, ...)
         The result is value passed without any conversions.  The reference
         count is incremented.
 
-    ``T`` (object) [void \*, PyObject \*(\*)(void \*cppptr)]
-        Convert a C structure or a C++ class instance to a Python object using
-        a convertor function.  See `Generated Type Convertors`_.  This is
-        deprecated from SIP v4.4.
-
     ``V`` (sip.voidptr) [void \*]
         Convert a C/C++ ``void *`` Python ``sip.voidptr`` object.
 
@@ -4116,6 +4316,9 @@ int sipCanConvertToInstance(PyObject \*obj, sipWrapperType \*type, int flags)
         - ``SIP_NO_CONVERTORS`` suppresses the use of of any
           `%ConvertToTypeCode`_ for *type*.
 
+    This is deprecated from SIP v4.8.  Instead you should use
+    `sipCanConvertToType()`_.
+
 
 sipCanConvertToMappedType()
 ---------------------------
@@ -4129,6 +4332,25 @@ int sipCanConvertToMappedType(PyObject \*obj, const sipMappedType \*mt, int flag
 
         - ``SIP_NOT_NONE`` causes the check to fail if *obj* is ``None``.
 
+    This is deprecated from SIP v4.8.  Instead you should use
+    `sipCanConvertToType()`_.
+
+
+sipCanConvertToType()
+---------------------
+
+int sipCanConvertToType(PyObject \*obj, const sipTypeDef \*td, int flags)
+    This returns a non-zero value if a Python object can be converted to an
+    instance of a C structure, C++ class or mapped type.  *obj* is the Python
+    object.  *td* is the generated type structure corresponding to the C/C++
+    type being checked.  *flags* is any combination of the following values
+    used to fine tune the check.
+
+        - ``SIP_NOT_NONE`` causes the check to fail if *obj* is ``None``.
+
+        - ``SIP_NO_CONVERTORS`` suppresses the use of of any
+          `%ConvertToTypeCode`_ for *td*.  It is ignored for mapped types.
+
 
 sipClassName()
 --------------
@@ -4137,21 +4359,9 @@ PyObject \*sipClassName(PyObject \*obj)
     This returns the class name of a wrapped instance as a Python string.  It
     comes with a reference.
 
+    This is deprecated from SIP v4.8.  Instead you should use the following::
 
-sipConnectRx()
---------------
-
-PyObject \*sipConnectRx(PyObject \*sender, const char \*signal, PyObject \*receiver, const char \*slot, int type)
-    This connects a signal to a signal or slot and returns ``Py_True`` if the
-    signal was connected or ``Py_False`` if not.  If there was some other
-    error then a Python exception is raised and ``NULL`` is returned.  *sender*
-    is the wrapped ``QObject`` derived instance that emits the signal.
-    *signal* is the typed name of the signal.  *receiver* is the wrapped
-    ``QObject`` derived instance or Python callable that the signal is
-    connected to.  *slot* is the typed name of the slot, or ``NULL`` if
-    *receiver* is a Python callable.  *type* is the type of connection and is
-    cast from Qt::ConnectionType.  It is normally only used by PyQt to
-    implement ``QObject.connect()``.
+        PyString_FromString(obj-&gt;ob_type-&gt;tp_name)
 
 
 sipConvertFromConstVoidPtr()
@@ -4173,6 +4383,16 @@ PyObject \*sipConvertFromConstVoidPtrAndSize(const void \*cpp, SIP_SSIZE_T size)
     object.
 
 
+sipConvertFromEnum()
+--------------------
+
+PyObject \*sipConvertFromEnum(int eval, const sipTypeDef \*td)
+    This converts a named C/C++ ``enum`` to an instance of the corresponding
+    generated Python named enum type.  *eval* is the enumerated value to
+    convert.  *td* is the generated Python type structure (see `Generated Type
+    Structures`_).
+
+
 sipConvertFromInstance()
 ------------------------
 
@@ -4192,6 +4412,9 @@ PyObject \*sipConvertFromInstance(void \*cpp, sipWrapperType \*type, PyObject \*
     `sipTransferTo()`_.  The Python class is influenced by any applicable
     `%ConvertToSubClassCode`_ code.
 
+    This is deprecated from SIP v4.8.  Instead you should use
+    `sipConvertFromType()`_.
+
 
 sipConvertFromMappedType()
 --------------------------
@@ -4206,6 +4429,9 @@ PyObject \*sipConvertFromMappedType(void \*cpp, const sipMappedType \*mt, PyObje
     C/C++ and the instance associated with the ``PyObject *`` argument via a
     call to `sipTransferTo()`_.
 
+    This is deprecated from SIP v4.8.  Instead you should use
+    `sipConvertFromType()`_.
+
 
 sipConvertFromNamedEnum()
 -------------------------
@@ -4216,6 +4442,9 @@ PyObject \*sipConvertFromNamedEnum(int eval, PyTypeObject \*type)
     is the generated Python type object (see `Generated Named Enum Type
     Objects`_).
 
+    This is deprecated from SIP v4.8.  Instead you should use
+    `sipConvertFromEnum()`_.
+
 
 sipConvertFromNewInstance()
 ---------------------------
@@ -4229,6 +4458,22 @@ PyObject \*sipConvertFromNewInstance(void \*cpp, sipWrapperType \*type, PyObject
     the instance associated with *transferObj*.  The Python class is influenced
     by any applicable `%ConvertToSubClassCode`_ code.
 
+    This is deprecated from SIP v4.8.  Instead you should use
+    `sipConvertFromNewType()`_.
+
+
+sipConvertFromNewType()
+-----------------------
+
+PyObject \*sipConvertFromNewType(void \*cpp, const sipTypeDef \*td, PyObject \*transferObj)
+    This converts a new C structure, C++ class or mapped type instance to a
+    Python object.  *cpp* is the C/C++ instance.  *td* is the generated type
+    structure corresponding to the C/C++ type.  *transferObj* controls the
+    ownership of the returned value.  If it is ``NULL`` or ``Py_None`` then
+    ownership will be with Python.  Otherwise ownership will be with C/C++ and
+    the instance associated with *transferObj*.  The Python class is influenced
+    by any applicable `%ConvertToSubClassCode`_ code.
+
 
 sipConvertFromSequenceIndex()
 -----------------------------
@@ -4250,6 +4495,26 @@ int sipConvertFromSliceObject(PyObject \*slice, SIP_SSIZE_T length, SIP_SSIZE_T
     compatible with SIP v3.x and versions of Python earlier that v2.3.
 
 
+sipConvertFromType()
+--------------------
+
+PyObject \*sipConvertFromType(void \*cpp, const sipTypeDef \*td, PyObject \*transferObj)
+    This converts a C structure, a C++ class instance or a mapped type to a
+    Python object.  *cpp* is the C/C++ instance.  If the instance has already
+    been wrapped then the result is a new reference to the existing object.
+    *td* is the generated type structure corresponding to the C/C++ type.
+    *transferObj* controls the ownership of the returned value.  If the
+    structure or class instance has already been wrapped then the result is a
+    new reference to the existing object.  If it is ``NULL`` and the instance
+    has already been wrapped then the ownership is unchanged.  If it is
+    ``NULL`` and the instance is newly wrapped then ownership will be with
+    C/C++.  If it is ``Py_None`` then ownership is transferred to Python via a
+    call to `sipTransferBack()`_.  Otherwise ownership is transferred to C/C++
+    and the instance associated with *transferObj* via a call to
+    `sipTransferTo()`_.  The Python class is influenced by any applicable
+    `%ConvertToSubClassCode`_ code.
+
+
 sipConvertFromVoidPtr()
 -----------------------
 
@@ -4268,15 +4533,6 @@ PyObject \*sipConvertFromVoidPtrAndSize(void \*cpp, SIP_SSIZE_T size)
     object.
 
 
-sipConvertToCpp()
------------------
-
-void \*sipConvertToCpp(PyObject \*obj, sipWrapperType \*type, int \*iserr)
-    This function is deprecated from SIP v4.4.  It is equivalent to::
-
-        sipConvertToInstance(obj, type, NULL, SIP_NO_CONVERTORS, NULL, iserr);
-
-
 sipConvertToInstance()
 ----------------------
 
@@ -4308,6 +4564,9 @@ void \*sipConvertToInstance(PyObject \*obj, sipWrapperType \*type, PyObject \*tr
     that share the same error flag so that it only needs to be tested once
     rather than after each call.)
 
+    This is deprecated from SIP v4.8.  Instead you should use
+    `sipConvertToType()`_
+
 
 sipConvertToMappedType()
 ------------------------
@@ -4336,6 +4595,41 @@ void \*sipConvertToMappedType(PyObject \*obj, const sipMappedType \*mt, PyObject
     several calls to be made that share the same error flag so that it only
     needs to be tested once rather than after each call.)
 
+    This is deprecated from SIP v4.8.  Instead you should use
+    `sipConvertToType()`_
+
+
+sipConvertToType()
+------------------
+
+void \*sipConvertToType(PyObject \*obj, const sipTypeDef \*td, PyObject \*transferObj, int flags, int \*state, int \*iserr)
+    This converts a Python object to an instance of a C structure, C++ class or
+    mapped type assuming that a previous call to `sipCanConvertToType()`_ has
+    been successful.  *obj* is the Python object.  *td* is the generated type
+    structure corresponding to the C/C++ type returned.  It may be any class in
+    the object's class hierarchy.  *transferObj* controls any ownership changes
+    to *obj*.  If it is ``NULL`` then the ownership is unchanged.  If it is
+    ``Py_None`` then ownership is transferred to Python via a call to
+    `sipTransferBack()`_.  Otherwise ownership is transferred to C/C++ and
+    *obj* associated with *transferObj* via a call to `sipTransferTo()`_.
+    *flags* is any combination of the following values used to fine tune the
+    check.
+
+        - ``SIP_NOT_NONE`` causes the check to fail if *obj* is ``None``.
+
+        - ``SIP_NO_CONVERTORS`` suppresses the use of of any
+          `%ConvertToTypeCode`_ for *td*.  It is ignored for mapped types.
+
+    If *state* is not ``NULL`` then the location it points to is set to
+    describe the state of the returned C/C++ instance and is the value returned
+    by any `%ConvertToTypeCode`_.  The calling code must then release the value
+    at some point to prevent a memory leak by calling `sipReleaseType()`_.  If
+    there is an error then the location *iserr* points to is set to a non-zero
+    value.  If it was initially a non-zero value then the conversion isn't
+    attempted in the first place.  (This allows several calls to be made that
+    share the same error flag so that it only needs to be tested once rather
+    than after each call.)
+
 
 sipConvertToVoidPtr()
 ---------------------
@@ -4347,33 +4641,6 @@ void \*sipConvertToVoidPtr(PyObject \*obj)
     was successful.
 
 
-sipDisconnectRx()
------------------
-
-PyObject \*sipDisconnectRx(PyObject \*sender, const char \*signal, PyObject \*receiver, const char \*slot)
-    This disconnects a signal from a signal or slot and returns ``Py_True`` if
-    the signal was disconnected or ``Py_False`` if not.  If there was some
-    other error then a Python exception is raised and ``NULL`` is returned.
-    *sender* is the wrapped ``QObject`` derived instance that emits the signal.
-    *signal* is the typed name of the signal.  *receiver* is the wrapped
-    ``QObject`` derived instance or Python callable that the signal is
-    connected to.  *slot* is the typed name of the slot, or ``NULL`` if
-    *receiver* is a Python callable.  It is normally only used by PyQt to
-    implement ``QObject.disconnect()``.
-
-
-sipEmitSignal()
----------------
-
-int sipEmitSignal(PyObject \*txobj, const char \*signal, PyObject \*args)
-    This emits a signal and returns zero if there was no error.  If there was
-    an error then a Python exception is raised and a negative value is
-    returned.  *txobj* is the wrapped ``QObject`` derived instance that emits
-    the signal.  *signal* is the typed name of the signal.  *args* is a Python
-    tuple of the signal arguments.  It is normally only used by PyQt to
-    implement ``QObject.emit()``.
-
-
 sipExportSymbol()
 -----------------
 
@@ -4395,6 +4662,8 @@ sipWrapperType \*sipFindClass(const char \*type)
     C/C++ type doesn't exist.  The value of the pointer will not change and
     may be saved in a static cache.
 
+    This is deprecated from SIP v4.8.  Instead you should use `sipFindType()`_.
+
 
 sipFindMappedType()
 -------------------
@@ -4405,6 +4674,8 @@ const sipMappedType \*sipFindMappedType(const char \*type)
     mapped type doesn't exist.  The value of the pointer will not change and
     may be saved in a static cache.
 
+    This is deprecated from SIP v4.8.  Instead you should use `sipFindType()`_.
+
 
 sipFindNamedEnum()
 ------------------
@@ -4415,6 +4686,18 @@ PyTypeObject \*sipFindNamedEnum(const char \*type)
     if the named C/C++ enum doesn't exist.  The value of the pointer will not
     change and may be saved in a static cache.
 
+    This is deprecated from SIP v4.8.  Instead you should use `sipFindType()`_.
+
+
+sipFindType()
+-------------
+
+const sipTypeDef \*sipFindType(const char \*type)
+    This returns a pointer to the SIP generated type structure corresponding to
+    a C/C++ type.  *type* is the C/C++ declaration of the type.  NULL is
+    returned if the type doesn't exist.  The value of the pointer will not
+    change and may be saved in a static cache.
+
 
 sipForceConvertToInstance()
 ---------------------------
@@ -4425,6 +4708,9 @@ void \*sipForceConvertToInstance(PyObject \*obj, sipWrapperType \*type, PyObject
     `sipConvertToInstance()`_.  See `sipConvertToInstance()`_ for a full
     description of the arguments.
 
+    This is deprecated from SIP v4.8.  Instead you should use
+    `sipForceConvertToType()`_.
+
 
 sipForceConvertToMappedType()
 -----------------------------
@@ -4436,6 +4722,19 @@ void \*sipForceConvertToMappedType(PyObject \*obj, const sipMappedType \*mt, PyO
     `sipConvertToMappedType()`_.  See `sipConvertToMappedType()`_ for a full
     description of the arguments.
 
+    This is deprecated from SIP v4.8.  Instead you should use
+    `sipForceConvertToType()`_.
+
+
+sipForceConvertToType()
+-----------------------
+
+void \*sipForceConvertToType(PyObject \*obj, const sipTypeDef \*td, PyObject \*transferObj, int flags, int \*state, int \*iserr)
+    This converts a Python object to an instance of a C structure, C++ class or
+    mapped type by calling `sipCanConvertToType()`_ and, if it is successfull,
+    calling `sipConvertToType()`_.  See `sipConvertToType()`_ for a full
+    description of the arguments.
+
 
 sipFree()
 ---------
@@ -4445,13 +4744,15 @@ void sipFree(void \*mem)
     *mem* is a pointer to the area of memory.
 
 
-sipGetSender()
---------------
+sipGetPyObject()
+----------------
 
-const void \*sipGetSender()
-    This returns a pointer to the last ``QObject`` instance that emitted a Qt
-    signal.  It is normally only used by PyQt to implement
-    ``QObject.sender()``.
+PyObject \*sipGetPyObject(void \*cppptr, const sipTypeDef \*td)
+    This returns a borrowed reference to the Python object for a C structure or
+    C++ class instance.  If the structure or class instance hasn't been wrapped
+    then ``NULL`` is returned (and no Python exception is raised).  *cppptr* is
+    the pointer to the structure or class instance.  *td* is the generated type
+    structure corresponding to the C/C++ type.
 
 
 sipGetWrapper()
@@ -4464,6 +4765,9 @@ PyObject \*sipGetWrapper(void \*cppptr, sipWrapperType \*type)
     raised).  *cppptr* is the pointer to the structure or class instance.
     *type* is the generated type corresponding to the C/C++ type.
 
+    This is deprecated from SIP v4.8.  Instead you should use
+    `sipGetPyObject()`_.
+
 
 sipImportSymbol()
 -----------------
@@ -4490,14 +4794,7 @@ int typeInt
 sipWrapperType \*\*pyType.
     A pointer to the corresponding Python type object.
 
-
-sipIsSubClassInstance()
------------------------
-
-int sipIsSubClassInstance(PyObject \*obj, sipWrapperType \*type)
-    This function is deprecated from SIP v4.4.  It is equivalent to::
-
-        sipCanConvertToInstance(obj, type, SIP_NOT_NONE | SIP_NO_CONVERTORS);
+This is deprecated from SIP v4.8.
 
 
 sipLong_AsUnsignedLong()
@@ -4529,6 +4826,8 @@ sipWrapperType \*sipMapIntToClass(int type, const sipIntTypeClassMap \*map, int
     the table.  The corresponding Python type object is returned, or ``NULL``
     if *type* wasn't in *map*.
 
+    This is deprecated from SIP v4.8.
+
 
 sipMapStringToClass()
 ---------------------
@@ -4542,6 +4841,8 @@ sipWrapperType \*sipMapStringToClass(char \*type, const sipStringTypeClassMap \*
     is the number of entries in the table.  The corresponding Python type
     object is returned, or ``NULL`` if *type* wasn't in *map*.
 
+    This is deprecated from SIP v4.8.
+
 
 sipParseResult()
 ----------------
@@ -4568,11 +4869,6 @@ int sipParseResult(int \*iserr, PyObject \*method, PyObject \*result, const char
     will convert, and the entry in brackets are the types of the C/C++ values
     to be passed. 
 
-    ``a`` (string) [const char \*\*, int \*]
-        Convert a Python string to a C/C++ character array and its length.  If
-        the Python object is ``Py_None`` then the array and length are ``NULL``
-        and zero respectively.  This is deprecated, use ``g`` instead.
-
     ``b`` (integer) [bool \*]
         Convert a Python integer to a C/C++ ``bool``.
 
@@ -4629,12 +4925,6 @@ int sipParseResult(int \*iserr, PyObject \*method, PyObject \*result, const char
         character string.  If the Python object is ``Py_None`` then the string
         is ``NULL``.
 
-    ``A`` (unicode) [wchar_t \*\*, int \*]
-        Convert a Python unicode object to a C/C++ wide character array and its
-        length.  If the Python object is ``Py_None`` then the array and length
-        are ``NULL`` and zero respectively.  This is deprecated, use ``G``
-        instead.
-
     ``Cf`` (wrapped class) [sipWrapperType \*, int \*, void \*\*]
         Convert a Python object to a C structure or a C++ class instance and
         return its state as described in `sipConvertToInstance()`_.  ``f`` is a
@@ -4649,12 +4939,13 @@ int sipParseResult(int \*iserr, PyObject \*method, PyObject \*result, const char
                  instance.  Note that the ``int *`` used to return the state is
                  not passed if this flag is specified.
 
-    ``Df`` (mapped type) [const sipMappedType \*, int \*, void \*\*]
-        Convert a Python object to a C structure or a C++ class instance
-        implemented as a mapped type and return its state as described in
-        `sipConvertToMappedType()`_.  ``f`` is a combination of the following
-        flags encoded as an ASCII character by adding ``0`` to the combined
-        value:
+        This is deprecated from SIP v4.8.  Instead you should use ``Df``.
+
+    ``Df`` (wrapped instance) [const sipTypeDef \*, int \*, void \*\*]
+        Convert a Python object to a C structure, C++ class or mapped type
+        instance and return its state as described in `sipConvertToType()`_.
+        ``f`` is a combination of the following flags encoded as an ASCII
+        character by adding ``0`` to the combined value:
 
             0x01 disallows the conversion of ``Py_None`` to ``NULL``
 
@@ -4667,22 +4958,16 @@ int sipParseResult(int \*iserr, PyObject \*method, PyObject \*result, const char
     ``E`` (wrapped enum) [PyTypeObject \*, enum \*]
         Convert a Python named enum type to the corresponding C/C++ ``enum``.
 
+        This is deprecated from SIP v4.8.  Instead you should use ``F``.
+
+    ``F`` (wrapped enum) [sipTypeDef \*, enum \*]
+        Convert a Python named enum type to the corresponding C/C++ ``enum``.
+
     ``G`` (unicode) [wchar_t \*\*, SIP_SSIZE_T \*]
         Convert a Python unicode object to a C/C++ wide character array and its
         length.  If the Python object is ``Py_None`` then the array and length
         are ``NULL`` and zero respectively.
 
-    ``L`` (object) [*type* \*(\*)(PyObject \*obj, int \*iserr), void \*\*]
-        Convert a Python object to a C structure or a C++ class instance using
-        a convertor function.  See `Generated Type Convertors`_.  This is
-        deprecated from SIP v4.4.
-
-    ``M`` (object) [*type* \*(\*)(PyObject \*obj, int \*iserr), void \*\*]
-        Convert a Python object to a C structure or a C++ class instance using
-        a convertor function.  If the structure or class instance pointer is
-        ``NULL`` then return an error.  See `Generated Type Convertors`_.  This
-        is deprecated from SIP v4.4.
-
     ``N`` (object) [PyTypeObject \*, PyObject \*\*]
         A Python object is checked to see if it is a certain type and then
         returned without any conversions.  The reference count is incremented.
@@ -4704,6 +4989,44 @@ int sipParseResult(int \*iserr, PyObject \*method, PyObject \*result, const char
         Check that a Python object is ``Py_None``.  No value is returned.
 
 
+sipRegisterAttributeGetter()
+----------------------------
+
+int sipRegisterAttributeGetter(const sipTypeDef \*td, sipAttrGetterFunc getter)
+    This registers a handler that will called just before SIP needs to get an
+    attribute from a wrapped type's dictionary for the first time.  The handler
+    must then populate the type's dictionary with any lazy attributes.  -1 is
+    returned if there was an error registering the handler, 0 is returned
+    otherwise.
+
+    *td* is an optional generated type definition which means that the handler
+    will only be called for types with that type or sub-classed from it.  If it
+    is ``NULL`` then the handler will be called for all types.
+
+    *getter* is the handler and it has the following signature.
+
+    int handler(const sipTypeDef \*td, PyObject \*dict)
+        *td* is the generated type definition of the type whose dictionary is
+        to be populated.
+
+        *dict* is the dictionary to be populated.
+
+        -1 is returned if there is an error, 0 is returned otherwise.
+
+    See the section `Lazy Type Attributes`_ for more details.
+
+
+sipRegisterPyType()
+-------------------
+
+int sipRegisterPyType(PyTypeObject \*type)
+    This registers a type object that can be used as the meta-type or
+    super-type of a wrapped C++ type.  *type* is the type.  -1 is returned if
+    there was an error registering the type, 0 is returned otherwise.
+
+    See the section `Types and Meta-types`_ for more details.
+
+
 sipReleaseInstance()
 --------------------
 
@@ -4714,6 +5037,9 @@ void sipReleaseInstance(void \*cpp, sipWrapperType \*type, int state)
     *type* is the generated type corresponding to *cpp*.  *state* describes the
     state of the instance.
 
+    This is deprecated from SIP v4.8.  Instead you should use
+    `sipReleaseType()`_.
+
 
 sipReleaseMappedType()
 ----------------------
@@ -4725,6 +5051,47 @@ void sipReleaseMappedType(void \*cpp, const sipMappedType \*mt, int state)
     *mt* is the opaque structure returned by `sipFindMappedType()`_.  *state*
     describes the state of the instance.
 
+    This is deprecated from SIP v4.8.  Instead you should use
+    `sipReleaseType()`_.
+
+
+sipReleaseType()
+----------------
+
+void sipReleaseType(void \*cpp, const sipTypeDef \*td, int state)
+    This destroys a wrapped C/C++ or mapped type instance if it was a temporary
+    instance.  It is called after a call to either `sipConvertToType()`_ or
+    `sipForceConvertToType()`_.  *cpp* is the wrapped C/C++ instance.  *td* is
+    the generated type structure.  *state* describes the state of the instance.
+
+
+sipResolveTypedef()
+-------------------
+
+const char \*sipResolveTypedef(const char \*name)
+    If *name* refers to a C/C++ typedef then the value of that typedef is
+    returned, otherwise ``NULL`` is returned.
+
+
+sipSimpleWrapper
+----------------
+
+This is a C structure that represents a Python wrapped instance whose type is
+``sip.simplewrapper``.  It is an extension of the ``PyObject`` structure and so
+may be safely cast to it.
+
+It includes a member called ``user`` which is of type ``PyObject *``.  This can
+be used for any purpose by handwritten code and will automatically be garbage
+collected at the appropriate time.
+
+
+sipSimpleWrapper_Type
+---------------------
+
+This is a pointer to a ``PyTypeObject`` structure that is the type of a
+`sipSimpleWrapper`_ structure and is the C implementation of
+``sip.simplewrapper``.  It may be safely cast to `sipWrapperType`_.
+
 
 sipStringTypeClassMap
 ---------------------
@@ -4739,19 +5106,7 @@ char \*typeString
 sipWrapperType \*\*pyType.
     A pointer to the corresponding Python type object.
 
-
-sipTransfer()
--------------
-
-void sipTransfer(PyObject \*obj, int tocpp)
-    This function is deprecated from SIP v4.3.  If *tocpp* is non-zero then the
-    equivalent call is::
-
-        sipTransferTo(obj, obj);
-
-    If *tocpp* is zero then the equivalent call is::
-
-        sipTransferBack(obj);
+This is deprecated from SIP v4.8.
 
 
 sipTransferBack()
@@ -4787,14 +5142,93 @@ void sipTransferTo(PyObject \*obj, PyObject \*owner)
     destructor is always transfered to C++.
 
 
+sipTypeAsPyTypeObject()
+-----------------------
+
+PyTypeObject \*sipTypeAsPyTypeObject(sipTypeDef \*td)
+    This returns a pointer to the Python type object that SIP creates from a
+    generated type structure.  *td* is the type structure.
+
+    If the type structure refers to a C structure or C++ class then it may be
+    safely cast to a `sipWrapperType`_.
+
+    If the type structure refers to a mapped type then ``NULL`` will be
+    returned.
+
+
+sipTypeFromPyTypeObject()
+-------------------------
+
+const sipTypeDef \*sipTypeFromPyTypeObject(PyTypeObject \*py_type)
+    This returns a pointer to the SIP generated type structure for a Python
+    type.  *py_type* is the Python type object.
+
+    If the Python type doesn't correspond to a SIP generated type then ``NULL``
+    will be returned.
+
+
+sipTypeIsClass()
+----------------
+
+int sipTypeIsClass(sipTypeDef \*td)
+    This returns a non-zero value if the generated type structure refers to a
+    C structure or C++ class.  *td* is the type structure.
+
+
+sipTypeIsEnum()
+---------------
+
+int sipTypeIsEnum(sipTypeDef \*td)
+    This returns a non-zero value if the generated type structure refers to a
+    named enum.  *td* is the type structure.
+
+
+sipTypeIsMapped()
+-----------------
+
+int sipTypeIsMapped(sipTypeDef \*td)
+    This returns a non-zero value if the generated type structure refers to a
+    mapped type.  *td* is the type structure.
+
+
+sipTypeIsNamespace()
+--------------------
+
+int sipTypeIsNamespace(sipTypeDef \*td)
+    This returns a non-zero value if the generated type structure refers to a
+    C++ namespace.  *td* is the type structure.
+
+
+sipTypeName()
+-------------
+
+const char \*sipTypeName(const sipTypeDef \*td)
+    This returns the C/C++ name of a SIP generated type.  *td* is the type
+    structure.
+
+
+sipTypeScope()
+--------------
+
+const sipTypeDef \*sipTypeScope(const sipTypeDef \*td)
+    This returns the SIP generated type structure of the scope of another
+    SIP generated type structure.  ``NULL`` will be returned if the type has no
+    scope.
+
+
+sipVoidPtr_Type
+---------------
+
+This is a pointer to a ``PyTypeObject`` structure that is the type of a
+``PyObject`` structure that is used to wrap a ``void *``.
+
+
 sipWrapper
 ----------
 
-This is a C structure that represents a Python wrapped instance.  It is an
-extension of the Python ``PyObject`` structure and so may be safely cast to
-``PyObject``.  It includes a member called ``user`` which is of type
-``PyObject *``.  This can be used for any purpose by handwritten code and will
-automatically be garbage collected at the appropriate time.
+This is a C structure that represents a Python wrapped instance whose type is
+``sip.wrapper``.  It is an extension of the `sipSimpleWrapper`_ and
+``PyObject`` structures and so may be safely cast to both.
 
 
 sipWrapper_Check()
@@ -4804,57 +5238,70 @@ int sipWrapper_Check(PyObject \*obj)
     This returns a non-zero value if a Python object is a wrapped instance.
     *obj* is the Python object.
 
+    This is deprecated from SIP v4.8.  Instead you should use the following::
+
+        PyObject_TypeCheck(obj, sipWrapper_Type)
+
+
+sipWrapper_Type
+---------------
+
+This is a pointer to a ``PyTypeObject`` structure that is the type of a
+`sipWrapper`_ structure and is the C implementation of ``sip.wrapper``.  It may
+be safely cast to `sipWrapperType`_.
+
 
 sipWrapperType
 --------------
 
 This is a C structure that represents a SIP generated type object.  It is an
-extension of the Python ``PyTypeObject`` structure (which is itself an
-extension of the Python ``PyObject`` structure) and so may be safely cast to
-``PyTypeObject`` (and ``PyObject``).
+extension of the ``PyTypeObject`` structure (which is itself an extension of
+the ``PyObject`` structure) and so may be safely cast to ``PyTypeObject`` (and
+``PyObject``).
 
 
-Generated Type Convertors
--------------------------
+sipWrapperType_Type
+-------------------
+
+This is a pointer to a ``PyTypeObject`` structure that is the type of a
+`sipWrapperType`_ structure and is the C implementation of ``sip.wrappertype``.
 
-These functions are deprecated from SIP v4.4.
 
-SIP generates functions for all types being wrapped (including mapped types
-defined with the `%MappedType`_ directive) that convert a Python object to the
-C structure or C++ class instance.  The name of this convertor is the name of
-the structure or class prefixed by ``sipForceConvertTo_``.
+Generated Type Structures
+-------------------------
 
-void \*sipForceConvertTo_*class*(PyObject \*obj, int \*iserr)
-    *obj* is the Python object to convert.  If *obj* is ``NULL`` or the
-    location pointed to by *iserr* is non-zero then the conversion is not
-    attempted and ``NULL`` is returned.  If there was an error then the
-    location pointed to by *iserr* is set to a non-zero value, a Python
-    exception is raised, and ``NULL`` is returned.
+SIP generates an opaque type structure for each C structure, C++ class, C++
+namespace, named enum or mapped type being wrapped.  These are ``sipTypeDef``
+structures and are used extensively by the SIP API.
 
-SIP also generates functions for mapped types that convert a C structure or
-C++ class instance to a Python object.  The name of this convertor is the name
-of the structure or class prefixed by ``sipConvertFrom_``.
+The names of these structure are prefixed by ``sipType_``.
 
-PyObject \*sipConvertFrom_*class*(void \*cppptr)
-    *cppptr* is a pointer to the C structure or C++ class instance to convert.
-    If there was an error then ``NULL`` is returned and a Python exception
-    raised.
+For those structures that correspond to C structures, C++ classes, C++
+namespaces or named enums the remaining part of the name is the fully
+qualified name of the structure, class, namespace or enum name.  Any ``::``
+scope separators are replaced by an underscore.  For example, the type object
+for class ``Klass`` is ``sipType_Klass``.
 
-The convertor functions of all imported types are available to handwritten
-code.
+For those structure that correspond to mapped types the remaining part of the
+name is generated by SIP.  The only way for handwritten code to obtain a
+pointer to a structure for a mapped type is to use `sipFindType()`_.
+
+The type structures of all imported types are available to handwritten code.
 
 
 Generated Type Objects
 ----------------------
 
-SIP generates a type object for each C structure or C++ class being wrapped.
-These are sipWrapperType_ structures and are used extensively by the SIP API.
+SIP generates a sipWrapperType_ type object for each C structure or C++ class
+being wrapped.
 
 These objects are named with the structure or class name prefixed by
 ``sipClass_``.  For example, the type object for class ``Klass`` is
 ``sipClass_Klass``.
 
-The type objects of all imported classes are available to handwritten code.
+Using these names is deprecated from SIP v4.8.  Instead use the corresponding
+generated type structure (see `Generated Type Structures`_) and
+`sipTypeAsPyTypeObject()`_.
 
 
 Generated Named Enum Type Objects
@@ -4867,7 +5314,9 @@ These objects are named with the fully qualified enum name (i.e. including any
 enclosing scope) prefixed by ``sipEnum_``.  For example, the type object for
 enum ``Enum`` defined in class ``Klass`` is ``sipEnum_Klass_Enum``.
 
-The type objects of all imported named enums are available to handwritten code.
+Using these names is deprecated from SIP v4.8.  Instead use the corresponding
+generated type structure (see `Generated Type Structures`_) and
+`sipTypeAsPyTypeObject()`_.
 
 
 Generated Derived Classes
@@ -4925,11 +5374,10 @@ name to lower case and preceding it with an underscore.  For example:
     ``sipWrapperCheck`` becomes ``api_wrapper_check``
 
 Note that the type objects that SIP generates for a wrapped module (see
-`Generated Type Objects`_, `Generated Named Enum Type Objects`_ and
+`Generated Type Structures`_, `Generated Named Enum Type Objects`_ and
 `Generated Exception Objects`_) cannot be refered to directly and must be
-obtained using the `sipFindClass()`_, `sipFindMappedType()`_ and
-`sipFindNamedEnum()`_ functions.  Of course, the corresponding modules must
-already have been imported into the interpreter.
+obtained using the `sipFindType()`_ function.  Of course, the corresponding
+modules must already have been imported into the interpreter.
 
 The following code fragment shows how to get a pointer to the ``sipAPIDef``
 data structure::
@@ -5027,16 +5475,6 @@ SIP_VERSION_STR
     represented as a string.  For development snapshots it will start with
     ``snapshot-``.  It was first implemented in SIP v4.3.
 
-transfer(obj, direction)
-    This function is deprecated from SIP v4.3.  If *direction* is non-zero then
-    the equivalent call is::
-
-        sip.transferto(obj, None)
-
-    If *direction* is zero then the equivalent call is::
-
-        sip.transferback(obj)
-
 transferback(obj)
     This function is a wrapper around `sipTransferBack()`_.
 </diff>
      <filename>doc/sipref.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 /*
  * The XML and API file generator module for SIP.
  *
- * Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+ * Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
  * 
  * This file is part of SIP.
  * 
@@ -47,6 +47,7 @@ static void xmlIndent(int indent, FILE *fp);
 static const char *dirAttribute(argDef *ad);
 static void exportDefaultValue(argDef *ad, FILE *fp);
 static const char *pyType(argDef *ad, int sec, classDef **scope);
+static void prScopedPythonName(FILE *fp, classDef *scope, const char *pyname);
 
 
 /*
@@ -126,7 +127,7 @@ static int apiCtor(moduleDef *mod, classDef *scope, ctorDef *ct, int sec,
 
     /* Do the callable type form. */
     fprintf(fp, &quot;%s.&quot;, mod-&gt;name);
-    prScopedPythonName(fp, scope-&gt;ecd, scope-&gt;pyname);
+    prScopedPythonName(fp, scope-&gt;ecd, scope-&gt;pyname-&gt;text);
     fprintf(fp, &quot;(&quot;);
 
     need_comma = FALSE;
@@ -145,7 +146,7 @@ static int apiCtor(moduleDef *mod, classDef *scope, ctorDef *ct, int sec,
 
     /* Do the call __init__ form. */
     fprintf(fp, &quot;%s.&quot;, mod-&gt;name);
-    prScopedPythonName(fp, scope-&gt;ecd, scope-&gt;pyname);
+    prScopedPythonName(fp, scope-&gt;ecd, scope-&gt;pyname-&gt;text);
     fprintf(fp, &quot;.__init__(self&quot;);
 
     for (a = 0; a &lt; ct-&gt;pysig.nrArgs; ++a)
@@ -379,7 +380,7 @@ static void xmlClass(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp)
     {
         xmlIndent(indent, fp);
         fprintf(fp, &quot;&lt;OpaqueClass name=\&quot;&quot;);
-        prScopedPythonName(fp, cd-&gt;ecd, cd-&gt;pyname);
+        prScopedPythonName(fp, cd-&gt;ecd, cd-&gt;pyname-&gt;text);
         fprintf(fp, &quot;\&quot;/&gt;\n&quot;);
 
         return;
@@ -387,7 +388,7 @@ static void xmlClass(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp)
 
     xmlIndent(indent++, fp);
     fprintf(fp, &quot;&lt;Class name=\&quot;&quot;);
-    prScopedPythonName(fp, cd-&gt;ecd, cd-&gt;pyname);
+    prScopedPythonName(fp, cd-&gt;ecd, cd-&gt;pyname-&gt;text);
     fprintf(fp, &quot;\&quot;&quot;);
 
     if (cd-&gt;picklecode != NULL)
@@ -410,7 +411,7 @@ static void xmlClass(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp)
             if (cl != cd-&gt;supers)
                 fprintf(fp, &quot; &quot;);
 
-            prScopedPythonName(fp, cl-&gt;cd-&gt;ecd, cl-&gt;cd-&gt;pyname);
+            prScopedPythonName(fp, cl-&gt;cd-&gt;ecd, cl-&gt;cd-&gt;pyname-&gt;text);
         }
 
         fprintf(fp, &quot;\&quot;&quot;);
@@ -570,6 +571,7 @@ static void xmlFunction(classDef *scope, memberDef *md, overDef *oloads,
         int indent, FILE *fp)
 {
     overDef *od;
+    const char *default_str = &quot;default=\&quot;1\&quot; &quot;;
 
     for (od = oloads; od != NULL; od = od-&gt;next)
     {
@@ -585,12 +587,14 @@ static void xmlFunction(classDef *scope, memberDef *md, overDef *oloads,
         if (isSignal(od))
         {
             xmlIndent(indent, fp);
-            fprintf(fp, &quot;&lt;Signal name=\&quot;&quot;);
+            fprintf(fp, &quot;&lt;Signal %sname=\&quot;&quot;, default_str);
             prScopedPythonName(fp, scope, md-&gt;pyname-&gt;text);
             fprintf(fp, &quot;\&quot; sig=\&quot;&quot;);
             xmlCppSignature(fp, od);
             fprintf(fp, &quot;\&quot;/&gt;\n&quot;);
 
+            default_str = &quot;&quot;;
+
             continue;
         }
 
@@ -638,7 +642,7 @@ static int xmlOverload(classDef *scope, memberDef *md, overDef *od,
     if (xtnds != NULL)
     {
         fprintf(fp, &quot; extends=\&quot;&quot;);
-        prScopedPythonName(fp, xtnds-&gt;ecd, xtnds-&gt;pyname);
+        prScopedPythonName(fp, xtnds-&gt;ecd, xtnds-&gt;pyname-&gt;text);
         fprintf(fp, &quot;\&quot;&quot;);
     }
 
@@ -868,7 +872,7 @@ static const char *pyType(argDef *ad, int sec, classDef **scope)
     switch (ad-&gt;atype)
     {
     case class_type:
-        type_name = ad-&gt;u.cd-&gt;pyname;
+        type_name = ad-&gt;u.cd-&gt;pyname-&gt;text;
         *scope = ad-&gt;u.cd-&gt;ecd;
         break;
 
@@ -992,3 +996,19 @@ static const char *pyType(argDef *ad, int sec, classDef **scope)
 
     return type_name;
 }
+
+
+/*
+ * Generate a scoped Python name.
+ */
+static void prScopedPythonName(FILE *fp, classDef *scope, const char *pyname)
+{
+    if (scope != NULL)
+    {
+        prScopedPythonName(fp, scope-&gt;ecd, NULL);
+        fprintf(fp, &quot;%s.&quot;, scope-&gt;pyname-&gt;text);
+    }
+
+    if (pyname != NULL)
+        fprintf(fp, &quot;%s&quot;, pyname);
+}</diff>
      <filename>sipgen/export.c</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 /*
  * The code generator module for SIP.
  *
- * Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+ * Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
  * 
  * This file is part of SIP.
  * 
@@ -23,12 +23,11 @@
 #include &quot;sip.h&quot;
 
 
-/*
- * These must match the values of SIP_TYPE_FLAGS_SHIFT and SIP_TYPE_FLAGS_MASK
- * in siplib/sip.h.
- */
-#define TYPE_FLAGS_SHIFT        8
-#define TYPE_FLAGS_MASK         0x0f00
+/* Return the base (ie. C/C++) name of a super-type or meta-type. */
+#define smtypeName(sm)          (strrchr((sm)-&gt;name-&gt;text, '.') + 1)
+
+/* Return TRUE if a wrapped variable can be set. */
+#define canSetVariable(vd)      ((vd)-&gt;type.nrderefs != 0 || !isConstArg(&amp;(vd)-&gt;type))
 
 
 /* Control what generateCalledArgs() actually generates. */
@@ -79,11 +78,10 @@ static void generateIfaceCpp(sipSpec *, ifaceFileDef *, const char *,
 static void generateMappedTypeCpp(mappedTypeDef *mtd, sipSpec *pt, FILE *fp);
 static void generateImportedMappedTypeAPI(mappedTypeDef *mtd, moduleDef *mod,
         FILE *fp);
-static void generateMappedTypeAPI(mappedTypeDef *mtd, FILE *fp);
+static void generateMappedTypeAPI(sipSpec *pt, mappedTypeDef *mtd, FILE *fp);
 static void generateClassCpp(classDef *cd, sipSpec *pt, FILE *fp);
 static void generateImportedClassAPI(classDef *cd, sipSpec *pt, moduleDef *mod,
         FILE *fp);
-static void generateClassTableEntries(moduleDef *mod, nodeDef *nd, FILE *fp);
 static void generateClassAPI(classDef *cd, sipSpec *pt, FILE *fp);
 static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd,
         FILE *fp);
@@ -110,7 +108,7 @@ static void generateCalledArgs(classDef *, signatureDef *, funcArgType, int,
         FILE *);
 static void generateVariable(classDef *, argDef *, int, FILE *);
 static void generateNamedValueType(classDef *, argDef *, char *, FILE *);
-static void generateBaseType(classDef *, argDef *, FILE *);
+static void generateBaseType(classDef *, argDef *, int, FILE *);
 static void generateNamedBaseType(classDef *, argDef *, char *, int, FILE *);
 static void generateTupleBuilder(signatureDef *, FILE *);
 static void generateEmitters(classDef *cd, FILE *fp);
@@ -139,9 +137,9 @@ static void generateComparisonSlotCall(classDef *cd, overDef *od,
 static void generateBinarySlotCall(classDef *cd, overDef *od, const char *op,
         int deref, FILE *fp);
 static void generateNumberSlotCall(overDef *od, char *op, FILE *fp);
-static void generateVariableHandler(classDef *, varDef *, FILE *);
+static void generateVariableGetter(classDef *, varDef *, FILE *);
+static void generateVariableSetter(classDef *, varDef *, FILE *);
 static int generateObjToCppConversion(argDef *, FILE *);
-static void generateVarClassConversion(varDef *, int, FILE *);
 static void generateVarMember(varDef *vd, FILE *fp);
 static int generateVoidPointers(sipSpec *pt, moduleDef *mod, classDef *cd,
         FILE *fp);
@@ -166,10 +164,8 @@ static int generateVariableType(sipSpec *pt, moduleDef *mod, classDef *cd,
         argType atype, const char *eng, const char *s1, const char *s2,
         FILE *fp);
 static int generateDoubles(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp);
-static int generateEnums(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp);
 static int generateClasses(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp);
-static void generateEnumsInline(sipSpec *pt, moduleDef *mod, FILE *fp);
-static void generateClassesInline(sipSpec *pt, moduleDef *mod, FILE *fp);
+static void generateTypesInline(sipSpec *pt, moduleDef *mod, FILE *fp);
 static void generateAccessFunctions(sipSpec *pt, moduleDef *mod, classDef *cd,
         FILE *fp);
 static void generateConvertToDefinitions(mappedTypeDef *, classDef *, FILE *);
@@ -226,6 +222,8 @@ static void generateMappedTypeFromVoid(mappedTypeDef *mtd, const char *cname,
 static int generateSubClassConvertors(sipSpec *pt, moduleDef *mod, FILE *fp);
 static void generateNameCache(sipSpec *pt, FILE *fp);
 static const char *resultOwner(overDef *od);
+static void prCachedName(FILE *fp, nameDef *nd, const char *prefix);
+static void generateSignalTableEntry(classDef *cd, overDef *od, FILE *fp);
 
 
 /*
@@ -453,7 +451,7 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
         , mname
         , mname);
 
-    if (optRegisterTypes(pt))
+    if (pluginPyQt4(pt))
         prcode(fp,
 &quot;\n&quot;
 &quot;#include &lt;QMetaType&gt;\n&quot;
@@ -483,12 +481,12 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
 &quot;#define SIP_FEATURE_%s\n&quot;
                     , qd-&gt;name);
             }
+    }
 
-        if (!noIntro)
-            prcode(fp,
+    if (!noIntro)
+        prcode(fp,
 &quot;\n&quot;
-                );
-    }
+            );
 
     generateCppCodeBlock(pt-&gt;exphdrcode, fp);
     generateCppCodeBlock(mod-&gt;hdrcode, fp);
@@ -498,7 +496,7 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
 
     for (nd = pt-&gt;namecache; nd != NULL; nd = nd-&gt;next)
     {
-        if (!isClassName(nd))
+        if (!isUsedName(nd))
             continue;
 
         if (noIntro)
@@ -506,8 +504,8 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
             prcode(fp,
 &quot;\n&quot;
 &quot;/*\n&quot;
-&quot; * Convenient names to refer to the names of classes defined in this module.\n&quot;
-&quot; * These are part of the public API.\n&quot;
+&quot; * Convenient names to refer to various strings defined in this module.\n&quot;
+&quot; * Only the class names are part of the public API.\n&quot;
 &quot; */\n&quot;
                 );
 
@@ -515,18 +513,14 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
         }
 
         prcode(fp,
-&quot;#define sipName_%s  %N\n&quot;
-            , nd-&gt;text, nd);
+&quot;#define %n %d\n&quot;
+&quot;#define %N &amp;sipStrings_%s[%d]\n&quot;
+            , nd, (int)nd-&gt;offset
+            , nd, mname, (int)nd-&gt;offset);
     }
 
     prcode(fp,
 &quot;\n&quot;
-&quot;/* Convenient names to call the SIP API. */\n&quot;
-&quot;#define sipConvertFromSliceObject(o,len,start,stop,step,slen)   PySlice_GetIndicesEx((PySliceObject *)(o),(len),(start),(stop),(step),(slen))\n&quot;
-&quot;#define sipIsSubClassInstance(o,wt) PyObject_TypeCheck((o),(PyTypeObject *)(wt))\n&quot;
-&quot;\n&quot;
-&quot;#define sipMapStringToClass         sipAPI_%s-&gt;api_map_string_to_class\n&quot;
-&quot;#define sipMapIntToClass            sipAPI_%s-&gt;api_map_int_to_class\n&quot;
 &quot;#define sipMalloc                   sipAPI_%s-&gt;api_malloc\n&quot;
 &quot;#define sipFree                     sipAPI_%s-&gt;api_free\n&quot;
 &quot;#define sipBuildResult              sipAPI_%s-&gt;api_build_result\n&quot;
@@ -538,7 +532,6 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
 &quot;#define sipCommonDtor               sipAPI_%s-&gt;api_common_dtor\n&quot;
 &quot;#define sipConvertFromSequenceIndex sipAPI_%s-&gt;api_convert_from_sequence_index\n&quot;
 &quot;#define sipConvertFromVoidPtr       sipAPI_%s-&gt;api_convert_from_void_ptr\n&quot;
-&quot;#define sipConvertToCpp             sipAPI_%s-&gt;api_convert_to_cpp\n&quot;
 &quot;#define sipConvertToVoidPtr         sipAPI_%s-&gt;api_convert_to_void_ptr\n&quot;
 &quot;#define sipNoFunction               sipAPI_%s-&gt;api_no_function\n&quot;
 &quot;#define sipNoMethod                 sipAPI_%s-&gt;api_no_method\n&quot;
@@ -548,57 +541,44 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
 &quot;#define sipBadCatcherResult         sipAPI_%s-&gt;api_bad_catcher_result\n&quot;
 &quot;#define sipBadOperatorArg           sipAPI_%s-&gt;api_bad_operator_arg\n&quot;
 &quot;#define sipTrace                    sipAPI_%s-&gt;api_trace\n&quot;
-&quot;#define sipTransfer                 sipAPI_%s-&gt;api_transfer\n&quot;
 &quot;#define sipTransferBack             sipAPI_%s-&gt;api_transfer_back\n&quot;
 &quot;#define sipTransferTo               sipAPI_%s-&gt;api_transfer_to\n&quot;
 &quot;#define sipTransferBreak            sipAPI_%s-&gt;api_transfer_break\n&quot;
-&quot;#define sipWrapper_Check            sipAPI_%s-&gt;api_wrapper_check\n&quot;
-&quot;#define sipGetWrapper               sipAPI_%s-&gt;api_get_wrapper\n&quot;
+&quot;#define sipSimpleWrapper_Type       sipAPI_%s-&gt;api_simplewrapper_type\n&quot;
+&quot;#define sipWrapper_Type             sipAPI_%s-&gt;api_wrapper_type\n&quot;
+&quot;#define sipWrapperType_Type         sipAPI_%s-&gt;api_wrappertype_type\n&quot;
+&quot;#define sipVoidPtr_Type             sipAPI_%s-&gt;api_voidptr_type\n&quot;
+&quot;#define sipGetPyObject              sipAPI_%s-&gt;api_get_pyobject\n&quot;
 &quot;#define sipGetCppPtr                sipAPI_%s-&gt;api_get_cpp_ptr\n&quot;
 &quot;#define sipGetComplexCppPtr         sipAPI_%s-&gt;api_get_complex_cpp_ptr\n&quot;
 &quot;#define sipIsPyMethod               sipAPI_%s-&gt;api_is_py_method\n&quot;
 &quot;#define sipCallHook                 sipAPI_%s-&gt;api_call_hook\n&quot;
 &quot;#define sipStartThread              sipAPI_%s-&gt;api_start_thread\n&quot;
 &quot;#define sipEndThread                sipAPI_%s-&gt;api_end_thread\n&quot;
-&quot;#define sipEmitSignal               sipAPI_%s-&gt;api_emit_signal\n&quot;
 &quot;#define sipConnectRx                sipAPI_%s-&gt;api_connect_rx\n&quot;
 &quot;#define sipDisconnectRx             sipAPI_%s-&gt;api_disconnect_rx\n&quot;
-&quot;#define sipGetSender                sipAPI_%s-&gt;api_get_sender\n&quot;
 &quot;#define sipRaiseUnknownException    sipAPI_%s-&gt;api_raise_unknown_exception\n&quot;
-&quot;#define sipRaiseClassException      sipAPI_%s-&gt;api_raise_class_exception\n&quot;
-&quot;#define sipRaiseSubClassException   sipAPI_%s-&gt;api_raise_sub_class_exception\n&quot;
+&quot;#define sipRaiseTypeException       sipAPI_%s-&gt;api_raise_type_exception\n&quot;
 &quot;#define sipBadLengthForSlice        sipAPI_%s-&gt;api_bad_length_for_slice\n&quot;
-&quot;#define sipClassName                sipAPI_%s-&gt;api_class_name\n&quot;
-&quot;#define sipAddClassInstance         sipAPI_%s-&gt;api_add_class_instance\n&quot;
-&quot;#define sipAddMappedTypeInstance    sipAPI_%s-&gt;api_add_mapped_type_instance\n&quot;
-&quot;#define sipAddEnumInstance          sipAPI_%s-&gt;api_add_enum_instance\n&quot;
-&quot;#define sipConvertFromNamedEnum     sipAPI_%s-&gt;api_convert_from_named_enum\n&quot;
+&quot;#define sipAddTypeInstance          sipAPI_%s-&gt;api_add_type_instance\n&quot;
 &quot;#define sipGetAddress               sipAPI_%s-&gt;api_get_address\n&quot;
-&quot;#define sipFreeConnection           sipAPI_%s-&gt;api_free_connection\n&quot;
-&quot;#define sipEmitToSlot               sipAPI_%s-&gt;api_emit_to_slot\n&quot;
-&quot;#define sipSameConnection           sipAPI_%s-&gt;api_same_connection\n&quot;
+&quot;#define sipFreeSipslot              sipAPI_%s-&gt;api_free_sipslot\n&quot;
+&quot;#define sipSameSlot                 sipAPI_%s-&gt;api_same_slot\n&quot;
 &quot;#define sipPySlotExtend             sipAPI_%s-&gt;api_pyslot_extend\n&quot;
 &quot;#define sipConvertRx                sipAPI_%s-&gt;api_convert_rx\n&quot;
 &quot;#define sipAddDelayedDtor           sipAPI_%s-&gt;api_add_delayed_dtor\n&quot;
-&quot;#define sipCanConvertToInstance     sipAPI_%s-&gt;api_can_convert_to_instance\n&quot;
-&quot;#define sipCanConvertToMappedType   sipAPI_%s-&gt;api_can_convert_to_mapped_type\n&quot;
-&quot;#define sipConvertToInstance        sipAPI_%s-&gt;api_convert_to_instance\n&quot;
-&quot;#define sipConvertToMappedType      sipAPI_%s-&gt;api_convert_to_mapped_type\n&quot;
-&quot;#define sipForceConvertToInstance   sipAPI_%s-&gt;api_force_convert_to_instance\n&quot;
-&quot;#define sipForceConvertToMappedType sipAPI_%s-&gt;api_force_convert_to_mapped_type\n&quot;
-&quot;#define sipReleaseInstance          sipAPI_%s-&gt;api_release_instance\n&quot;
-&quot;#define sipReleaseMappedType        sipAPI_%s-&gt;api_release_mapped_type\n&quot;
-&quot;#define sipConvertFromInstance      sipAPI_%s-&gt;api_convert_from_instance\n&quot;
-&quot;#define sipConvertFromNewInstance   sipAPI_%s-&gt;api_convert_from_new_instance\n&quot;
-&quot;#define sipConvertFromMappedType    sipAPI_%s-&gt;api_convert_from_mapped_type\n&quot;
+&quot;#define sipCanConvertToType         sipAPI_%s-&gt;api_can_convert_to_type\n&quot;
+&quot;#define sipConvertToType            sipAPI_%s-&gt;api_convert_to_type\n&quot;
+&quot;#define sipForceConvertToType       sipAPI_%s-&gt;api_force_convert_to_type\n&quot;
+&quot;#define sipReleaseType              sipAPI_%s-&gt;api_release_type\n&quot;
+&quot;#define sipConvertFromType          sipAPI_%s-&gt;api_convert_from_type\n&quot;
+&quot;#define sipConvertFromNewType       sipAPI_%s-&gt;api_convert_from_new_type\n&quot;
+&quot;#define sipConvertFromEnum          sipAPI_%s-&gt;api_convert_from_enum\n&quot;
 &quot;#define sipGetState                 sipAPI_%s-&gt;api_get_state\n&quot;
-&quot;#define sipFindMappedType           sipAPI_%s-&gt;api_find_mapped_type\n&quot;
 &quot;#define sipLong_AsUnsignedLong      sipAPI_%s-&gt;api_long_as_unsigned_long\n&quot;
 &quot;#define sipExportSymbol             sipAPI_%s-&gt;api_export_symbol\n&quot;
 &quot;#define sipImportSymbol             sipAPI_%s-&gt;api_import_symbol\n&quot;
-&quot;#define sipRegisterIntTypes         sipAPI_%s-&gt;api_register_int_types\n&quot;
-&quot;#define sipParseSignature           sipAPI_%s-&gt;api_parse_signature\n&quot;
-&quot;#define sipFindClass                sipAPI_%s-&gt;api_find_class\n&quot;
+&quot;#define sipFindType                 sipAPI_%s-&gt;api_find_type\n&quot;
 &quot;#define sipFindNamedEnum            sipAPI_%s-&gt;api_find_named_enum\n&quot;
 &quot;#define sipString_AsChar            sipAPI_%s-&gt;api_string_as_char\n&quot;
 &quot;#define sipUnicode_AsWChar          sipAPI_%s-&gt;api_unicode_as_wchar\n&quot;
@@ -607,20 +587,36 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
 &quot;#define sipConvertFromVoidPtrAndSize    sipAPI_%s-&gt;api_convert_from_void_ptr_and_size\n&quot;
 &quot;#define sipConvertFromConstVoidPtrAndSize   sipAPI_%s-&gt;api_convert_from_const_void_ptr_and_size\n&quot;
 &quot;#define sipInvokeSlot               sipAPI_%s-&gt;api_invoke_slot\n&quot;
-&quot;#define sipParseType                sipAPI_%s-&gt;api_parse_type\n&quot;
-&quot;#define sipIsExactWrappedType       sipAPI_%s-&gt;api_is_exact_wrapped_type\n&quot;
-&quot;#define sipAssignInstance           sipAPI_%s-&gt;api_assign_instance\n&quot;
-&quot;#define sipAssignMappedType         sipAPI_%s-&gt;api_assign_mapped_type\n&quot;
-&quot;#define sipRegisterMetaType         sipAPI_%s-&gt;api_register_meta_type\n&quot;
+&quot;#define sipSaveSlot                 sipAPI_%s-&gt;api_save_slot\n&quot;
+&quot;#define sipClearAnySlotReference    sipAPI_%s-&gt;api_clear_any_slot_reference\n&quot;
+&quot;#define sipVisitSlot                sipAPI_%s-&gt;api_visit_slot\n&quot;
 &quot;#define sipWrappedTypeName(wt)      ((wt)-&gt;type-&gt;td_cname)\n&quot;
 &quot;#define sipDeprecated               sipAPI_%s-&gt;api_deprecated\n&quot;
-        ,mname
-        ,mname
-        ,mname
-        ,mname
-        ,mname
-        ,mname
-        ,mname
+&quot;#define sipRegisterPyType           sipAPI_%s-&gt;api_register_py_type\n&quot;
+&quot;#define sipTypeFromPyTypeObject     sipAPI_%s-&gt;api_type_from_py_type_object\n&quot;
+&quot;#define sipTypeScope                sipAPI_%s-&gt;api_type_scope\n&quot;
+&quot;#define sipResolveTypedef(n)        sipAPI_%s-&gt;api_resolve_typedef((n), &amp;sipModuleAPI_%s)\n&quot;
+&quot;#define sipRegisterAttributeGetter  sipAPI_%s-&gt;api_register_attribute_getter\n&quot;
+&quot;\n&quot;
+&quot;/* These are deprecated. */\n&quot;
+&quot;#define sipMapStringToClass         sipAPI_%s-&gt;api_map_string_to_class\n&quot;
+&quot;#define sipMapIntToClass            sipAPI_%s-&gt;api_map_int_to_class\n&quot;
+&quot;#define sipFindClass                sipAPI_%s-&gt;api_find_class\n&quot;
+&quot;#define sipFindMappedType           sipAPI_%s-&gt;api_find_mapped_type\n&quot;
+&quot;#define sipWrapper_Check(w)         PyObject_TypeCheck((w), sipAPI_%s-&gt;api_wrapper_type)\n&quot;
+&quot;#define sipGetWrapper(p, wt)        sipGetPyObject((p), (wt)-&gt;type)\n&quot;
+&quot;#define sipReleaseInstance(p, wt, s)    sipReleaseType((p), (wt)-&gt;type, (s))\n&quot;
+&quot;#define sipReleaseMappedType        sipReleaseType\n&quot;
+&quot;#define sipCanConvertToInstance(o, wt, f)   sipCanConvertToType((o), (wt)-&gt;type, (f))\n&quot;
+&quot;#define sipCanConvertToMappedType   sipCanConvertToType\n&quot;
+&quot;#define sipConvertToInstance(o, wt, t, f, s, e)     sipConvertToType((o), (wt)-&gt;type, (t), (f), (s), (e))\n&quot;
+&quot;#define sipConvertToMappedType      sipConvertToType\n&quot;
+&quot;#define sipForceConvertToInstance(o, wt, t, f, s, e)    sipForceConvertToType((o), (wt)-&gt;type, (t), (f), (s), (e))\n&quot;
+&quot;#define sipForceConvertToMappedType sipForceConvertToType\n&quot;
+&quot;#define sipConvertFromInstance(p, wt, t)    sipConvertFromType((p), (wt)-&gt;type, (t))\n&quot;
+&quot;#define sipConvertFromMappedType    sipConvertFromType\n&quot;
+&quot;#define sipConvertFromNamedEnum(v, pt)  sipConvertFromEnum((v), ((sipEnumTypeObject *)(pt))-&gt;type)\n&quot;
+&quot;#define sipConvertFromNewInstance(p, wt, t) sipConvertFromNewType((p), (wt)-&gt;type, (t))\n&quot;
         ,mname
         ,mname
         ,mname
@@ -704,27 +700,11 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
         ,mname);
 
     /* The name strings. */
-    noIntro = TRUE;
-
-    for (nd = pt-&gt;namecache; nd != NULL; nd = nd-&gt;next)
-    {
-        if (!isUsedName(nd))
-            continue;
-
-        if (noIntro)
-        {
-            prcode(fp,
+    prcode(fp,
 &quot;\n&quot;
 &quot;/* The strings used by this module. */\n&quot;
-                );
-
-            noIntro = FALSE;
-        }
-
-        prcode(fp,
-&quot;extern char %N[];\n&quot;
-            , nd);
-    }
+&quot;extern const char *sipStrings_%s;\n&quot;
+        , mname);
 
     /* The unscoped enum macros. */
     generateEnumMacros(pt, mod, NULL, fp);
@@ -748,20 +728,16 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
             , mname, mld-&gt;module-&gt;name);
     }
 
-    if (optQ_OBJECT4(pt))
-        /*
-         * Note that the third argument is no longer used and is there only to
-         * preserve backwards binary compatibility.
-         */
+    if (pluginPyQt4(pt))
         prcode(fp,
 &quot;\n&quot;
-&quot;typedef const QMetaObject *(*sip_qt_metaobject_func)(sipWrapper *,sipWrapperType *,const QMetaObject *);\n&quot;
+&quot;typedef const QMetaObject *(*sip_qt_metaobject_func)(sipSimpleWrapper *,sipTypeDef *);\n&quot;
 &quot;extern sip_qt_metaobject_func sip_%s_qt_metaobject;\n&quot;
 &quot;\n&quot;
-&quot;typedef int (*sip_qt_metacall_func)(sipWrapper *,sipWrapperType *,QMetaObject::Call,int,void **);\n&quot;
+&quot;typedef int (*sip_qt_metacall_func)(sipSimpleWrapper *,sipTypeDef *,QMetaObject::Call,int,void **);\n&quot;
 &quot;extern sip_qt_metacall_func sip_%s_qt_metacall;\n&quot;
 &quot;\n&quot;
-&quot;typedef int (*sip_qt_metacast_func)(sipWrapper *,sipWrapperType *,const char *);\n&quot;
+&quot;typedef int (*sip_qt_metacast_func)(sipSimpleWrapper *,sipTypeDef *,const char *);\n&quot;
 &quot;extern sip_qt_metacast_func sip_%s_qt_metacast;\n&quot;
             , mname
             , mname
@@ -842,13 +818,13 @@ static void generateCompositeCpp(sipSpec *pt, const char *codeDir)
 &quot;    sipModule = Py_InitModule(\&quot;%s\&quot;, 0);\n&quot;
 &quot;    sipModuleDict = PyModule_GetDict(sipModule);\n&quot;
 &quot;\n&quot;
-        , pt-&gt;module-&gt;fullname);
+        , pt-&gt;module-&gt;fullname-&gt;text);
 
     for (mod = pt-&gt;modules; mod != NULL; mod = mod-&gt;next)
         if (mod-&gt;container == pt-&gt;module)
             prcode(fp,
 &quot;    sip_import_component_module(sipModuleDict, \&quot;%s\&quot;);\n&quot;
-                , mod-&gt;fullname);
+                , mod-&gt;fullname-&gt;text);
 
     prcode(fp,
 &quot;\n&quot;
@@ -921,7 +897,7 @@ static void generateConsolidatedCpp(sipSpec *pt, const char *codeDir,
     for (mod = pt-&gt;modules; mod != NULL; mod = mod-&gt;next)
         if (mod-&gt;container == pt-&gt;module)
             prcode(fp,
-&quot;        {\&quot;%s\&quot;, sip_init_%s},\n&quot;
+&quot;        {%N, sip_init_%s},\n&quot;
                 , mod-&gt;fullname, mod-&gt;name);
 
     prcode(fp,
@@ -1001,7 +977,7 @@ static void generateComponentCpp(sipSpec *pt, const char *codeDir,
 &quot;    Py_XDECREF(sip_result);\n&quot;
 &quot;    Py_DECREF(sip_mod);\n&quot;
 &quot;}\n&quot;
-        , pt-&gt;module-&gt;fullname);
+        , pt-&gt;module-&gt;fullname-&gt;text);
 
     closeFile(fp);
     free(cppfile);
@@ -1013,28 +989,23 @@ static void generateComponentCpp(sipSpec *pt, const char *codeDir,
  */
 static void generateNameCache(sipSpec *pt, FILE *fp)
 {
-    int noIntro = TRUE;
     nameDef *nd;
 
-    for (nd = pt-&gt;namecache; nd != NULL; nd = nd-&gt;next)
-    {
-        if (!isUsedName(nd))
-            continue;
-
-        if (noIntro)
-        {
-            prcode(fp,
+    prcode(fp,
 &quot;\n&quot;
 &quot;/* Define the strings used by this module. */\n&quot;
-                );
+&quot;const char *sipStrings_%s =&quot;, pt-&gt;module-&gt;name);
 
-            noIntro = FALSE;
-        }
+    for (nd = pt-&gt;namecache; nd != NULL; nd = nd-&gt;next)
+    {
+        if (!isUsedName(nd) || isSubstring(nd))
+            continue;
 
-        prcode(fp,
-&quot;char %N[] = \&quot;%s\&quot;;\n&quot;
-            , nd, nd-&gt;text);
+        prcode(fp, &quot;\n&quot;
+&quot;    \&quot;%s\\0\&quot;&quot;, nd-&gt;text);
     }
+
+    prcode(fp, &quot;;\n&quot;);
 }
 
 
@@ -1046,15 +1017,16 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
 {
     char *cppfile;
     const char *mname = mod-&gt;name;
-    int noIntro, nrSccs = 0, files_in_part, max_per_part, this_part, mod_nr;
+    int nrSccs = 0, files_in_part, max_per_part, this_part, mod_nr, enum_idx;
     int is_inst_class, is_inst_voidp, is_inst_char, is_inst_string;
     int is_inst_int, is_inst_long, is_inst_ulong, is_inst_longlong;
-    int is_inst_ulonglong, is_inst_double, is_inst_enum, nr_enummembers;
+    int is_inst_ulonglong, is_inst_double, nr_enummembers;
     int hasexternal = FALSE, slot_extenders = FALSE, ctor_extenders = FALSE;
     FILE *fp;
     moduleListDef *mld;
     classDef *cd;
     memberDef *md;
+    enumDef *ed;
     ifaceFileDef *iff;
     virtHandlerDef *vhd;
     exceptionDef *xd;
@@ -1098,15 +1070,11 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
     if (mod-&gt;qobjclass &gt;= 0)
         prcode(fp,
 &quot;\n&quot;
-&quot;#define sipQtIsQtSignal                     0\n&quot;
-&quot;#define sipQtCreateUniversalSignalShortcut  0\n&quot;
 &quot;#define sipQtCreateUniversalSignal          0\n&quot;
-&quot;#define sipQtFindUniversalSignalShortcut    0\n&quot;
 &quot;#define sipQtFindUniversalSignal            0\n&quot;
-&quot;#define sipQtEmitSignalShortcut             0\n&quot;
-&quot;#define sipQtEmitSignal                     0\n&quot;
-&quot;#define sipQtCreateUniversalSlotEx          0\n&quot;
-&quot;#define sipQtRegisterMetaType               0\n&quot;
+&quot;#define sipQtSignalRelay                    0\n&quot;
+&quot;#define sipQtConnectPySignal                0\n&quot;
+&quot;#define sipQtDisconnectPySignal             0\n&quot;
             );
 
     /* Define the names. */
@@ -1231,189 +1199,190 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
     /* Generate the global access functions. */
     generateAccessFunctions(pt, mod, NULL, fp);
 
-    /* Generate the module data structures. */
-    if (mod-&gt;nrclasses &gt; 0)
-    {
-        nrSccs = generateSubClassConvertors(pt, mod, fp);
-
-        prcode(fp,
-&quot;\n&quot;
-&quot;\n&quot;
-&quot;/*\n&quot;
-&quot; * This defines each class in this module.  The values are replaced by the\n&quot;
-&quot; * proper Python types during the export process.\n&quot;
-&quot; */\n&quot;
-&quot;static sipWrapperType *typesTable[] = {\n&quot;
-            );
+    /* Generate any sub-class convertors. */
+    nrSccs = generateSubClassConvertors(pt, mod, fp);
 
-        generateClassTableEntries(mod, &amp;mod-&gt;root, fp);
+    /* Generate the external classes table if needed. */
+    for (cd = pt-&gt;classes; cd != NULL; cd = cd-&gt;next)
+    {
+        if (!isExternal(cd))
+            continue;
 
-        prcode(fp,
-&quot;};\n&quot;
-            );
+        if (cd-&gt;iff-&gt;module != mod)
+            continue;
 
-        /* Generate the external classes table if needed. */
-        for (cd = pt-&gt;classes; cd != NULL; cd = cd-&gt;next)
+        if (!hasexternal)
         {
-            if (!isExternal(cd))
-                continue;
-
-            if (cd-&gt;iff-&gt;module != mod)
-                continue;
-
-            if (!hasexternal)
-            {
-                prcode(fp,
+            prcode(fp,
 &quot;\n&quot;
 &quot;\n&quot;
 &quot;/* This defines each external type declared in this module, */\n&quot;
 &quot;static sipExternalTypeDef externalTypesTable[] = {\n&quot;
-                    );
+                );
 
-                hasexternal = TRUE;
-            }
+            hasexternal = TRUE;
+        }
 
-            prcode(fp,
+        prcode(fp,
 &quot;    {%d, \&quot;&quot;, cd-&gt;classnr);
-            prScopedName(fp, classFQCName(cd), &quot;.&quot;);
-            prcode(fp,&quot;\&quot;},\n&quot;
-                );
-        }
+        prScopedName(fp, classFQCName(cd), &quot;.&quot;);
+        prcode(fp,&quot;\&quot;},\n&quot;
+            );
+    }
 
-        if (hasexternal)
-            prcode(fp,
+    if (hasexternal)
+        prcode(fp,
 &quot;    {-1, NULL}\n&quot;
 &quot;};\n&quot;
-                );
-    }
+            );
 
-    if (mod-&gt;nrmappedtypes &gt; 0)
+    /* Generate any enum slot tables. */
+    for (ed = pt-&gt;enums; ed != NULL; ed = ed-&gt;next)
     {
-        mappedTypeDef *mtd;
-        argDef type;
+        memberDef *slot;
 
-        memset(&amp;type, 0, sizeof (argDef));
+        if (ed-&gt;module != mod || ed-&gt;fqcname == NULL)
+            continue;
+
+        if (ed-&gt;slots == NULL)
+            continue;
+
+        for (slot = ed-&gt;slots; slot != NULL; slot = slot-&gt;next)
+            generateSlot(mod, NULL, ed, slot, fp);
 
         prcode(fp,
 &quot;\n&quot;
-&quot;\n&quot;
-&quot;/* This defines each mapped type in this module. */\n&quot;
-&quot;static sipMappedType *mappedTypesTable[] = {\n&quot;
-            );
+&quot;static sipPySlotDef slots_%C[] = {\n&quot;
+            , ed-&gt;fqcname);
 
-        for (mtd = pt-&gt;mappedtypes; mtd != NULL; mtd = mtd-&gt;next)
+        for (slot = ed-&gt;slots; slot != NULL; slot = slot-&gt;next)
         {
-            if (mtd-&gt;iff-&gt;module != mod)
-                continue;
+            const char *stype;
 
-            type.atype = mapped_type;
-            type.u.mtd = mtd;
-
-            prcode(fp,
-&quot;    &amp;sipMappedTypeDef_%T,\n&quot;
-                ,&amp;type);
+            if ((stype = slotName(slot-&gt;slot)) != NULL)
+                prcode(fp,
+&quot;    {(void *)slot_%C_%s, %s},\n&quot;
+                    , ed-&gt;fqcname, slot-&gt;pyname-&gt;text, stype);
         }
 
         prcode(fp,
-&quot;    0\n&quot;
+&quot;    {0, (sipPySlotType)0}\n&quot;
 &quot;};\n&quot;
+&quot;\n&quot;
             );
     }
 
-    if (mod-&gt;nrenums &gt; 0)
+    /* Generate the enum type structures. */
+    enum_idx = 0;
+
+    for (ed = pt-&gt;enums; ed != NULL; ed = ed-&gt;next)
     {
-        enumDef *ed;
+        if (ed-&gt;module != mod || ed-&gt;fqcname == NULL)
+            continue;
 
-        prcode(fp,
-&quot;\n&quot;
-&quot;\n&quot;
-&quot;/* Define each named enum in this module. */\n&quot;
-            );
+        if (ed-&gt;ecd != NULL &amp;&amp; isTemplateClass(ed-&gt;ecd))
+            continue;
 
-        /* Generate any slot tables. */
-        for (ed = pt-&gt;enums; ed != NULL; ed = ed-&gt;next)
+        if (enum_idx == 0)
         {
-            memberDef *slot;
-
-            if (ed-&gt;module != mod || ed-&gt;fqcname == NULL)
-                continue;
+            prcode(fp,
+&quot;static sipEnumTypeDef enumTypes[] = {\n&quot;
+                );
+        }
 
-            if (ed-&gt;slots == NULL)
-                continue;
+        ed-&gt;enum_idx = enum_idx++;
 
-            for (slot = ed-&gt;slots; slot != NULL; slot = slot-&gt;next)
-                generateSlot(mod, NULL, ed, slot, fp);
+        prcode(fp,
+&quot;    {{0, 0, 0, SIP_TYPE_ENUM, %n, {0}}, %n, &quot;, ed-&gt;cname, ed-&gt;pyname);
 
-            prcode(fp,
-&quot;\n&quot;
-&quot;static sipPySlotDef slots_%C[] = {\n&quot;
-                , ed-&gt;fqcname);
+        if (ed-&gt;ecd == NULL)
+            prcode(fp, &quot;-1&quot;);
+        else
+            prcode(fp, &quot;%d&quot;, ed-&gt;ecd-&gt;classnr);
 
-            for (slot = ed-&gt;slots; slot != NULL; slot = slot-&gt;next)
-            {
-                const char *stype;
+        if (ed-&gt;slots != NULL)
+            prcode(fp, &quot;, slots_%C&quot;, ed-&gt;fqcname);
+        else
+            prcode(fp, &quot;, NULL&quot;);
 
-                if ((stype = slotName(slot-&gt;slot)) != NULL)
-                    prcode(fp,
-&quot;    {(void *)slot_%C_%s, %s},\n&quot;
-                        , ed-&gt;fqcname, slot-&gt;pyname-&gt;text, stype);
-            }
+        prcode(fp, &quot;},\n&quot;
+            );
+    }
 
-            prcode(fp,
-&quot;    {0, (sipPySlotType)0}\n&quot;
+    if (enum_idx != 0)
+        prcode(fp,
 &quot;};\n&quot;
-&quot;\n&quot;
-                );
-        }
+            );
+
+    nr_enummembers = generateEnumMemberTable(pt, mod, NULL, fp);
+
+    /* Generate the types table. */
+    if (mod-&gt;nrtypes &gt; 0)
+    {
+        int i;
+        argDef *ad;
 
         prcode(fp,
-&quot;static sipEnumDef enumTypesTable[] = {\n&quot;
+&quot;\n&quot;
+&quot;\n&quot;
+&quot;/*\n&quot;
+&quot; * This defines each type in this module.\n&quot;
+&quot; */\n&quot;
+&quot;static sipTypeDef *typesTable[] = {\n&quot;
             );
 
-        for (ed = pt-&gt;enums; ed != NULL; ed = ed-&gt;next)
+        for (ad = mod-&gt;types, i = 0; i &lt; mod-&gt;nrtypes; ++i, ++ad)
         {
-            const char *emname;
-
-            if (ed-&gt;module != mod || ed-&gt;fqcname == NULL)
-                continue;
-
-            if (ed-&gt;ecd != NULL &amp;&amp; isTemplateClass(ed-&gt;ecd))
-                continue;
+            const char *type_prefix, *type_suffix;
 
-            if (ed-&gt;ecd == NULL)
-                emname = mname;
-            else if (ed-&gt;ecd-&gt;real == NULL)
-                emname = ed-&gt;module-&gt;name;
+            if (pluginPyQt4(pt))
+            {
+                type_prefix = &quot;pyqt4&quot;;
+                type_suffix = &quot;.super&quot;;
+            }
+            else if (pluginPyQt3(pt) &amp;&amp; ad-&gt;atype == class_type)
+            {
+                type_prefix = &quot;pyqt3&quot;;
+                type_suffix = &quot;.super&quot;;
+            }
             else
-                emname = ed-&gt;ecd-&gt;real-&gt;iff-&gt;module-&gt;name;
-
-            prcode(fp,
-&quot;    {\&quot;%s.%P\&quot;, &quot;, emname, ed-&gt;ecd, ed-&gt;pyname-&gt;text);
+            {
+                type_prefix = &quot;sip&quot;;
+                type_suffix = &quot;&quot;;
+            }
 
-            prcode(fp, &quot;\&quot;%S\&quot;, &quot;, ed-&gt;fqcname);
+            switch (ad-&gt;atype)
+            {
+            case class_type:
+                if (isExternal(ad-&gt;u.cd))
+                    prcode(fp,
+&quot;    0,\n&quot;
+                        );
+                else
+                    prcode(fp,
+&quot;    &amp;%sType_%s_%C%s.ctd_base,\n&quot;
+                        , type_prefix, mod-&gt;name, classFQCName(ad-&gt;u.cd), type_suffix);
 
-            if (ed-&gt;ecd == NULL)
-                prcode(fp, &quot;-1&quot;);
-            else
-                prcode(fp, &quot;%d&quot;, ed-&gt;ecd-&gt;classnr);
+                break;
 
-            if (ed-&gt;slots != NULL)
-                prcode(fp, &quot;, slots_%C&quot;, ed-&gt;fqcname);
-            else
-                prcode(fp, &quot;, NULL&quot;);
+            case mapped_type:
+                prcode(fp,
+&quot;    &amp;%sMappedTypeDef_%T%s.mtd_base,\n&quot;
+                    , type_prefix, ad, type_suffix);
+                break;
 
-            prcode(fp, &quot;},\n&quot;
-                );
+            case enum_type:
+                prcode(fp,
+&quot;    &amp;enumTypes[%d].etd_base,\n&quot;
+                    , ad-&gt;u.ed-&gt;enum_idx);
+                break;
+            }
         }
 
         prcode(fp,
 &quot;};\n&quot;
             );
-
-        nr_enummembers = generateEnumMemberTable(pt, mod, NULL, fp);
     }
-    else
-        nr_enummembers = 0;
 
     if (mod-&gt;nrtypedefs &gt; 0)
     {
@@ -1423,147 +1392,32 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
 &quot;\n&quot;
 &quot;\n&quot;
 &quot;/*\n&quot;
-&quot; * These define each typedef in this module.  They are only needed in case\n&quot;
-&quot; * they are used as arguments to Qt signals.\n&quot;
+&quot; * These define each typedef in this module.\n&quot;
 &quot; */\n&quot;
-&quot;\n&quot;
 &quot;static sipTypedefDef typedefsTable[] = {\n&quot;
             );
 
         for (td = pt-&gt;typedefs; td != NULL; td = td-&gt;next)
         {
-            const char *tdmname, *sat;
-            scopedNameDef *fqname;
-            argDef *argtype;
-
             if (td-&gt;module != mod)
                 continue;
 
-            fqname = NULL;
-            tdmname = NULL;
-            argtype = NULL;
-            sat = &quot;unknown&quot;;
-
-            switch (td-&gt;type.atype)
-            {
-            case string_type:
-                sat = (td-&gt;type.nrderefs == 0 ? &quot;char&quot; : &quot;string&quot;);
-                break;
-
-            case sstring_type:
-                sat = (td-&gt;type.nrderefs == 0 ? &quot;schar&quot; : &quot;sstring&quot;);
-                break;
-
-            case ustring_type:
-                sat = (td-&gt;type.nrderefs == 0 ? &quot;uchar&quot; : &quot;ustring&quot;);
-                break;
-
-            case wstring_type:
-                sat = (td-&gt;type.nrderefs == 0 ? &quot;wchar&quot; : &quot;wstring&quot;);
-                break;
-
-            case short_type:
-                sat = &quot;short&quot;;
-                break;
-
-            case ushort_type:
-                sat = &quot;ushort&quot;;
-                break;
-
-            case cint_type:
-            case int_type:
-                sat = &quot;int&quot;;
-                break;
-
-            case uint_type:
-                sat = &quot;uint&quot;;
-                break;
-
-            case long_type:
-                sat = &quot;long&quot;;
-                break;
-
-            case ulong_type:
-                sat = &quot;ulong&quot;;
-                break;
-
-            case longlong_type:
-                sat = &quot;longlong&quot;;
-                break;
-
-            case ulonglong_type:
-                sat = &quot;ulonglong&quot;;
-                break;
-
-            case cfloat_type:
-            case float_type:
-                sat = &quot;float&quot;;
-                break;
-
-            case cdouble_type:
-            case double_type:
-                sat = &quot;double&quot;;
-                break;
-
-            case bool_type:
-            case cbool_type:
-                sat = &quot;bool&quot;;
-                break;
-
-            case fake_void_type:
-            case void_type:
-                if (td-&gt;type.nrderefs != 0)
-                    sat = &quot;void&quot;;
-                break;
-
-            case enum_type:
-                if ((fqname = td-&gt;type.u.ed-&gt;fqcname) != NULL)
-                {
-                    sat = &quot;enum&quot;;
-
-                    if (td-&gt;type.u.ed-&gt;module != mod)
-                        tdmname = td-&gt;type.u.ed-&gt;module-&gt;fullname;
-                }
-                break;
-
-            case class_type:
-                sat = &quot;class&quot;;
-                fqname = classFQCName(td-&gt;type.u.cd);
-
-                if (td-&gt;type.u.cd-&gt;iff-&gt;module != mod)
-                    tdmname = td-&gt;type.u.cd-&gt;iff-&gt;module-&gt;fullname;
-                break;
-
-            case mapped_type:
-                sat = &quot;mtype&quot;;
-                argtype = &amp;td-&gt;type.u.mtd-&gt;type;
-
-                if (td-&gt;type.u.mtd-&gt;iff-&gt;module != mod)
-                    tdmname = td-&gt;type.u.mtd-&gt;iff-&gt;module-&gt;fullname;
-                break;
-            }
-
             prcode(fp,
-&quot;    {\&quot;%S\&quot;, %s_sat&quot;, td-&gt;fqname, sat);
-
-            if (argtype != NULL)
-                prcode(fp, &quot;, \&quot;%b\&quot;&quot;, argtype);
-            else if (fqname != NULL)
-                prcode(fp, &quot;, \&quot;%S\&quot;&quot;, fqname);
-            else
-                prcode(fp, &quot;, NULL&quot;);
+&quot;    {\&quot;%S\&quot;, \&quot;&quot;, td-&gt;fqname);
 
-            if (tdmname != NULL)
-                prcode(fp, &quot;, \&quot;%s\&quot;&quot;, tdmname);
+            /* The default behaviour isn't right in a couple of cases. */
+            if (td-&gt;type.atype == longlong_type)
+                prcode(fp, &quot;long long&quot;);
+            else if (td-&gt;type.atype == ulonglong_type)
+                prcode(fp, &quot;unsigned long long&quot;);
             else
-                prcode(fp, &quot;, NULL&quot;);
+                prcode(fp, &quot;%b&quot;, &amp;td-&gt;type);
 
-            prcode(fp, &quot;},\n&quot;
+            prcode(fp, &quot;\&quot;},\n&quot;
                 );
         }
 
         prcode(fp,
-&quot;    {NULL, unknown_sat, NULL, NULL}\n&quot;
 &quot;};\n&quot;
             );
     }
@@ -1603,7 +1457,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
         for (mld = mod-&gt;allimports; mld != NULL; mld = mld-&gt;next)
             prcode(fp,
 &quot;    {\&quot;%s\&quot;, %d, NULL},\n&quot;
-                , mld-&gt;module-&gt;fullname, mld-&gt;module-&gt;version);
+                , mld-&gt;module-&gt;fullname-&gt;text, mld-&gt;module-&gt;version);
 
         prcode(fp,
 &quot;    {NULL, -1, NULL}\n&quot;
@@ -1701,7 +1555,6 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
     is_inst_longlong = generateLongLongs(pt, mod, NULL, fp);
     is_inst_ulonglong = generateUnsignedLongLongs(pt, mod, NULL, fp);
     is_inst_double = generateDoubles(pt, mod, NULL, fp);
-    is_inst_enum = generateEnums(pt, mod, NULL, fp);
 
     /* Generate any exceptions table. */
     if (mod-&gt;nrexceptions &gt; 0)
@@ -1720,25 +1573,18 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
 &quot;\n&quot;
 &quot;static sipQtAPI qtAPI = {\n&quot;
 &quot;    &amp;typesTable[%d],\n&quot;
-&quot;    sipQtIsQtSignal,\n&quot;
-&quot;    sipQtCreateUniversalSignalShortcut,\n&quot;
 &quot;    sipQtCreateUniversalSignal,\n&quot;
-&quot;    sipQtFindUniversalSignalShortcut,\n&quot;
 &quot;    sipQtFindUniversalSignal,\n&quot;
-&quot;    sipQtEmitSignalShortcut,\n&quot;
-&quot;    sipQtEmitSignal,\n&quot;
 &quot;    sipQtCreateUniversalSlot,\n&quot;
 &quot;    sipQtDestroyUniversalSlot,\n&quot;
 &quot;    sipQtFindSlot,\n&quot;
 &quot;    sipQtConnect,\n&quot;
 &quot;    sipQtDisconnect,\n&quot;
-&quot;    sipQtSignalsBlocked,\n&quot;
-&quot;    sipQtGetSender,\n&quot;
-&quot;    sipQtForgetSender,\n&quot;
 &quot;    sipQtSameSignalSlotName,\n&quot;
-&quot;    sipQtFindConnection,\n&quot;
-&quot;    sipQtCreateUniversalSlotEx,\n&quot;
-&quot;    sipQtRegisterMetaType\n&quot;
+&quot;    sipQtFindSipslot,\n&quot;
+&quot;    sipQtSignalRelay,\n&quot;
+&quot;    sipQtConnectPySignal,\n&quot;
+&quot;    sipQtDisconnectPySignal\n&quot;
 &quot;};\n&quot;
             , mod-&gt;qobjclass);
 
@@ -1747,50 +1593,47 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
 &quot;\n&quot;
 &quot;/* This defines this module. */\n&quot;
 &quot;sipExportedModuleDef sipModuleAPI_%s = {\n&quot;
-&quot;    NULL,\n&quot;
+&quot;    0,\n&quot;
 &quot;    SIP_API_MINOR_NR,\n&quot;
-&quot;    \&quot;%s\&quot;,\n&quot;
-&quot;    NULL,\n&quot;
+&quot;    %n,\n&quot;
+&quot;    0,\n&quot;
 &quot;    %d,\n&quot;
+&quot;    sipStrings_%s,\n&quot;
 &quot;    %s,\n&quot;
 &quot;    %s,\n&quot;
 &quot;    %d,\n&quot;
 &quot;    %s,\n&quot;
 &quot;    %s,\n&quot;
-&quot;    %s,\n&quot;
 &quot;    %d,\n&quot;
-&quot;    NULL,\n&quot;
 &quot;    %s,\n&quot;
 &quot;    %d,\n&quot;
 &quot;    %s,\n&quot;
 &quot;    %s,\n&quot;
 &quot;    %s,\n&quot;
-&quot;    %s,\n&quot;
-&quot;    {%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s},\n&quot;
+&quot;    {%s, %s, %s, %s, %s, %s, %s, %s, %s, %s},\n&quot;
 &quot;    %s,\n&quot;
 &quot;    %s,\n&quot;
 &quot;    %s,\n&quot;
 &quot;    %s,\n&quot;
 &quot;    %s,\n&quot;
-&quot;    NULL\n&quot;
+&quot;    0\n&quot;
 &quot;};\n&quot;
         , mname
         , mod-&gt;fullname
         , mod-&gt;version
+        , mname
         , mod-&gt;allimports != NULL ? &quot;importsTable&quot; : &quot;NULL&quot;
         , mod-&gt;qobjclass &gt;= 0 ? &quot;&amp;qtAPI&quot; : &quot;NULL&quot;
-        , mod-&gt;nrclasses
-        , mod-&gt;nrclasses &gt; 0 ? &quot;typesTable&quot; : &quot;NULL&quot;
+        , mod-&gt;nrtypes
+        , mod-&gt;nrtypes &gt; 0 ? &quot;typesTable&quot; : &quot;NULL&quot;
         , hasexternal ? &quot;externalTypesTable&quot; : &quot;NULL&quot;
-        , mod-&gt;nrmappedtypes &gt; 0 ? &quot;mappedTypesTable&quot; : &quot;NULL&quot;
-        , mod-&gt;nrenums
-        , mod-&gt;nrenums &gt; 0 ? &quot;enumTypesTable&quot; : &quot;NULL&quot;
         , nr_enummembers
         , nr_enummembers &gt; 0 ? &quot;enummembers&quot; : &quot;NULL&quot;
+        , mod-&gt;nrtypedefs
         , mod-&gt;nrtypedefs &gt; 0 ? &quot;typedefsTable&quot; : &quot;NULL&quot;
         , mod-&gt;nrvirthandlers &gt; 0 ? &quot;virtHandlersTable&quot; : &quot;NULL&quot;
         , nrSccs &gt; 0 ? &quot;convertorsTable&quot; : &quot;NULL&quot;
-        , is_inst_class ? &quot;classInstances&quot; : &quot;NULL&quot;
+        , is_inst_class ? &quot;typeInstances&quot; : &quot;NULL&quot;
         , is_inst_voidp ? &quot;voidPtrInstances&quot; : &quot;NULL&quot;
         , is_inst_char ? &quot;charInstances&quot; : &quot;NULL&quot;
         , is_inst_string ? &quot;stringInstances&quot; : &quot;NULL&quot;
@@ -1800,7 +1643,6 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
         , is_inst_longlong ? &quot;longLongInstances&quot; : &quot;NULL&quot;
         , is_inst_ulonglong ? &quot;unsignedLongLongInstances&quot; : &quot;NULL&quot;
         , is_inst_double ? &quot;doubleInstances&quot; : &quot;NULL&quot;
-        , is_inst_enum ? &quot;enumInstances&quot; : &quot;NULL&quot;
         , mod-&gt;license != NULL ? &quot;&amp;module_license&quot; : &quot;NULL&quot;
         , mod-&gt;nrexceptions &gt; 0 ? &quot;exceptionsTable&quot; : &quot;NULL&quot;
         , slot_extenders ? &quot;slotExtenders&quot; : &quot;NULL&quot;
@@ -1820,7 +1662,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
 &quot;const sipExportedModuleDef *sipModuleAPI_%s_%s;\n&quot;
             , mname, mld-&gt;module-&gt;name);
 
-    if (optQ_OBJECT4(pt))
+    if (pluginPyQt4(pt))
         prcode(fp,
 &quot;\n&quot;
 &quot;sip_qt_metaobject_func sip_%s_qt_metaobject;\n&quot;
@@ -1848,6 +1690,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
 
     for (md = mod-&gt;othfuncs; md != NULL; md = md-&gt;next)
         if (md-&gt;slot == no_slot)
+        {
             if (noArgParser(md))
                 prcode(fp,
 &quot;        {%N, (PyCFunction)func_%s, METH_KEYWORDS, NULL},\n&quot;
@@ -1856,6 +1699,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
                 prcode(fp,
 &quot;        {%N, func_%s, METH_VARARGS, NULL},\n&quot;
                     , md-&gt;pyname, md-&gt;pyname-&gt;text);
+        }
 
     prcode(fp,
 &quot;        {0, 0, 0, 0}\n&quot;
@@ -1871,16 +1715,40 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
 
     prcode(fp,
 &quot;    /* Initialise the module and get it's dictionary. */\n&quot;
-&quot;    sipModule = Py_InitModule((char *)sipModuleAPI_%s.em_name,sip_methods);\n&quot;
+&quot;    sipModule = Py_InitModule((char *)%N,sip_methods);\n&quot;
 &quot;    sipModuleDict = PyModule_GetDict(sipModule);\n&quot;
 &quot;\n&quot;
-        , mname);
+        , mod-&gt;fullname);
 
     generateSipImport(mod, fp);
 
+    /* Generate any initialisation code. */
+    generateCppCodeBlock(mod-&gt;initcode, fp);
+
     prcode(fp,
 &quot;    /* Export the module and publish it's API. */\n&quot;
-&quot;    if (sipAPI_%s-&gt;api_export_module(&amp;sipModuleAPI_%s,SIP_API_MAJOR_NR,SIP_API_MINOR_NR,sipModuleDict) &lt; 0)\n&quot;
+&quot;    if (sipAPI_%s-&gt;api_export_module(&amp;sipModuleAPI_%s,SIP_API_MAJOR_NR,SIP_API_MINOR_NR,0) &lt; 0)\n&quot;
+&quot;       return;\n&quot;
+        , mname
+        , mname);
+
+    if (pluginPyQt4(pt))
+    {
+        /* Import the helpers. */
+        prcode(fp,
+&quot;\n&quot;
+&quot;    sip_%s_qt_metaobject = (sip_qt_metaobject_func)sipImportSymbol(\&quot;qtcore_qt_metaobject\&quot;);\n&quot;
+&quot;    sip_%s_qt_metacall = (sip_qt_metacall_func)sipImportSymbol(\&quot;qtcore_qt_metacall\&quot;);\n&quot;
+&quot;    sip_%s_qt_metacast = (sip_qt_metacast_func)sipImportSymbol(\&quot;qtcore_qt_metacast\&quot;);\n&quot;
+&quot;\n&quot;
+            , mname
+            , mname
+            , mname);
+    }
+
+    prcode(fp,
+&quot;    /* Initialise the module now all its dependencies have been set up. */\n&quot;
+&quot;    if (sipAPI_%s-&gt;api_init_module(&amp;sipModuleAPI_%s,sipModuleDict) &lt; 0)\n&quot;
 &quot;       return;\n&quot;
         , mname
         , mname);
@@ -1902,8 +1770,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
         ++mod_nr;
     }
 
-    generateClassesInline(pt, mod, fp);
-    generateEnumsInline(pt, mod, fp);
+    generateTypesInline(pt, mod, fp);
 
     /* Create any exceptions. */
     for (xd = pt-&gt;exceptions; xd != NULL; xd = xd-&gt;next)
@@ -1933,32 +1800,9 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
             , xd-&gt;pyname, xd-&gt;exceptionnr);
     }
 
-    /* Generate any Qt meta type registration calls. */
-    if (optRegisterTypes(pt))
-        for (cd = pt-&gt;classes; cd != NULL; cd = cd-&gt;next)
-            if (cd-&gt;iff-&gt;module == mod)
-                if (registerQtMetaType(cd))
-                    prcode(fp,
-&quot;    sipRegisterMetaType(qRegisterMetaType&lt;%S&gt;(\&quot;%S\&quot;), sipClass_%C);\n&quot;
-                        , classFQCName(cd), classFQCName(cd), classFQCName(cd));
-
     /* Generate any post-initialisation code. */
     generateCppCodeBlock(mod-&gt;postinitcode, fp);
 
-    /*
-     * This has to be done after the post-initialisation code in case this
-     * module is exporting the symbol.
-     */
-    if (optQ_OBJECT4(pt))
-        prcode(fp,
-&quot;\n&quot;
-&quot;    sip_%s_qt_metaobject = (sip_qt_metaobject_func)sipImportSymbol(\&quot;qtcore_qt_metaobject\&quot;);\n&quot;
-&quot;    sip_%s_qt_metacall = (sip_qt_metacall_func)sipImportSymbol(\&quot;qtcore_qt_metacall\&quot;);\n&quot;
-&quot;    sip_%s_qt_metacast = (sip_qt_metacast_func)sipImportSymbol(\&quot;qtcore_qt_metacast\&quot;);\n&quot;
-            , mname
-            , mname
-            , mname);
-
     prcode(fp,
 &quot;}\n&quot;
         );
@@ -2082,6 +1926,8 @@ static int generateSubClassConvertors(sipSpec *pt, moduleDef *mod, FILE *fp)
 
     for (cd = pt-&gt;classes; cd != NULL; cd = cd-&gt;next)
     {
+        int needs_sipClass;
+
         if (cd-&gt;iff-&gt;module != mod)
             continue;
 
@@ -2096,56 +1942,49 @@ static int generateSubClassConvertors(sipSpec *pt, moduleDef *mod, FILE *fp)
 
         if (!generating_c)
             prcode(fp,
-&quot;extern \&quot;C\&quot; {static sipWrapperType *sipSubClass_%C(void **);}\n&quot;
+&quot;extern \&quot;C\&quot; {static const sipTypeDef *sipSubClass_%C(void **);}\n&quot;
                 , classFQCName(cd));
 
+        /* Allow the deprecated use of sipClass rather than sipType. */
+        needs_sipClass = usedInCode(cd-&gt;convtosubcode, &quot;sipClass&quot;);
+
         prcode(fp,
-&quot;static sipWrapperType *sipSubClass_%C(void **sipCppRet)\n&quot;
+&quot;static const sipTypeDef *sipSubClass_%C(void **sipCppRet)\n&quot;
 &quot;{\n&quot;
 &quot;    %S *sipCpp = reinterpret_cast&lt;%S *&gt;(*sipCppRet);\n&quot;
-&quot;    sipWrapperType *sipClass;\n&quot;
-&quot;\n&quot;
             , classFQCName(cd)
             , classFQCName(cd-&gt;subbase), classFQCName(cd-&gt;subbase));
 
-        generateCppCodeBlock(cd-&gt;convtosubcode, fp);
-
-        prcode(fp,
+        if (needs_sipClass)
+            prcode(fp,
+&quot;    sipWrapperType *sipClass;\n&quot;
 &quot;\n&quot;
-&quot;    return sipClass;\n&quot;
-&quot;}\n&quot;
-            );
-
-        ++nrSccs;
-    }
-
-    return nrSccs;
-}
-
+                );
+        else
+            prcode(fp,
+&quot;    const sipTypeDef *sipType;\n&quot;
+&quot;\n&quot;
+                );
 
-/*
- * Generate an entry for a class in the classes table and all its children.
- */
-static void generateClassTableEntries(moduleDef *mod, nodeDef *nd, FILE *fp)
-{
-    nodeDef *cnd;
+        generateCppCodeBlock(cd-&gt;convtosubcode, fp);
 
-    /* Generate the entry if it's not the root. */
-    if (nd-&gt;cd != NULL)
-    {
-        if (isExternal(nd-&gt;cd))
+        if (needs_sipClass)
             prcode(fp,
-&quot;    0,\n&quot;
+&quot;\n&quot;
+&quot;    return (sipClass ? sipClass-&gt;type : 0);\n&quot;
+&quot;}\n&quot;
                 );
         else
             prcode(fp,
-&quot;    (sipWrapperType *)(void *)&amp;sipType_%s_%C,\n&quot;
-                , mod-&gt;name, classFQCName(nd-&gt;cd));
+&quot;\n&quot;
+&quot;    return sipType;\n&quot;
+&quot;}\n&quot;
+                );
+
+        ++nrSccs;
     }
 
-    /* Generate all it's children. */
-    for (cnd = nd-&gt;child; cnd != NULL; cnd = cnd-&gt;next)
-        generateClassTableEntries(mod, cnd, fp);
+    return nrSccs;
 }
 
 
@@ -2214,6 +2053,7 @@ static void generateOrdinaryFunction(moduleDef *mod, classDef *cd,
         const char *self = (generating_c ? &quot;sipSelf&quot; : &quot;&quot;);
 
         if (!generating_c)
+        {
             if (noArgParser(md))
                 prcode(fp,
 &quot;extern \&quot;C\&quot; {static PyObject *func_%s(PyObject *,PyObject *,PyObject *);}\n&quot;
@@ -2222,6 +2062,7 @@ static void generateOrdinaryFunction(moduleDef *mod, classDef *cd,
                 prcode(fp,
 &quot;extern \&quot;C\&quot; {static PyObject *func_%s(PyObject *,PyObject *);}\n&quot;
                     , md-&gt;pyname-&gt;text);
+        }
 
         if (noArgParser(md))
             prcode(fp,
@@ -2314,7 +2155,7 @@ static int generateEnumMemberTable(sipSpec *pt, moduleDef *mod, classDef *cd,
 
     /* Create a table so they can be sorted. */
 
-    etab = sipMalloc(sizeof (enumMemberDef *) * nr_members);
+    etab = sipCalloc(nr_members, sizeof (enumMemberDef *));
 
     et = etab;
 
@@ -2382,7 +2223,6 @@ static int generateEnumMemberTable(sipSpec *pt, moduleDef *mod, classDef *cd,
  * The qsort helper to compare two enumMemberDef structures based on the name
  * of the enum member.
  */
-
 static int compareEnumMembers(const void *m1,const void *m2)
 {
     return strcmp((*(enumMemberDef **)m1)-&gt;pyname-&gt;text,
@@ -2432,58 +2272,10 @@ static void generateAccessFunctions(sipSpec *pt, moduleDef *mod, classDef *cd,
 
 
 /*
- * Generate the inline code to add a set of enum instances to a dictionary.
- */
-static void generateEnumsInline(sipSpec *pt, moduleDef *mod, FILE *fp)
-{
-    int noIntro;
-    varDef *vd;
-
-    noIntro = TRUE;
-
-    for (vd = pt-&gt;vars; vd != NULL; vd = vd-&gt;next)
-    {
-        if (vd-&gt;module != mod)
-            continue;
-
-        if (vd-&gt;type.atype != enum_type)
-            continue;
-
-        if (needsHandler(vd))
-            continue;
-
-        /* Skip enums that don't need inline code. */
-        if (generating_c || vd-&gt;accessfunc != NULL || vd-&gt;type.nrderefs != 0)
-            continue;
-
-        if (noIntro)
-        {
-            prcode(fp,
-&quot;\n&quot;
-&quot;    /* Define the enum instances that have to be added inline. */\n&quot;
-                );
-
-            noIntro = FALSE;
-        }
-
-        prcode(fp,
-&quot;    sipAddEnumInstance(&quot;);
-
-        if (vd-&gt;ecd == NULL)
-            prcode(fp, &quot;sipModuleDict&quot;);
-        else
-            prcode(fp, &quot;(PyObject *)sipClass_%C&quot;, classFQCName(vd-&gt;ecd));
-
-        prcode(fp, &quot;,%N,(int)%S,sipEnum_%C);\n&quot;
-            , vd-&gt;pyname, vd-&gt;fqcname, vd-&gt;type.u.ed-&gt;fqcname);
-    }
-}
-
-
-/*
- * Generate the inline code to add a set of class instances to a dictionary.
+ * Generate the inline code to add a set of generated type instances to a
+ * dictionary.
  */
-static void generateClassesInline(sipSpec *pt, moduleDef *mod, FILE *fp)
+static void generateTypesInline(sipSpec *pt, moduleDef *mod, FILE *fp)
 {
     int noIntro;
     varDef *vd;
@@ -2495,7 +2287,7 @@ static void generateClassesInline(sipSpec *pt, moduleDef *mod, FILE *fp)
         if (vd-&gt;module != mod)
             continue;
 
-        if (vd-&gt;type.atype != class_type &amp;&amp; vd-&gt;type.atype != mapped_type)
+        if (vd-&gt;type.atype != class_type &amp;&amp; vd-&gt;type.atype != mapped_type &amp;&amp; vd-&gt;type.atype != enum_type)
             continue;
 
         if (needsHandler(vd))
@@ -2510,25 +2302,21 @@ static void generateClassesInline(sipSpec *pt, moduleDef *mod, FILE *fp)
             prcode(fp,
 &quot;\n&quot;
 &quot;    /*\n&quot;
-&quot;     * Define the class and mapped type instances that have to be added\n&quot;
-&quot;     * inline.\n&quot;
+&quot;     * Define the class, mapped type and enum instances that have to be\n&quot;
+&quot;     * added inline.\n&quot;
 &quot;     */\n&quot;
                 );
 
             noIntro = FALSE;
         }
 
-        if (vd-&gt;type.atype == class_type)
-            prcode(fp,
-&quot;    sipAddClassInstance(&quot;);
-        else
-            prcode(fp,
-&quot;    sipAddMappedTypeInstance(&quot;);
+        prcode(fp,
+&quot;    sipAddTypeInstance(&quot;);
 
         if (vd-&gt;ecd == NULL)
             prcode(fp, &quot;sipModuleDict&quot;);
         else
-            prcode(fp, &quot;(PyObject *)sipClass_%C&quot;, classFQCName(vd-&gt;ecd));
+            prcode(fp, &quot;(PyObject *)sipTypeAsPyTypeObject(sipType_%C)&quot;, classFQCName(vd-&gt;ecd));
 
         prcode(fp, &quot;,%N,&quot;, vd-&gt;pyname);
 
@@ -2538,10 +2326,13 @@ static void generateClassesInline(sipSpec *pt, moduleDef *mod, FILE *fp)
             prcode(fp, &quot;&amp;%S&quot;, vd-&gt;fqcname);
 
         if (vd-&gt;type.atype == class_type)
-            prcode(fp, &quot;,sipClass_%C);\n&quot;
+            prcode(fp, &quot;,sipType_%C);\n&quot;
                 , classFQCName(vd-&gt;type.u.cd));
+        else if (vd-&gt;type.atype == enum_type)
+            prcode(fp, &quot;,sipType_%C);\n&quot;
+                , vd-&gt;type.u.ed-&gt;fqcname);
         else
-            prcode(fp, &quot;,sipMappedType_%T);\n&quot;
+            prcode(fp, &quot;,sipType_%T);\n&quot;
                 , &amp;vd-&gt;type);
     }
 }
@@ -2560,12 +2351,10 @@ static int generateClasses(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp)
 
     for (vd = pt-&gt;vars; vd != NULL; vd = vd-&gt;next)
     {
-        scopedNameDef *vcname;
-
         if (vd-&gt;ecd != cd || vd-&gt;module != mod)
             continue;
 
-        if (vd-&gt;type.atype != class_type)
+        if (vd-&gt;type.atype != class_type &amp;&amp; (vd-&gt;type.atype != enum_type || vd-&gt;type.u.ed-&gt;fqcname == NULL))
             continue;
 
         if (needsHandler(vd))
@@ -2587,46 +2376,51 @@ static int generateClasses(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp)
                 prcode(fp,
 &quot;\n&quot;
 &quot;\n&quot;
-&quot;/* Define the class instances to be added to this type dictionary. */\n&quot;
-&quot;static sipClassInstanceDef classInstances_%C[] = {\n&quot;
+&quot;/* Define the class and enum instances to be added to this type dictionary. */\n&quot;
+&quot;static sipTypeInstanceDef typeInstances_%C[] = {\n&quot;
                     , classFQCName(cd));
             else
                 prcode(fp,
 &quot;\n&quot;
 &quot;\n&quot;
-&quot;/* Define the class instances to be added to this module dictionary. */\n&quot;
-&quot;static sipClassInstanceDef classInstances[] = {\n&quot;
+&quot;/* Define the class and enum instances to be added to this module dictionary. */\n&quot;
+&quot;static sipTypeInstanceDef typeInstances[] = {\n&quot;
                     );
 
             noIntro = FALSE;
         }
 
-        vcname = classFQCName(vd-&gt;type.u.cd);
+        prcode(fp,
+&quot;    {%N, &quot;, vd-&gt;pyname);
 
-        if (vd-&gt;accessfunc != NULL)
-        {
-            prcode(fp,
-&quot;    {%N, (void *)access_%C, &amp;sipClass_%C, SIP_ACCFUNC},\n&quot;
-                , vd-&gt;pyname, vd-&gt;fqcname, vcname);
-        }
-        else if (vd-&gt;type.nrderefs != 0)
-        {
-            prcode(fp,
-&quot;    {%N, &amp;%S, &amp;sipClass_%C, SIP_INDIRECT},\n&quot;
-                , vd-&gt;pyname, vd-&gt;fqcname, vcname);
-        }
-        else if (isConstArg(&amp;vd-&gt;type))
+        if (vd-&gt;type.atype == class_type)
         {
-            prcode(fp,
-&quot;    {%N, const_cast&lt;%b *&gt;(&amp;%S), &amp;sipClass_%C, 0},\n&quot;
-                , vd-&gt;pyname, &amp;vd-&gt;type, vd-&gt;fqcname, vcname);
+            scopedNameDef *vcname = classFQCName(vd-&gt;type.u.cd);
+
+            if (vd-&gt;accessfunc != NULL)
+            {
+                prcode(fp, &quot;(void *)access_%C, &amp;sipType_%C, SIP_ACCFUNC&quot;, vd-&gt;fqcname, vcname);
+            }
+            else if (vd-&gt;type.nrderefs != 0)
+            {
+                prcode(fp, &quot;&amp;%S, &amp;sipType_%C, SIP_INDIRECT&quot;, vd-&gt;fqcname, vcname);
+            }
+            else if (isConstArg(&amp;vd-&gt;type))
+            {
+                prcode(fp, &quot;const_cast&lt;%b *&gt;(&amp;%S), &amp;sipType_%C, 0&quot;, &amp;vd-&gt;type, vd-&gt;fqcname, vcname);
+            }
+            else
+            {
+                prcode(fp, &quot;&amp;%S, &amp;sipType_%C, 0&quot;, vd-&gt;fqcname, vcname);
+            }
         }
         else
         {
-            prcode(fp,
-&quot;    {%N, &amp;%S, &amp;sipClass_%C, 0},\n&quot;
-                , vd-&gt;pyname, vd-&gt;fqcname, vcname);
+            prcode(fp, &quot;&amp;%S, &amp;sipType_%C, 0&quot;, vd-&gt;fqcname, vd-&gt;type.u.ed-&gt;fqcname);
         }
+
+        prcode(fp, &quot;},\n&quot;
+            );
     }
 
     if (!noIntro)
@@ -2821,67 +2615,6 @@ static int generateStrings(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp)
 
 
 /*
- * Generate the code to add a set of enum instances to a dictionary.  Return
- * TRUE if there was at least one.
- */
-static int generateEnums(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp)
-{
-    int noIntro;
-    varDef *vd;
-
-    noIntro = TRUE;
-
-    for (vd = pt-&gt;vars; vd != NULL; vd = vd-&gt;next)
-    {
-        if (vd-&gt;ecd != cd || vd-&gt;module != mod)
-            continue;
-
-        if (vd-&gt;type.atype != enum_type || vd-&gt;type.u.ed-&gt;fqcname == NULL)
-            continue;
-
-        if (needsHandler(vd))
-            continue;
-
-        /* Skip enums that need inline code. */
-        if (!generating_c &amp;&amp; vd-&gt;accessfunc == NULL &amp;&amp; vd-&gt;type.nrderefs == 0)
-            continue;
-
-        if (noIntro)
-        {
-            if (cd != NULL)
-                prcode(fp,
-&quot;\n&quot;
-&quot;\n&quot;
-&quot;/* Define the enum instances to be added to this type dictionary. */\n&quot;
-&quot;static sipEnumInstanceDef enumInstances_%C[] = {\n&quot;
-                    , classFQCName(cd));
-            else
-                prcode(fp,
-&quot;\n&quot;
-&quot;\n&quot;
-&quot;/* Define the enum instances to be added to this module dictionary. */\n&quot;
-&quot;static sipEnumInstanceDef enumInstances[] = {\n&quot;
-                    );
-
-            noIntro = FALSE;
-        }
-
-        prcode(fp,
-&quot;    {%N, (int)%S, &amp;sipEnum_%C},\n&quot;
-            , vd-&gt;pyname, vd-&gt;fqcname, vd-&gt;type.u.ed-&gt;fqcname);
-    }
-
-    if (!noIntro)
-        prcode(fp,
-&quot;    {0, 0, 0}\n&quot;
-&quot;};\n&quot;
-            );
-
-    return !noIntro;
-}
-
-
-/*
  * Generate the code to add a set of ints to a dictionary.  Return TRUE if
  * there was at least one.
  */
@@ -3238,37 +2971,22 @@ static char *createIfaceFileName(const char *codeDir, ifaceFileDef *iff,
  */
 static void generateMappedTypeCpp(mappedTypeDef *mtd, sipSpec *pt, FILE *fp)
 {
-    int need_xfer;
+    int need_xfer, embedded;
+    const char *type_prefix;
 
-    if (optAssignmentHelpers(pt) &amp;&amp; !noRelease(mtd))
+    if (pluginPyQt4(pt) &amp;&amp; !noRelease(mtd))
     {
         prcode(fp,
 &quot;\n&quot;
 &quot;\n&quot;
-            );
-
-        if (!generating_c)
-            prcode(fp,
 &quot;extern \&quot;C\&quot; {static void assign_%T(void *, const void*);}\n&quot;
-                , &amp;mtd-&gt;type);
-
-        prcode(fp,
 &quot;static void assign_%T(void *sipDst, const void *sipSrc)\n&quot;
 &quot;{\n&quot;
-            , &amp;mtd-&gt;type);
-
-        if (generating_c)
-            prcode(fp,
-&quot;    *(%b *)sipDst = *(const %b *)sipSrc;\n&quot;
-                , &amp;mtd-&gt;type, &amp;mtd-&gt;type);
-        else
-            prcode(fp,
 &quot;    *reinterpret_cast&lt;%b *&gt;(sipDst) = *reinterpret_cast&lt;const %b *&gt;(sipSrc);\n&quot;
-                , &amp;mtd-&gt;type, &amp;mtd-&gt;type);
-
-        prcode(fp,
 &quot;}\n&quot;
-            );
+            , &amp;mtd-&gt;type
+            , &amp;mtd-&gt;type
+            , &amp;mtd-&gt;type, &amp;mtd-&gt;type);
     }
 
     if (!noRelease(mtd))
@@ -3343,14 +3061,34 @@ static void generateMappedTypeCpp(mappedTypeDef *mtd, sipSpec *pt, FILE *fp)
 
     generateCppCodeBlock(mtd-&gt;convfromcode,fp);
 
+    if (pluginPyQt4(pt))
+    {
+        type_prefix = &quot;pyqt4&quot;;
+        embedded = TRUE;
+    }
+    else
+    {
+        type_prefix = &quot;sip&quot;;
+        embedded = FALSE;
+    }
+
     prcode(fp,
 &quot;}\n&quot;
 &quot;\n&quot;
 &quot;\n&quot;
-&quot;sipMappedType sipMappedTypeDef_%T = {\n&quot;
-&quot;    \&quot;%B\&quot;,\n&quot;
-        , &amp;mtd-&gt;type
-        , &amp;mtd-&gt;type);
+&quot;%sMappedTypeDef %sMappedTypeDef_%T = {\n&quot;
+&quot;%s&quot;
+&quot;    {\n&quot;
+&quot;        0,\n&quot;
+&quot;        0,\n&quot;
+&quot;        0,\n&quot;
+&quot;        SIP_TYPE_MAPPED,\n&quot;
+&quot;        %n,\n&quot;
+&quot;        {0}\n&quot;
+&quot;    },\n&quot;
+        , type_prefix, type_prefix, &amp;mtd-&gt;type
+        , (embedded ? &quot;{\n&quot; : &quot;&quot;)
+        , mtd-&gt;cname);
 
     if (noRelease(mtd))
         prcode(fp,
@@ -3362,21 +3100,27 @@ static void generateMappedTypeCpp(mappedTypeDef *mtd, sipSpec *pt, FILE *fp)
             , &amp;mtd-&gt;type);
 
     prcode(fp,
-&quot;    forceConvertTo_%T,\n&quot;
 &quot;    convertTo_%T,\n&quot;
-&quot;    convertFrom_%T,\n&quot;
-        , &amp;mtd-&gt;type
+&quot;    convertFrom_%T\n&quot;
         , &amp;mtd-&gt;type
         , &amp;mtd-&gt;type);
 
-    if (optAssignmentHelpers(pt) &amp;&amp; !noRelease(mtd))
+    if (embedded)
         prcode(fp,
+&quot;},\n&quot;
+            );
+
+    if (pluginPyQt4(pt))
+    {
+        if (!noRelease(mtd))
+            prcode(fp,
 &quot;    assign_%T\n&quot;
-            , &amp;mtd-&gt;type);
-    else
-        prcode(fp,
+                , &amp;mtd-&gt;type);
+        else
+            prcode(fp,
 &quot;    0\n&quot;
-            );
+                );
+    }
 
     prcode(fp,
 &quot;};\n&quot;
@@ -3389,7 +3133,6 @@ static void generateMappedTypeCpp(mappedTypeDef *mtd, sipSpec *pt, FILE *fp)
  */
 static void generateClassCpp(classDef *cd, sipSpec *pt, FILE *fp)
 {
-    varDef *vd;
     moduleDef *mod = cd-&gt;iff-&gt;module;
 
     /* Generate any local class code. */
@@ -3400,31 +3143,6 @@ static void generateClassCpp(classDef *cd, sipSpec *pt, FILE *fp)
 
     generateAccessFunctions(pt, mod, cd, fp);
 
-    /* Generate the variable handlers. */
-    if (hasVarHandlers(cd))
-    {
-        for (vd = pt-&gt;vars; vd != NULL; vd = vd-&gt;next)
-            if (vd-&gt;ecd == cd &amp;&amp; needsHandler(vd))
-                generateVariableHandler(cd, vd, fp);
-
-        /* Generate the variable table. */
-        prcode(fp,
-&quot;\n&quot;
-&quot;PyMethodDef variables_%C[] = {\n&quot;
-            ,classFQCName(cd));
-
-        for (vd = pt-&gt;vars; vd != NULL; vd = vd-&gt;next)
-            if (vd-&gt;ecd == cd &amp;&amp; needsHandler(vd))
-                prcode(fp,
-&quot;    {%N, var_%C, %s, NULL},\n&quot;
-                    ,vd-&gt;pyname,vd-&gt;fqcname,(isStaticVar(vd) ? &quot;METH_STATIC&quot; : &quot;0&quot;));
-
-        prcode(fp,
-&quot;    {0, 0, 0, 0}\n&quot;
-&quot;};\n&quot;
-            );
-    }
-
     if (cd-&gt;iff-&gt;type != namespace_iface)
         generateConvertToDefinitions(NULL,cd,fp);
 
@@ -3455,7 +3173,7 @@ static sortedMethTab *createFunctionTable(classDef *cd,int *nrp)
 
     /* Create the table of methods. */
 
-    mtab = sipMalloc(sizeof (sortedMethTab) * nr);
+    mtab = sipCalloc(nr, sizeof (sortedMethTab));
 
     /* Initialise the table. */
 
@@ -3528,7 +3246,7 @@ static sortedMethTab *createMethodTable(classDef *cd, int *nrp)
 
     /* Create the table of methods. */
 
-    mtab = sipMalloc(sizeof (sortedMethTab) * nr);
+    mtab = sipCalloc(nr, sizeof (sortedMethTab));
 
     /* Initialise the table. */
 
@@ -3724,87 +3442,25 @@ static void generateConvertToDefinitions(mappedTypeDef *mtd,classDef *cd,
 &quot;}\n&quot;
             );
     }
-
-    prcode(fp,
-&quot;\n&quot;
-&quot;\n&quot;
-        );
-
-    if (!generating_c)
-        prcode(fp,
-&quot;extern \&quot;C\&quot; {static void *forceConvertTo_%T(PyObject *, int *);}\n&quot;
-            , &amp;type);
-
-    prcode(fp,
-&quot;static void *forceConvertTo_%T(PyObject *valobj,int *iserrp)\n&quot;
-&quot;{\n&quot;
-&quot;    if (*iserrp || valobj == NULL)\n&quot;
-&quot;        return NULL;\n&quot;
-&quot;\n&quot;
-        ,&amp;type);
-
-    if (convtocode != NULL)
-        prcode(fp,
-&quot;    if (convertTo_%T(valobj,NULL,NULL,NULL))\n&quot;
-&quot;    {\n&quot;
-&quot;        void *val;\n&quot;
-&quot;\n&quot;
-&quot;        /*\n&quot;
-&quot;         * Note that we throw away the flag that says if the value\n&quot;
-&quot;         * has just been created on the heap or not.\n&quot;
-&quot;         */\n&quot;
-&quot;        convertTo_%T(valobj,&amp;val,iserrp,NULL);\n&quot;
-&quot;\n&quot;
-&quot;        return val;\n&quot;
-&quot;    }\n&quot;
-            ,&amp;type
-            ,&amp;type);
-    else
-        prcode(fp,
-&quot;    if (valobj == Py_None || sipIsSubClassInstance(valobj,sipClass_%T))\n&quot;
-&quot;        return sipConvertToCpp(valobj,sipClass_%T,iserrp);\n&quot;
-            ,&amp;type
-            ,&amp;type);
-
-    if (cd != NULL)
-        prcode(fp,
-&quot;\n&quot;
-&quot;    sipBadClass(%N);\n&quot;
-            , iff-&gt;name);
-    else
-        prcode(fp,
-&quot;\n&quot;
-&quot;    sipBadClass(\&quot;%B\&quot;);\n&quot;
-            , &amp;mtd-&gt;type);
-
-    prcode(fp,
-&quot;\n&quot;
-&quot;    *iserrp = 1;\n&quot;
-&quot;\n&quot;
-&quot;    return NULL;\n&quot;
-&quot;}\n&quot;
-        );
 }
 
 
 /*
- * Generate a variable handler.
+ * Generate a variable getter.
  */
-static void generateVariableHandler(classDef *context, varDef *vd, FILE *fp)
+static void generateVariableGetter(classDef *context, varDef *vd, FILE *fp)
 {
     argType atype = vd-&gt;type.atype;
-    const char *first_arg;
-    int no_setter;
-
-    no_setter = (vd-&gt;type.nrderefs == 0 &amp;&amp; isConstArg(&amp;vd-&gt;type));
+    const char *first_arg, *last_arg;
+    int needsNew;
 
     if (generating_c || !isStaticVar(vd))
         first_arg = &quot;sipSelf&quot;;
-    else if (usedInCode(vd-&gt;getcode, &quot;sipPyType&quot;) || usedInCode(vd-&gt;setcode, &quot;sipPyType&quot;))
-        first_arg = &quot;sipPyType&quot;;
     else
         first_arg = &quot;&quot;;
 
+    last_arg = (generating_c || usedInCode(vd-&gt;getcode, &quot;sipPyType&quot;)) ? &quot;sipPyType&quot; : &quot;&quot;;
+
     prcode(fp,
 &quot;\n&quot;
 &quot;\n&quot;
@@ -3812,15 +3468,21 @@ static void generateVariableHandler(classDef *context, varDef *vd, FILE *fp)
 
     if (!generating_c)
         prcode(fp,
-&quot;extern \&quot;C\&quot; {static PyObject *var_%C(PyObject *, PyObject *);}\n&quot;
+&quot;extern \&quot;C\&quot; {static PyObject *varget_%C(void *, PyObject *);}\n&quot;
             , vd-&gt;fqcname);
 
     prcode(fp,
-&quot;static PyObject *var_%C(PyObject *%s,PyObject *sipPy)\n&quot;
+&quot;static PyObject *varget_%C(void *%s, PyObject *%s)\n&quot;
 &quot;{\n&quot;
-        , vd-&gt;fqcname, first_arg);
+        , vd-&gt;fqcname, first_arg, last_arg);
 
-    if (vd-&gt;getcode == NULL || (vd-&gt;setcode == NULL &amp;&amp; !no_setter))
+    if (vd-&gt;getcode != NULL)
+    {
+        prcode(fp,
+&quot;    PyObject *sipPy;\n&quot;
+            );
+    }
+    else
     {
         prcode(fp,
 &quot;    &quot;);
@@ -3835,328 +3497,368 @@ static void generateVariableHandler(classDef *context, varDef *vd, FILE *fp)
     {
         if (generating_c)
             prcode(fp,
-&quot;    %S *sipCpp = (%S *)sipGetCppPtr((sipWrapper *)sipSelf,sipClass_%C);\n&quot;
-                ,classFQCName(vd-&gt;ecd),classFQCName(vd-&gt;ecd),classFQCName(vd-&gt;ecd));
+&quot;    %S *sipCpp = (%S *)sipSelf;\n&quot;
+                , classFQCName(vd-&gt;ecd), classFQCName(vd-&gt;ecd));
         else
             prcode(fp,
-&quot;    %S *sipCpp = reinterpret_cast&lt;%S *&gt;(sipGetCppPtr((sipWrapper *)sipSelf,sipClass_%C));\n&quot;
-                ,classFQCName(vd-&gt;ecd),classFQCName(vd-&gt;ecd),classFQCName(vd-&gt;ecd));
+&quot;    %S *sipCpp = reinterpret_cast&lt;%S *&gt;(sipSelf);\n&quot;
+                , classFQCName(vd-&gt;ecd), classFQCName(vd-&gt;ecd));
 
         prcode(fp,
 &quot;\n&quot;
-&quot;    if (!sipCpp)\n&quot;
-&quot;        return NULL;\n&quot;
             );
     }
 
-    prcode(fp,
-&quot;\n&quot;
-&quot;    if (sipPy == NULL)\n&quot;
-&quot;    {\n&quot;
-        );
-
-    /* Generate the get handler part. */
-
+    /* Handle any handwritten getter. */
     if (vd-&gt;getcode != NULL)
     {
         generateCppCodeBlock(vd-&gt;getcode, fp);
 
         prcode(fp,
 &quot;\n&quot;
-&quot;        return sipPy;\n&quot;
+&quot;    return sipPy;\n&quot;
+&quot;}\n&quot;
             );
+
+        return;
     }
-    else
-    {
-        int pyobj = FALSE, needsNew;
 
-        needsNew = ((atype == class_type || atype == mapped_type) &amp;&amp; vd-&gt;type.nrderefs == 0);
+    needsNew = ((atype == class_type || atype == mapped_type) &amp;&amp; vd-&gt;type.nrderefs == 0);
 
-        if (needsNew)
-        {
-            if (generating_c)
-                prcode(fp,
-&quot;        *sipVal = &quot;);
-            else
-                prcode(fp,
-&quot;        sipVal = new %b(&quot;, &amp;vd-&gt;type);
-        }
+    if (needsNew)
+    {
+        if (generating_c)
+            prcode(fp,
+&quot;    *sipVal = &quot;);
         else
             prcode(fp,
-&quot;        sipVal = &quot;);
+&quot;    sipVal = new %b(&quot;, &amp;vd-&gt;type);
+    }
+    else
+        prcode(fp,
+&quot;    sipVal = &quot;);
 
-        generateVarMember(vd, fp);
+    generateVarMember(vd, fp);
 
-        prcode(fp, &quot;%s;\n&quot;
+    prcode(fp, &quot;%s;\n&quot;
 &quot;\n&quot;
-            , ((needsNew &amp;&amp; !generating_c) ? &quot;)&quot; : &quot;&quot;));
+        , ((needsNew &amp;&amp; !generating_c) ? &quot;)&quot; : &quot;&quot;));
 
-        switch (atype)
-        {
-        case mapped_type:
-            prcode(fp,
-&quot;        sipPy = sipConvertFromMappedType(sipVal,sipMappedType_%T,NULL);\n&quot;
-                ,&amp;vd-&gt;type);
+    switch (atype)
+    {
+    case mapped_type:
+        prcode(fp,
+&quot;    return sipConvertFromType(sipVal, sipType_%T, NULL);\n&quot;
+            , &amp;vd-&gt;type);
 
-            break;
+        break;
 
-        case class_type:
-            generateVarClassConversion(vd, needsNew, fp);
-            break;
+    case class_type:
+        {
+            classDef *cd = vd-&gt;type.u.cd;
 
-        case bool_type:
-        case cbool_type:
             prcode(fp,
-&quot;        sipPy = PyBool_FromLong(sipVal);\n&quot;
-                );
-
-            break;
+&quot;    return sipConvertFrom%sType(&quot;, (needsNew ? &quot;New&quot; : &quot;&quot;));
 
-        case sstring_type:
-        case ustring_type:
-        case string_type:
-            if (vd-&gt;type.nrderefs == 0)
-                prcode(fp,
-&quot;        sipPy = PyString_FromStringAndSize(%s&amp;sipVal,1);\n&quot;
-                    ,(atype != string_type) ? &quot;(char *)&quot; : &quot;&quot;);
+            if (isConstArg(&amp;vd-&gt;type))
+                prcode(fp, &quot;const_cast&lt;%b *&gt;(sipVal)&quot;, &amp;vd-&gt;type);
             else
-                prcode(fp,
-&quot;        sipPy = PyString_FromString(%ssipVal);\n&quot;
-                    ,(atype != string_type) ? &quot;(char *)&quot; : &quot;&quot;);
+                prcode(fp, &quot;sipVal&quot;);
 
-            break;
+            prcode(fp, &quot;,sipType_%C, NULL);\n&quot;
+                , classFQCName(cd));
+        }
 
-        case wstring_type:
-            if (vd-&gt;type.nrderefs == 0)
-                prcode(fp,
-&quot;        sipPy = PyUnicode_FromWideChar(&amp;sipVal,1);\n&quot;
-                    );
-            else
-                prcode(fp,
-&quot;        sipPy = PyUnicode_FromWideChar(sipVal,(SIP_SSIZE_T)wcslen(sipVal));\n&quot;
-                    );
+        break;
 
-            break;
+    case bool_type:
+    case cbool_type:
+        prcode(fp,
+&quot;    return PyBool_FromLong(sipVal);\n&quot;
+            );
 
-        case float_type:
-        case cfloat_type:
-            prcode(fp,
-&quot;        sipPy = PyFloat_FromDouble((double)sipVal);\n&quot;
-                );
-            break;
+        break;
 
-        case double_type:
-        case cdouble_type:
+    case sstring_type:
+    case ustring_type:
+    case string_type:
+        if (vd-&gt;type.nrderefs == 0)
             prcode(fp,
-&quot;        sipPy = PyFloat_FromDouble(sipVal);\n&quot;
-                );
-            break;
-
-        case enum_type:
-            if (vd-&gt;type.u.ed-&gt;fqcname != NULL)
-            {
-                prcode(fp,
-&quot;        sipPy = sipConvertFromNamedEnum(sipVal,sipEnum_%C);\n&quot;
-                    ,vd-&gt;type.u.ed-&gt;fqcname);
-
-                break;
-            }
+&quot;    return PyString_FromStringAndSize(%s&amp;sipVal, 1);\n&quot;
+                , (atype != string_type) ? &quot;(char *)&quot; : &quot;&quot;);
+            else
+            prcode(fp,
+&quot;    return PyString_FromString(%ssipVal);\n&quot;
+                ,(atype != string_type) ? &quot;(char *)&quot; : &quot;&quot;);
 
-            /* Drop through. */
+        break;
 
-        case short_type:
-        case cint_type:
-        case int_type:
+    case wstring_type:
+        if (vd-&gt;type.nrderefs == 0)
             prcode(fp,
-&quot;        sipPy = PyInt_FromLong(sipVal);\n&quot;
+&quot;    return PyUnicode_FromWideChar(&amp;sipVal, 1);\n&quot;
                 );
-            break;
-
-        case long_type:
+        else
             prcode(fp,
-&quot;        sipPy = PyLong_FromLong(sipVal);\n&quot;
+&quot;    return PyUnicode_FromWideChar(sipVal, (SIP_SSIZE_T)wcslen(sipVal));\n&quot;
                 );
-            break;
 
-        case ushort_type:
-        case uint_type:
-        case ulong_type:
-            prcode(fp,
-&quot;        sipPy = PyLong_FromUnsignedLong(sipVal);\n&quot;
-                );
-            break;
+        break;
 
-        case longlong_type:
-            prcode(fp,
-&quot;        sipPy = PyLong_FromLongLong(sipVal);\n&quot;
+    case float_type:
+    case cfloat_type:
+        prcode(fp,
+&quot;    return PyFloat_FromDouble((double)sipVal);\n&quot;
                 );
-            break;
+        break;
 
-        case ulonglong_type:
-            prcode(fp,
-&quot;        sipPy = PyLong_FromUnsignedLongLong(sipVal);\n&quot;
-                );
-            break;
+    case double_type:
+    case cdouble_type:
+        prcode(fp,
+&quot;    return PyFloat_FromDouble(sipVal);\n&quot;
+            );
+        break;
 
-        case struct_type:
-        case void_type:
+    case enum_type:
+        if (vd-&gt;type.u.ed-&gt;fqcname != NULL)
+        {
             prcode(fp,
-&quot;        sipPy = sipConvertFrom%sVoidPtr(sipVal);\n&quot;
-                , (isConstArg(&amp;vd-&gt;type) ? &quot;Const&quot; : &quot;&quot;));
-            break;
+&quot;    return sipConvertFromEnum(sipVal, sipType_%C);\n&quot;
+                , vd-&gt;type.u.ed-&gt;fqcname);
 
-        case pyobject_type:
-        case pytuple_type:
-        case pylist_type:
-        case pydict_type:
-        case pycallable_type:
-        case pyslice_type:
-        case pytype_type:
-            prcode(fp,
-&quot;        Py_XINCREF(sipVal);\n&quot;
-                );
-            pyobj = TRUE;
             break;
         }
 
+        /* Drop through. */
+
+    case short_type:
+    case cint_type:
+    case int_type:
         prcode(fp,
-&quot;\n&quot;
-&quot;        return %s;\n&quot;
-            ,(pyobj ? &quot;sipVal&quot; : &quot;sipPy&quot;));
+&quot;    return PyInt_FromLong(sipVal);\n&quot;
+            );
+        break;
+
+    case long_type:
+        prcode(fp,
+&quot;    return PyLong_FromLong(sipVal);\n&quot;
+            );
+        break;
+
+    case ushort_type:
+    case uint_type:
+    case ulong_type:
+        prcode(fp,
+&quot;    return PyLong_FromUnsignedLong(sipVal);\n&quot;
+            );
+        break;
+
+    case longlong_type:
+        prcode(fp,
+&quot;    return PyLong_FromLongLong(sipVal);\n&quot;
+            );
+        break;
+
+    case ulonglong_type:
+        prcode(fp,
+&quot;    return PyLong_FromUnsignedLongLong(sipVal);\n&quot;
+            );
+        break;
+
+    case struct_type:
+    case void_type:
+        prcode(fp,
+&quot;    return sipConvertFrom%sVoidPtr(sipVal);\n&quot;
+            , (isConstArg(&amp;vd-&gt;type) ? &quot;Const&quot; : &quot;&quot;));
+        break;
+
+    case pyobject_type:
+    case pytuple_type:
+    case pylist_type:
+    case pydict_type:
+    case pycallable_type:
+    case pyslice_type:
+    case pytype_type:
+        prcode(fp,
+&quot;    Py_XINCREF(sipVal);\n&quot;
+&quot;    return sipVal;\n&quot;
+            );
+        break;
     }
 
     prcode(fp,
-&quot;    }\n&quot;
+&quot;}\n&quot;
+        );
+}
+
+
+/*
+ * Generate a variable setter.
+ */
+static void generateVariableSetter(classDef *context, varDef *vd, FILE *fp)
+{
+    argType atype = vd-&gt;type.atype;
+    const char *first_arg;
+    char *deref;
+    int might_be_temp;
+
+    if (generating_c || !isStaticVar(vd))
+        first_arg = &quot;sipSelf&quot;;
+    else
+        first_arg = &quot;&quot;;
+
+    prcode(fp,
+&quot;\n&quot;
 &quot;\n&quot;
         );
 
-    /* Generate the set handler part. */
+    if (!generating_c)
+        prcode(fp,
+&quot;extern \&quot;C\&quot; {static int varset_%C(void *, PyObject *);}\n&quot;
+            , vd-&gt;fqcname);
 
-    if (vd-&gt;setcode != NULL)
+    prcode(fp,
+&quot;static int varset_%C(void *%s, PyObject *sipPy)\n&quot;
+&quot;{\n&quot;
+        , vd-&gt;fqcname, first_arg);
+
+    if (vd-&gt;setcode == NULL)
     {
         prcode(fp,
-&quot;    {\n&quot;
-&quot;       int sipErr = 0;\n&quot;
-&quot;\n&quot;
+&quot;    &quot;);
+
+        generateNamedValueType(context, &amp;vd-&gt;type, &quot;sipVal&quot;, fp);
+
+        prcode(fp, &quot;;\n&quot;
             );
+    }
 
-        generateCppCodeBlock(vd-&gt;setcode, fp);
+    if (!isStaticVar(vd))
+    {
+        if (generating_c)
+            prcode(fp,
+&quot;    %S *sipCpp = (%S *)sipSelf;\n&quot;
+                , classFQCName(vd-&gt;ecd), classFQCName(vd-&gt;ecd));
+        else
+            prcode(fp,
+&quot;    %S *sipCpp = reinterpret_cast&lt;%S *&gt;(sipSelf);\n&quot;
+                , classFQCName(vd-&gt;ecd), classFQCName(vd-&gt;ecd));
 
         prcode(fp,
 &quot;\n&quot;
-&quot;        if (sipErr)\n&quot;
-&quot;            return NULL;\n&quot;
-&quot;    }\n&quot;
             );
     }
-    else if (no_setter)
+
+    /* Handle any handwritten setter. */
+    if (vd-&gt;setcode != NULL)
     {
         prcode(fp,
-&quot;    sipBadSetType(%N,%N);\n&quot;
-&quot;    return NULL;\n&quot;
+&quot;   int sipErr = 0;\n&quot;
+&quot;\n&quot;
+            );
+
+        generateCppCodeBlock(vd-&gt;setcode, fp);
+
+        prcode(fp,
+&quot;\n&quot;
+&quot;    return (sipErr ? -1 : 0);\n&quot;
 &quot;}\n&quot;
-            , vd-&gt;ecd-&gt;iff-&gt;name, vd-&gt;pyname);
+            );
 
         return;
     }
-    else
-    {
-        char *deref;
-        int might_be_temp;
 
-        if (vd-&gt;type.nrderefs == 0 &amp;&amp; (atype == mapped_type || (atype == class_type &amp;&amp; vd-&gt;type.u.cd-&gt;convtocode != NULL)))
-            prcode(fp,
+    if (vd-&gt;type.nrderefs == 0 &amp;&amp; (atype == mapped_type || (atype == class_type &amp;&amp; vd-&gt;type.u.cd-&gt;convtocode != NULL)))
+        prcode(fp,
 &quot;    int sipValState;\n&quot;
-                );
+            );
 
-        if (atype == class_type || atype == mapped_type)
-            prcode(fp,
+    if (atype == class_type || atype == mapped_type)
+        prcode(fp,
 &quot;    int sipIsErr = 0;\n&quot;
 &quot;\n&quot;
-                );
+            );
 
-        might_be_temp = generateObjToCppConversion(&amp;vd-&gt;type,fp);
+    might_be_temp = generateObjToCppConversion(&amp;vd-&gt;type, fp);
 
-        deref = &quot;&quot;;
+    deref = &quot;&quot;;
 
-        if (atype == class_type || atype == mapped_type)
-        {
-            if (vd-&gt;type.nrderefs == 0)
-                deref = &quot;*&quot;;
+    if (atype == class_type || atype == mapped_type)
+    {
+        if (vd-&gt;type.nrderefs == 0)
+            deref = &quot;*&quot;;
 
-            prcode(fp,
+        prcode(fp,
 &quot;\n&quot;
 &quot;    if (sipIsErr)\n&quot;
-&quot;        return NULL;\n&quot;
+&quot;        return -1;\n&quot;
 &quot;\n&quot;
-                );
-        }
-        else
+            );
+    }
+    else
+    {
+        if ((atype == sstring_type || atype == ustring_type || atype == string_type || atype == wstring_type) &amp;&amp; vd-&gt;type.nrderefs != 0)
         {
-            if ((atype == sstring_type || atype == ustring_type || atype == string_type || atype == wstring_type) &amp;&amp; vd-&gt;type.nrderefs != 0)
-            {
-                prcode(fp,
+            prcode(fp,
 &quot;\n&quot;
 &quot;    if (sipVal == NULL)\n&quot;
-                    );
-            }
-            else
-                prcode(fp,
+                );
+        }
+        else
+            prcode(fp,
 &quot;\n&quot;
 &quot;    if (PyErr_Occurred() != NULL)\n&quot;
-                    );
+                );
 
-            prcode(fp,
+        prcode(fp,
 &quot;    {\n&quot;
-&quot;        sipBadSetType(%N,%N);\n&quot;
-&quot;        return NULL;\n&quot;
+&quot;        sipBadSetType(%N, %N);\n&quot;
+&quot;        return -1;\n&quot;
 &quot;    }\n&quot;
 &quot;\n&quot;
-                ,vd-&gt;ecd-&gt;iff-&gt;name,vd-&gt;pyname);
-        }
+            , vd-&gt;ecd-&gt;pyname, vd-&gt;pyname);
+    }
 
-        if (atype == pyobject_type || atype == pytuple_type ||
-            atype == pylist_type || atype == pydict_type ||
-            atype == pycallable_type || atype == pyslice_type ||
-            atype == pytype_type)
-        {
-            prcode(fp,
+    if (atype == pyobject_type || atype == pytuple_type ||
+        atype == pylist_type || atype == pydict_type ||
+        atype == pycallable_type || atype == pyslice_type ||
+        atype == pytype_type)
+    {
+        prcode(fp,
 &quot;    Py_XDECREF(&quot;);
 
-            generateVarMember(vd, fp);
+        generateVarMember(vd, fp);
 
-            prcode(fp, &quot;);\n&quot;
+        prcode(fp, &quot;);\n&quot;
 &quot;    Py_INCREF(sipVal);\n&quot;
 &quot;\n&quot;
-                );
-        }
+            );
+    }
 
-        prcode(fp,
+    prcode(fp,
 &quot;    &quot;);
 
-        generateVarMember(vd, fp);
+    generateVarMember(vd, fp);
 
-        prcode(fp, &quot; = %ssipVal;\n&quot;
-            , deref);
+    prcode(fp, &quot; = %ssipVal;\n&quot;
+        , deref);
 
-        /* Note that wchar_t * leaks here. */
+    /* Note that wchar_t * leaks here. */
 
-        if (might_be_temp)
-            prcode(fp,
+    if (might_be_temp)
+        prcode(fp,
 &quot;\n&quot;
-&quot;    sipReleaseInstance(sipVal,sipClass_%C,sipValState);\n&quot;
-                , classFQCName(vd-&gt;type.u.cd));
-        else if (vd-&gt;type.atype == mapped_type &amp;&amp; vd-&gt;type.nrderefs == 0 &amp;&amp; !noRelease(vd-&gt;type.u.mtd))
-            prcode(fp,
+&quot;    sipReleaseType(sipVal, sipType_%C, sipValState);\n&quot;
+            , classFQCName(vd-&gt;type.u.cd));
+    else if (vd-&gt;type.atype == mapped_type &amp;&amp; vd-&gt;type.nrderefs == 0 &amp;&amp; !noRelease(vd-&gt;type.u.mtd))
+        prcode(fp,
 &quot;\n&quot;
-&quot;    sipReleaseMappedType(sipVal,sipMappedType_%T,sipValState);\n&quot;
-                , &amp;vd-&gt;type);
-    }
+&quot;    sipReleaseType(sipVal, sipType_%T, sipValState);\n&quot;
+            , &amp;vd-&gt;type);
 
     prcode(fp,
 &quot;\n&quot;
-&quot;    Py_INCREF(Py_None);\n&quot;
-&quot;    return Py_None;\n&quot;
+&quot;    return 0;\n&quot;
 &quot;}\n&quot;
         );
 }
@@ -4177,26 +3879,6 @@ static void generateVarMember(varDef *vd, FILE *fp)
 
 
 /*
- * Generate an variable class conversion fragment.
- */
-static void generateVarClassConversion(varDef *vd, int is_new, FILE *fp)
-{
-    classDef *cd = vd-&gt;type.u.cd;
-
-    prcode(fp,
-&quot;        sipPy = sipConvertFrom%sInstance(&quot;, (is_new ? &quot;New&quot; : &quot;&quot;));
-
-    if (isConstArg(&amp;vd-&gt;type))
-        prcode(fp,&quot;const_cast&lt;%b *&gt;(sipVal)&quot;,&amp;vd-&gt;type);
-    else
-        prcode(fp,&quot;sipVal&quot;);
-
-    prcode(fp,&quot;,sipClass_%C,NULL);\n&quot;
-        ,classFQCName(cd));
-}
-
-
-/*
  * Generate the declaration of a variable that is initialised from a Python
  * object.  Return TRUE if the value might be a temporary on the heap.
  */
@@ -4227,7 +3909,7 @@ static int generateObjToCppConversion(argDef *ad,FILE *fp)
 
             /* Note that we don't support /Transfer/ but could do. */
 
-            prcode(fp, &quot;sipForceConvertToMappedType(sipPy,sipMappedType_%T,NULL,%s,%s,&amp;sipIsErr)&quot;, ad, (ad-&gt;nrderefs ? &quot;0&quot; : &quot;SIP_NOT_NONE&quot;), (ad-&gt;nrderefs ? &quot;NULL&quot; : &quot;&amp;sipValState&quot;));
+            prcode(fp, &quot;sipForceConvertToType(sipPy,sipType_%T,NULL,%s,%s,&amp;sipIsErr)&quot;, ad, (ad-&gt;nrderefs ? &quot;0&quot; : &quot;SIP_NOT_NONE&quot;), (ad-&gt;nrderefs ? &quot;NULL&quot; : &quot;&amp;sipValState&quot;));
 
             prcode(fp, &quot;%s;\n&quot;
                 , tail);
@@ -4258,7 +3940,7 @@ static int generateObjToCppConversion(argDef *ad,FILE *fp)
              * all types).
              */
 
-            prcode(fp, &quot;sipForceConvertToInstance(sipPy,sipClass_%C,NULL,%s,%s,&amp;sipIsErr)&quot;, classFQCName(ad-&gt;u.cd), (ad-&gt;nrderefs ? &quot;0&quot; : &quot;SIP_NOT_NONE&quot;), (might_be_temp ? &quot;&amp;sipValState&quot; : &quot;NULL&quot;));
+            prcode(fp, &quot;sipForceConvertToType(sipPy,sipType_%C,NULL,%s,%s,&amp;sipIsErr)&quot;, classFQCName(ad-&gt;u.cd), (ad-&gt;nrderefs ? &quot;0&quot; : &quot;SIP_NOT_NONE&quot;), (might_be_temp ? &quot;&amp;sipValState&quot; : &quot;NULL&quot;));
 
             prcode(fp, &quot;%s;\n&quot;
                 , tail);
@@ -4519,7 +4201,7 @@ static void generateSlot(moduleDef *mod, classDef *cd, enumDef *ed,
     else if (cd != NULL)
     {
         prefix = &quot;Class&quot;;
-        pyname = cd-&gt;iff-&gt;name;
+        pyname = cd-&gt;pyname;
         fqcname = classFQCName(cd);
         overs = cd-&gt;overs;
     }
@@ -4613,7 +4295,7 @@ static void generateSlot(moduleDef *mod, classDef *cd, enumDef *ed,
     {
         if (cd != NULL)
             prcode(fp,
-&quot;    %S *sipCpp = reinterpret_cast&lt;%S *&gt;(sipGetCppPtr((sipWrapper *)sipSelf,sipClass_%C));\n&quot;
+&quot;    %S *sipCpp = reinterpret_cast&lt;%S *&gt;(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_%C));\n&quot;
 &quot;\n&quot;
 &quot;    if (!sipCpp)\n&quot;
 &quot;        return %s;\n&quot;
@@ -4633,16 +4315,6 @@ static void generateSlot(moduleDef *mod, classDef *cd, enumDef *ed,
             );
 
     for (od = overs; od != NULL; od = od-&gt;next)
-        if (od-&gt;common == md &amp;&amp; isAbstract(od))
-        {
-            prcode(fp,
-&quot;    bool sipSelfWasArg = !sipSelf;\n&quot;
-                );
-
-            break;
-        }
-
-    for (od = overs; od != NULL; od = od-&gt;next)
         if (od-&gt;common == md)
             generateFunctionBody(od, cd, cd, (ed == NULL &amp;&amp; !dontDerefSelf(od)), fp);
 
@@ -4687,8 +4359,8 @@ static void generateSlot(moduleDef *mod, classDef *cd, enumDef *ed,
                 else
                     prcode(fp,
 &quot;\n&quot;
-&quot;    return sipPySlotExtend(&amp;sipModuleAPI_%s,%s,sip%s_%C,sipSelf,sipArg);\n&quot;
-                        , mod-&gt;name, slotName(md-&gt;slot), prefix, fqcname);
+&quot;    return sipPySlotExtend(&amp;sipModuleAPI_%s,%s,sipType_%C,sipSelf,sipArg);\n&quot;
+                        , mod-&gt;name, slotName(md-&gt;slot), fqcname);
             }
             else if (isInplaceNumberSlot(md))
                 prcode(fp,
@@ -4757,11 +4429,11 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd,
 
         if (!generating_c)
             prcode(fp,
-&quot;extern \&quot;C\&quot; {static void *cast_%C(void *, sipWrapperType *);}\n&quot;
+&quot;extern \&quot;C\&quot; {static void *cast_%C(void *, const sipTypeDef *);}\n&quot;
                 , classFQCName(cd));
 
         prcode(fp,
-&quot;static void *cast_%C(void *ptr,sipWrapperType *targetClass)\n&quot;
+&quot;static void *cast_%C(void *ptr,const sipTypeDef *targetType)\n&quot;
 &quot;{\n&quot;
             ,classFQCName(cd));
 
@@ -4772,7 +4444,7 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd,
                 );
 
         prcode(fp,
-&quot;    if (targetClass == sipClass_%C)\n&quot;
+&quot;    if (targetType == sipType_%C)\n&quot;
 &quot;        return ptr;\n&quot;
             ,classFQCName(cd));
 
@@ -4782,7 +4454,7 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd,
 
             prcode(fp,
 &quot;\n&quot;
-&quot;    if ((res = sipCast_%C((%S *)(%S *)ptr,targetClass)) != NULL)\n&quot;
+&quot;    if ((res = ((const sipClassTypeDef *)sipType_%C)-&gt;ctd_cast((%S *)(%S *)ptr,targetType)) != NULL)\n&quot;
 &quot;        return res;\n&quot;
                 ,sname,sname,classFQCName(cd));
         }
@@ -5130,35 +4802,19 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd,
     }
 
     /* The assignment helper. */
-    if (optAssignmentHelpers(pt) &amp;&amp; (generating_c || canAssign(cd)))
+    if (pluginPyQt4(pt) &amp;&amp; assignmentHelper(cd))
     {
         prcode(fp,
 &quot;\n&quot;
 &quot;\n&quot;
-            );
-
-        if (!generating_c)
-            prcode(fp,
 &quot;extern \&quot;C\&quot; {static void assign_%C(void *, const void*);}\n&quot;
-                , classFQCName(cd));
-
-        prcode(fp,
 &quot;static void assign_%C(void *sipDst, const void *sipSrc)\n&quot;
 &quot;{\n&quot;
-            ,classFQCName(cd));
-
-        if (generating_c)
-            prcode(fp,
-&quot;    *(%S *)sipDst = *(const %S *)sipSrc;\n&quot;
-                , classFQCName(cd), classFQCName(cd));
-        else
-            prcode(fp,
 &quot;    *reinterpret_cast&lt;%S *&gt;(sipDst) = *reinterpret_cast&lt;const %S *&gt;(sipSrc);\n&quot;
-                , classFQCName(cd), classFQCName(cd));
-
-        prcode(fp,
 &quot;}\n&quot;
-            );
+            , classFQCName(cd)
+            , classFQCName(cd)
+            , classFQCName(cd), classFQCName(cd));
     }
 
     /* The dealloc function. */
@@ -5171,11 +4827,11 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd,
 
         if (!generating_c)
             prcode(fp,
-&quot;extern \&quot;C\&quot; {static void dealloc_%C(sipWrapper *);}\n&quot;
+&quot;extern \&quot;C\&quot; {static void dealloc_%C(sipSimpleWrapper *);}\n&quot;
                 , classFQCName(cd));
 
         prcode(fp,
-&quot;static void dealloc_%C(sipWrapper *sipSelf)\n&quot;
+&quot;static void dealloc_%C(sipSimpleWrapper *sipSelf)\n&quot;
 &quot;{\n&quot;
             ,classFQCName(cd));
 
@@ -5325,14 +4981,14 @@ static void generateShadowCode(sipSpec *pt, moduleDef *mod, classDef *cd,
     }
 
     /* The meta methods if required. */
-    if (isQObjectSubClass(cd) &amp;&amp; optQ_OBJECT4(pt))
+    if (pluginPyQt4(pt) &amp;&amp; isQObjectSubClass(cd))
     {
-        if (!noQMetaObject(cd))
+        if (!noPyQt4QMetaObject(cd))
             prcode(fp,
 &quot;\n&quot;
 &quot;const QMetaObject *sip%C::metaObject() const\n&quot;
 &quot;{\n&quot;
-&quot;    return sip_%s_qt_metaobject(sipPySelf,sipClass_%C,0);\n&quot;
+&quot;    return sip_%s_qt_metaobject(sipPySelf,sipType_%C);\n&quot;
 &quot;}\n&quot;
                 , classFQCName(cd)
                 , mod-&gt;name, classFQCName(cd));
@@ -5341,28 +4997,20 @@ static void generateShadowCode(sipSpec *pt, moduleDef *mod, classDef *cd,
 &quot;\n&quot;
 &quot;int sip%C::qt_metacall(QMetaObject::Call _c,int _id,void **_a)\n&quot;
 &quot;{\n&quot;
-            , classFQCName(cd));
-
-        if (!noQMetaObject(cd))
-            prcode(fp,
-&quot;    sip%C::metaObject();\n&quot;
-&quot;\n&quot;
-                , classFQCName(cd));
-
-        prcode(fp,
 &quot;    _id = %S::qt_metacall(_c,_id,_a);\n&quot;
 &quot;\n&quot;
 &quot;    if (_id &gt;= 0)\n&quot;
-&quot;        _id = sip_%s_qt_metacall(sipPySelf,sipClass_%C,_c,_id,_a);\n&quot;
+&quot;        _id = sip_%s_qt_metacall(sipPySelf,sipType_%C,_c,_id,_a);\n&quot;
 &quot;\n&quot;
 &quot;    return _id;\n&quot;
 &quot;}\n&quot;
 &quot;\n&quot;
 &quot;void *sip%C::qt_metacast(const char *_clname)\n&quot;
 &quot;{\n&quot;
-&quot;    return (sip_%s_qt_metacast &amp;&amp; sip_%s_qt_metacast(sipPySelf,sipClass_%C,_clname)) ? this : %S::qt_metacast(_clname);\n&quot;
+&quot;    return (sip_%s_qt_metacast &amp;&amp; sip_%s_qt_metacast(sipPySelf,sipType_%C,_clname)) ? this : %S::qt_metacast(_clname);\n&quot;
 &quot;}\n&quot;
             , classFQCName(cd)
+            , classFQCName(cd)
             , mod-&gt;name, classFQCName(cd)
             , classFQCName(cd)
             , mod-&gt;name, mod-&gt;name, classFQCName(cd), classFQCName(cd));
@@ -5396,7 +5044,7 @@ static void generateShadowCode(sipSpec *pt, moduleDef *mod, classDef *cd,
     generateProtectedDefinitions(cd,fp);
 
     /* Generate the emitters if needed. */
-    if (!optNoEmitters(pt))
+    if (pluginPyQt3(pt))
         generateEmitters(cd, fp);
 }
 
@@ -5438,7 +5086,7 @@ static void generateEmitters(classDef *cd, FILE *fp)
 
                     prcode(fp,
 &quot;\n&quot;
-&quot;static sipQtSignal signals_%C[] = {\n&quot;
+&quot;static pyqt3QtSignal signals_%C[] = {\n&quot;
                         ,classFQCName(cd));
 
                     noIntro = FALSE;
@@ -5533,7 +5181,7 @@ static void generateVirtualCatcher(moduleDef *mod, classDef *cd, int virtNr,
     prcode(fp,
 &quot;\n&quot;);
 
-    generateBaseType(cd, &amp;od-&gt;cppsig-&gt;result, fp);
+    generateBaseType(cd, &amp;od-&gt;cppsig-&gt;result, TRUE, fp);
 
     prcode(fp,&quot; sip%C::%O(&quot;,classFQCName(cd),od);
     generateCalledArgs(cd, od-&gt;cppsig, Definition, TRUE, fp);
@@ -5546,7 +5194,7 @@ static void generateVirtualCatcher(moduleDef *mod, classDef *cd, int virtNr,
         prcode(fp,
 &quot;    sipTrace(SIP_TRACE_CATCHERS,\&quot;&quot;);
 
-        generateBaseType(cd, &amp;od-&gt;cppsig-&gt;result, fp);
+        generateBaseType(cd, &amp;od-&gt;cppsig-&gt;result, TRUE, fp);
         prcode(fp,&quot; sip%C::%O(&quot;,classFQCName(cd),od);
         generateCalledArgs(cd, od-&gt;cppsig, Declaration, TRUE, fp);
         prcode(fp,&quot;)%s%X (this=0x%%08x)\\n\&quot;,this);\n&quot;
@@ -5564,7 +5212,7 @@ static void generateVirtualCatcher(moduleDef *mod, classDef *cd, int virtNr,
         prcode(fp,
 &quot;    extern &quot;);
 
-        generateBaseType(cd, &amp;od-&gt;cppsig-&gt;result, fp);
+        generateBaseType(cd, &amp;od-&gt;cppsig-&gt;result, FALSE, fp);
 
         prcode(fp,&quot; sipVH_%s_%d(sip_gilstate_t,PyObject *&quot;,vhd-&gt;module-&gt;name,vhd-&gt;virthandlernr);
     }
@@ -5573,7 +5221,7 @@ static void generateVirtualCatcher(moduleDef *mod, classDef *cd, int virtNr,
         prcode(fp,
 &quot;    typedef &quot;);
 
-        generateBaseType(cd, &amp;od-&gt;cppsig-&gt;result, fp);
+        generateBaseType(cd, &amp;od-&gt;cppsig-&gt;result, FALSE, fp);
 
         prcode(fp,&quot; (*sipVH_%s_%d)(sip_gilstate_t,PyObject *&quot;,vhd-&gt;module-&gt;name,vhd-&gt;virthandlernr);
     }
@@ -5613,7 +5261,7 @@ static void generateVirtualCatcher(moduleDef *mod, classDef *cd, int virtNr,
     prcode(fp,&quot;,sipPySelf,&quot;);
 
     if (isAbstract(od))
-        prcode(fp,&quot;%N&quot;,cd-&gt;iff-&gt;name);
+        prcode(fp, &quot;%N&quot;, cd-&gt;pyname);
     else
         prcode(fp,&quot;NULL&quot;);
 
@@ -5970,17 +5618,17 @@ static void generateEmitter(classDef *cd, visibleList *vl, FILE *fp)
 &quot;    return -1;\n&quot;
 &quot;}\n&quot;
 &quot;\n&quot;
-        , cd-&gt;iff-&gt;name, vl-&gt;m-&gt;pyname);
+        , cd-&gt;pyname, vl-&gt;m-&gt;pyname);
 
     if (!generating_c)
         prcode(fp,
-&quot;extern \&quot;C\&quot; {static int %C_emit_%s(sipWrapper *, PyObject *);}\n&quot;
+&quot;extern \&quot;C\&quot; {static int %C_emit_%s(sipSimpleWrapper *, PyObject *);}\n&quot;
             , classFQCName(cd), pname);
 
     prcode(fp,
-&quot;static int %C_emit_%s(sipWrapper *w,PyObject *sipArgs)\n&quot;
+&quot;static int %C_emit_%s(sipSimpleWrapper *sw,PyObject *sipArgs)\n&quot;
 &quot;{\n&quot;
-&quot;    sip%C *ptr = reinterpret_cast&lt;sip%C *&gt;(sipGetComplexCppPtr(w));\n&quot;
+&quot;    sip%C *ptr = reinterpret_cast&lt;sip%C *&gt;(sipGetComplexCppPtr(sw));\n&quot;
 &quot;\n&quot;
 &quot;    return (ptr ? ptr-&gt;sipEmit_%s(sipArgs) : -1);\n&quot;
 &quot;}\n&quot;
@@ -6032,17 +5680,9 @@ static void generateProtectedDeclarations(classDef *cd,FILE *fp)
             if (isStatic(od))
                 prcode(fp,&quot;static &quot;);
 
-            generateBaseType(cd, &amp;od-&gt;cppsig-&gt;result, fp);
+            generateBaseType(cd, &amp;od-&gt;cppsig-&gt;result, TRUE, fp);
 
-            if (!isStatic(od) &amp;&amp; !isAbstract(od) &amp;&amp; (isVirtual(od) || isVirtualReimp(od)))
-            {
-                prcode(fp, &quot; sipProtectVirt_%s(bool&quot;, od-&gt;cppname);
-
-                if (od-&gt;cppsig-&gt;nrArgs &gt; 0)
-                    prcode(fp, &quot;,&quot;);
-            }
-            else
-                prcode(fp, &quot; sipProtect_%s(&quot;, od-&gt;cppname);
+            prcode(fp, &quot; sipProtect_%s(&quot;, od-&gt;cppname);
 
             generateCalledArgs(cd, od-&gt;cppsig, Declaration, TRUE, fp);
             prcode(fp,&quot;)%s;\n&quot;
@@ -6079,17 +5719,9 @@ static void generateProtectedDefinitions(classDef *cd,FILE *fp)
 &quot;\n&quot;
                 );
 
-            generateBaseType(cd, &amp;od-&gt;cppsig-&gt;result, fp);
-
-            if (!isStatic(od) &amp;&amp; !isAbstract(od) &amp;&amp; (isVirtual(od) || isVirtualReimp(od)))
-            {
-                prcode(fp, &quot; sip%C::sipProtectVirt_%s(bool sipSelfWasArg&quot;, classFQCName(cd), mname);
+            generateBaseType(cd, &amp;od-&gt;cppsig-&gt;result, TRUE, fp);
 
-                if (od-&gt;cppsig-&gt;nrArgs &gt; 0)
-                    prcode(fp, &quot;,&quot;);
-            }
-            else
-                prcode(fp, &quot; sip%C::sipProtect_%s(&quot;, classFQCName(cd), mname);
+            prcode(fp, &quot; sip%C::sipProtect_%s(&quot;, classFQCName(cd), mname);
 
             generateCalledArgs(cd, od-&gt;cppsig, Definition, TRUE, fp);
             prcode(fp,&quot;)%s\n&quot;
@@ -6122,19 +5754,7 @@ static void generateProtectedDefinitions(classDef *cd,FILE *fp)
             }
 
             if (!isAbstract(od))
-            {
-                if (isVirtual(od) || isVirtualReimp(od))
-                {
-                    prcode(fp, &quot;(sipSelfWasArg ? %S::%s(&quot;, classFQCName(vl-&gt;cd), mname);
-
-                    generateProtectedCallArgs(od, fp);
-
-                    prcode(fp, &quot;) : &quot;);
-                    ++parens;
-                }
-                else
-                    prcode(fp, &quot;%S::&quot;, classFQCName(vl-&gt;cd));
-            }
+                prcode(fp, &quot;%S::&quot;, classFQCName(vl-&gt;cd));
 
             prcode(fp,&quot;%s(&quot;,mname);
 
@@ -6218,7 +5838,7 @@ static void generateVirtualHandler(virtHandlerDef *vhd, FILE *fp)
     saved = *vhd-&gt;cppsig;
     fakeProtectedArgs(vhd-&gt;cppsig);
 
-    generateBaseType(NULL, &amp;vhd-&gt;cppsig-&gt;result, fp);
+    generateBaseType(NULL, &amp;vhd-&gt;cppsig-&gt;result, FALSE, fp);
 
     prcode(fp,&quot; sipVH_%s_%d(sip_gilstate_t sipGILState,PyObject *sipMethod&quot;
         , vhd-&gt;module-&gt;name, vhd-&gt;virthandlernr);
@@ -6250,7 +5870,7 @@ static void generateVirtualHandler(virtHandlerDef *vhd, FILE *fp)
         if (res-&gt;atype == wstring_type &amp;&amp; res-&gt;nrderefs == 1)
             prcode(fp, &quot;static &quot;);
 
-        generateBaseType(NULL, &amp;res_noconstref, fp);
+        generateBaseType(NULL, &amp;res_noconstref, FALSE, fp);
 
         prcode(fp,&quot; %ssipRes&quot;,(isref ? &quot;*&quot; : &quot;&quot;));
 
@@ -6341,7 +5961,7 @@ static void generateVirtualHandler(virtHandlerDef *vhd, FILE *fp)
         prcode(fp,
 &quot;    &quot;);
 
-        generateBaseType(NULL, &amp;res_noconstref, fp);
+        generateBaseType(NULL, &amp;res_noconstref, FALSE, fp);
 
         prcode(fp,&quot; *sipResOrig;\n&quot;);
 
@@ -6435,7 +6055,7 @@ static void generateVirtualHandler(virtHandlerDef *vhd, FILE *fp)
                 );
         else if (res-&gt;atype == class_type &amp;&amp; res-&gt;u.cd-&gt;convtocode != NULL)
             prcode(fp,
-&quot;        sipReleaseInstance(sipResOrig,sipClass_%C,sipResState);\n&quot;
+&quot;        sipReleaseType(sipResOrig,sipType_%C,sipResState);\n&quot;
                 , classFQCName(res-&gt;u.cd));
 
         prcode(fp,
@@ -6484,11 +6104,11 @@ static void generateParseResultExtraArgs(argDef *ad, int isres, FILE *fp)
     switch (ad-&gt;atype)
     {
     case mapped_type:
-        prcode(fp, &quot;,sipMappedType_%T&quot;, ad);
+        prcode(fp, &quot;,sipType_%T&quot;, ad);
         break;
 
     case class_type:
-        prcode(fp, &quot;,sipClass_%C&quot;, classFQCName(ad-&gt;u.cd));
+        prcode(fp, &quot;,sipType_%C&quot;, classFQCName(ad-&gt;u.cd));
 
         if (isres &amp;&amp; ad-&gt;nrderefs == 0 &amp;&amp; ad-&gt;u.cd-&gt;convtocode != NULL &amp;&amp; !isReference(ad))
             prcode(fp, &quot;,&amp;sipResState&quot;);
@@ -6517,7 +6137,7 @@ static void generateParseResultExtraArgs(argDef *ad, int isres, FILE *fp)
 
     case enum_type:
         if (ad-&gt;u.ed-&gt;fqcname != NULL)
-            prcode(fp,&quot;,sipEnum_%C&quot;,ad-&gt;u.ed-&gt;fqcname);
+            prcode(fp, &quot;,sipType_%C&quot;, ad-&gt;u.ed-&gt;fqcname);
         break;
     }
 }
@@ -6551,7 +6171,7 @@ static const char *getParseResultFormat(argDef *ad, int isres, int xfervh)
     case fake_void_type:
     case class_type:
         {
-            static char s[] = &quot;C?&quot;;
+            static char s[] = &quot;D?&quot;;
 
             int f = 0x04;
 
@@ -6595,7 +6215,7 @@ static const char *getParseResultFormat(argDef *ad, int isres, int xfervh)
         return ((ad-&gt;nrderefs == 0) ? &quot;w&quot; : &quot;x&quot;);
 
     case enum_type:
-        return ((ad-&gt;u.ed-&gt;fqcname != NULL) ? &quot;E&quot; : &quot;e&quot;);
+        return ((ad-&gt;u.ed-&gt;fqcname != NULL) ? &quot;F&quot; : &quot;e&quot;);
 
     case ushort_type:
         return &quot;t&quot;;
@@ -6697,7 +6317,7 @@ static void generateTupleBuilder(signatureDef *sd,FILE *fp)
             break;
 
         case enum_type:
-            fmt = (ad-&gt;u.ed-&gt;fqcname != NULL) ? &quot;E&quot; : &quot;e&quot;;
+            fmt = (ad-&gt;u.ed-&gt;fqcname != NULL) ? &quot;F&quot; : &quot;e&quot;;
             break;
 
         case cint_type:
@@ -6791,18 +6411,12 @@ static void generateTupleBuilder(signatureDef *sd,FILE *fp)
             break;
 
         case mapped_type:
-            fmt = &quot;D&quot;;
-            break;
-
         case fake_void_type:
         case class_type:
-            fmt = &quot;C&quot;;
-            break;
-
         case rxcon_type:
         case rxdis_type:
         case qobject_type:
-            fmt = &quot;O&quot;;
+            fmt = &quot;D&quot;;
             break;
 
         case pyobject_type:
@@ -6877,28 +6491,28 @@ static void generateTupleBuilder(signatureDef *sd,FILE *fp)
                 prcode(fp,&quot;)&quot;);
 
             if (ad-&gt;atype == mapped_type)
-                prcode(fp, &quot;,sipMappedType_%T,NULL&quot;, ad);
+                prcode(fp, &quot;,sipType_%T,NULL&quot;, ad);
             else if (ad-&gt;atype == fake_void_type || ad-&gt;atype == class_type)
-                prcode(fp, &quot;,sipClass_%C,NULL&quot;, classFQCName(ad-&gt;u.cd));
+                prcode(fp, &quot;,sipType_%C,NULL&quot;, classFQCName(ad-&gt;u.cd));
             else
-                prcode(fp,&quot;,sipClass_QObject&quot;);
+                prcode(fp,&quot;,sipType_QObject,NULL&quot;);
         }
         else
         {
             if (!isArraySize(ad))
             {
-                prcode(fp,&quot;,&quot;);
+                prcode(fp, &quot;,&quot;);
 
                 while (derefs-- != 0)
-                    prcode(fp,&quot;*&quot;);
+                    prcode(fp, &quot;*&quot;);
 
-                prcode(fp,&quot;a%d&quot;,a);
+                prcode(fp, &quot;a%d&quot;, a);
             }
 
             if (isArray(ad))
                 prcode(fp, &quot;,(SIP_SSIZE_T)a%d&quot;, arraylenarg);
             else if (ad-&gt;atype == enum_type &amp;&amp; ad-&gt;u.ed-&gt;fqcname != NULL)
-                prcode(fp,&quot;,sipEnum_%C&quot;,ad-&gt;u.ed-&gt;fqcname);
+                prcode(fp, &quot;,sipType_%C&quot;, ad-&gt;u.ed-&gt;fqcname);
         }
     }
 }
@@ -6937,7 +6551,7 @@ static void generateModuleAPI(sipSpec *pt, moduleDef *mod, FILE *fp)
 
     for (mtd = pt-&gt;mappedtypes; mtd != NULL; mtd = mtd-&gt;next)
         if (mtd-&gt;iff-&gt;module == mod)
-            generateMappedTypeAPI(mtd, fp);
+            generateMappedTypeAPI(pt, mtd, fp);
 
     for (xd = pt-&gt;exceptions; xd != NULL; xd = xd-&gt;next)
         if (xd-&gt;iff-&gt;module == mod &amp;&amp; xd-&gt;exceptionnr &gt;= 0)
@@ -6992,11 +6606,7 @@ static void generateImportedMappedTypeAPI(mappedTypeDef *mtd, moduleDef *mod,
 
     prcode(fp,
 &quot;\n&quot;
-&quot;#define sipMappedType_%T        sipModuleAPI_%s_%s-&gt;em_mappedtypes[%d]\n&quot;
-&quot;#define sipForceConvertTo_%T    sipModuleAPI_%s_%s-&gt;em_mappedtypes[%d]-&gt;mt_fcto\n&quot;
-&quot;#define sipConvertFrom_%T       sipModuleAPI_%s_%s-&gt;em_mappedtypes[%d]-&gt;mt_cfrom\n&quot;
-        , &amp;type, mname, imname, mtd-&gt;mappednr
-        , &amp;type, mname, imname, mtd-&gt;mappednr
+&quot;#define sipType_%T      sipModuleAPI_%s_%s-&gt;em_types[%d]\n&quot;
         , &amp;type, mname, imname, mtd-&gt;mappednr);
 }
 
@@ -7004,19 +6614,22 @@ static void generateImportedMappedTypeAPI(mappedTypeDef *mtd, moduleDef *mod,
 /*
  * Generate the API details for a mapped type.
  */
-static void generateMappedTypeAPI(mappedTypeDef *mtd, FILE *fp)
+static void generateMappedTypeAPI(sipSpec *pt, mappedTypeDef *mtd, FILE *fp)
 {
+    const char *type_prefix;
+
+    if (pluginPyQt4(pt))
+        type_prefix = &quot;pyqt4&quot;;
+    else
+        type_prefix = &quot;sip&quot;;
+
     prcode(fp,
 &quot;\n&quot;
-&quot;#define sipMappedType_%T        &amp;sipMappedTypeDef_%T\n&quot;
-&quot;#define sipForceConvertTo_%T    sipMappedTypeDef_%T.mt_fcto\n&quot;
-&quot;#define sipConvertFrom_%T       sipMappedTypeDef_%T.mt_cfrom\n&quot;
+&quot;#define sipType_%T      sipModuleAPI_%s.em_types[%d]\n&quot;
 &quot;\n&quot;
-&quot;extern sipMappedType sipMappedTypeDef_%T;\n&quot;
-        , &amp;mtd-&gt;type, &amp;mtd-&gt;type
-        , &amp;mtd-&gt;type, &amp;mtd-&gt;type
-        , &amp;mtd-&gt;type, &amp;mtd-&gt;type
-        , &amp;mtd-&gt;type);
+&quot;extern %sMappedTypeDef %sMappedTypeDef_%T;\n&quot;
+        , &amp;mtd-&gt;type, mtd-&gt;iff-&gt;module-&gt;name, mtd-&gt;mappednr
+        , type_prefix, type_prefix, &amp;mtd-&gt;type);
 }
 
 
@@ -7029,23 +6642,25 @@ static void generateImportedClassAPI(classDef *cd, sipSpec *pt, moduleDef *mod,
     const char *mname = mod-&gt;name;
     const char *imname = cd-&gt;iff-&gt;module-&gt;name;
 
+    prcode(fp,
+&quot;\n&quot;
+        );
+
     if (cd-&gt;iff-&gt;type == namespace_iface)
         prcode(fp,
-&quot;\n&quot;
-&quot;#if !defined(sipClass_%C)\n&quot;
-&quot;#define sipClass_%C             sipModuleAPI_%s_%s-&gt;em_types[%d]\n&quot;
-&quot;#endif\n&quot;
-            , classFQCName(cd)
-            , classFQCName(cd), mname, imname, cd-&gt;classnr);
-    else
+&quot;#if !defined(sipType_%C)\n&quot;
+            , classFQCName(cd));
+
+    prcode(fp,
+&quot;#define sipType_%C              sipModuleAPI_%s_%s-&gt;em_types[%d]\n&quot;
+&quot;#define sipClass_%C             sipModuleAPI_%s_%s-&gt;em_types[%d]-&gt;u.td_wrapper_type\n&quot;
+        , classFQCName(cd), mname, imname, cd-&gt;classnr
+        , classFQCName(cd), mname, imname, cd-&gt;classnr);
+
+    if (cd-&gt;iff-&gt;type == namespace_iface)
         prcode(fp,
-&quot;\n&quot;
-&quot;#define sipClass_%C             sipModuleAPI_%s_%s-&gt;em_types[%d]\n&quot;
-&quot;#define sipCast_%C              sipModuleAPI_%s_%s-&gt;em_types[%d]-&gt;type-&gt;td_cast\n&quot;
-&quot;#define sipForceConvertTo_%C    sipModuleAPI_%s_%s-&gt;em_types[%d]-&gt;type-&gt;td_fcto\n&quot;
-            , classFQCName(cd), mname, imname, cd-&gt;classnr
-            , classFQCName(cd), mname, imname, cd-&gt;classnr
-            , classFQCName(cd), mname, imname, cd-&gt;classnr);
+&quot;#endif\n&quot;
+            );
 
     generateEnumMacros(pt, mod, cd, fp);
 }
@@ -7064,23 +6679,29 @@ static void generateClassAPI(classDef *cd, sipSpec *pt, FILE *fp)
 
     if (cd-&gt;real == NULL)
         prcode(fp,
-&quot;#define sipClass_%C             sipModuleAPI_%s.em_types[%d]\n&quot;
+&quot;#define sipType_%C              sipModuleAPI_%s.em_types[%d]\n&quot;
+&quot;#define sipClass_%C             sipModuleAPI_%s.em_types[%d]-&gt;u.td_wrapper_type\n&quot;
+            , classFQCName(cd), mname, cd-&gt;classnr
             , classFQCName(cd), mname, cd-&gt;classnr);
 
-    if (cd-&gt;iff-&gt;type != namespace_iface &amp;&amp; !isExternal(cd))
-        prcode(fp,
-&quot;#define sipCast_%C              sipType_%s_%C.td_cast\n&quot;
-&quot;#define sipForceConvertTo_%C    sipType_%s_%C.td_fcto\n&quot;
-            , classFQCName(cd), mname, classFQCName(cd)
-            , classFQCName(cd), mname, classFQCName(cd));
-
     generateEnumMacros(pt, cd-&gt;iff-&gt;module, cd, fp);
 
     if (!isExternal(cd))
+    {
+        const char *type_prefix;
+
+        if (pluginPyQt4(pt))
+            type_prefix = &quot;pyqt4&quot;;
+        else if (pluginPyQt3(pt))
+            type_prefix = &quot;pyqt3&quot;;
+        else
+            type_prefix = &quot;sip&quot;;
+
         prcode(fp,
 &quot;\n&quot;
-&quot;extern sipTypeDef sipType_%s_%C;\n&quot;
-            , mname, classFQCName(cd));
+&quot;extern %sClassTypeDef %sType_%s_%C;\n&quot;
+            , type_prefix, type_prefix, mname, classFQCName(cd));
+    }
 }
 
 
@@ -7107,16 +6728,18 @@ static void generateEnumMacros(sipSpec *pt, moduleDef *mod, classDef *cd,
             noIntro = FALSE;
         }
 
-        prcode(fp,
-&quot;#define sipEnum_%C              sipModuleAPI_%s&quot;, ed-&gt;fqcname, mod-&gt;name);
-
         if (mod == ed-&gt;module)
-            prcode(fp, &quot;.&quot;);
+            prcode(fp,
+&quot;#define sipType_%C              sipModuleAPI_%s.em_types[%d]\n&quot;
+&quot;#define sipEnum_%C              sipModuleAPI_%s.em_types[%d]-&gt;u.td_py_type\n&quot;
+                , ed-&gt;fqcname, mod-&gt;name, ed-&gt;enumnr
+                , ed-&gt;fqcname, mod-&gt;name, ed-&gt;enumnr);
         else
-            prcode(fp, &quot;_%s-&gt;&quot;, ed-&gt;module-&gt;name);
-
-        prcode(fp, &quot;em_enums[%d]\n&quot;
-            , ed-&gt;enumnr);
+            prcode(fp,
+&quot;#define sipType_%C              sipModuleAPI_%s_%s-&gt;em_types[%d]\n&quot;
+&quot;#define sipEnum_%C              sipModuleAPI_%s_%s-&gt;em_types[%d]-&gt;u.td_py_type\n&quot;
+                , ed-&gt;fqcname, mod-&gt;name, ed-&gt;module-&gt;name, ed-&gt;enumnr
+                , ed-&gt;fqcname, mod-&gt;name, ed-&gt;module-&gt;name, ed-&gt;enumnr);
     }
 }
 
@@ -7206,7 +6829,7 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp)
             ,(cd-&gt;vmembers != NULL ? &quot;virtual &quot; : &quot;&quot;),classFQCName(cd),cd-&gt;dtorexceptions);
 
     /* The metacall methods if required. */
-    if (isQObjectSubClass(cd) &amp;&amp; optQ_OBJECT4(pt))
+    if (pluginPyQt4(pt) &amp;&amp; isQObjectSubClass(cd))
     {
         prcode(fp,
 &quot;\n&quot;
@@ -7214,7 +6837,7 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp)
 &quot;    void *qt_metacast(const char *);\n&quot;
             );
 
-        if (!noQMetaObject(cd))
+        if (!noPyQt4QMetaObject(cd))
             prcode(fp,
 &quot;    const QMetaObject *metaObject() const;\n&quot;
                 );
@@ -7229,7 +6852,7 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp)
     generateProtectedDeclarations(cd,fp);
 
     /* The public wrapper around each signal emitter. */
-    if (!optNoEmitters(pt))
+    if (pluginPyQt3(pt))
     {
         visibleList *vl;
 
@@ -7313,7 +6936,7 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp)
     prcode(fp,
 &quot;\n&quot;
 &quot;public:\n&quot;
-&quot;    sipWrapper *sipPySelf;\n&quot;
+&quot;    sipSimpleWrapper *sipPySelf;\n&quot;
         );
 
     /* The private declarations. */
@@ -7347,7 +6970,7 @@ void prOverloadDecl(FILE *fp, classDef *context, overDef *od, int defval)
 
     normaliseArgs(od-&gt;cppsig);
 
-    generateBaseType(context, &amp;od-&gt;cppsig-&gt;result, fp);
+    generateBaseType(context, &amp;od-&gt;cppsig-&gt;result, TRUE, fp);
  
     prcode(fp, &quot; %O(&quot;, od);
 
@@ -7358,7 +6981,7 @@ void prOverloadDecl(FILE *fp, classDef *context, overDef *od, int defval)
         if (a &gt; 0)
             prcode(fp, &quot;,&quot;);
 
-        generateBaseType(context, ad, fp);
+        generateBaseType(context, ad, TRUE, fp);
 
         if (defval &amp;&amp; ad-&gt;defval != NULL)
         {
@@ -7507,9 +7130,10 @@ static void generateNamedValueType(classDef *context, argDef *ad, char *name,
 /*
  * Generate a C++ type.
  */
-static void generateBaseType(classDef *context, argDef *ad, FILE *fp)
+static void generateBaseType(classDef *context, argDef *ad, int use_typename,
+        FILE *fp)
 {
-    generateNamedBaseType(context, ad, &quot;&quot;, TRUE, fp);
+    generateNamedBaseType(context, ad, &quot;&quot;, use_typename, fp);
 }
 
 
@@ -7546,7 +7170,7 @@ static void generateNamedBaseType(classDef *context, argDef *ad, char *name,
             int i;
             signatureDef *sig = ad-&gt;u.sa;
 
-            generateBaseType(context, &amp;sig-&gt;result, fp);
+            generateBaseType(context, &amp;sig-&gt;result, TRUE, fp);
 
             prcode(fp,&quot; (&quot;);
 
@@ -7666,7 +7290,7 @@ static void generateNamedBaseType(classDef *context, argDef *ad, char *name,
             break;
 
         case mapped_type:
-            generateBaseType(context, &amp;ad-&gt;u.mtd-&gt;type, fp);
+            generateBaseType(context, &amp;ad-&gt;u.mtd-&gt;type, TRUE, fp);
             break;
 
         case class_type:
@@ -7686,7 +7310,7 @@ static void generateNamedBaseType(classDef *context, argDef *ad, char *name,
                     if (a &gt; 0)
                         prcode(fp, &quot;,&quot;);
 
-                    generateBaseType(context, &amp;td-&gt;types.args[a], fp);
+                    generateBaseType(context, &amp;td-&gt;types.args[a], TRUE, fp);
                 }
 
                 if (prcode_last == tail)
@@ -7894,15 +7518,15 @@ static void generateSimpleFunctionCall(fcallDef *fcd,FILE *fp)
 
 /*
  * Generate the type structure that contains all the information needed by the
- * metatype.  A sub-set of this is used to extend namespaces.
+ * meta-type.  A sub-set of this is used to extend namespaces.
  */
 static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
 {
-    const char *mname, *sep;
-    int is_slots, nr_methods, nr_enums;
+    const char *mname, *sep, *type_prefix;
+    int is_slots, is_signals, nr_methods, nr_enums, nr_vars, embedded;
     int is_inst_class, is_inst_voidp, is_inst_char, is_inst_string;
     int is_inst_int, is_inst_long, is_inst_ulong, is_inst_longlong;
-    int is_inst_ulonglong, is_inst_double, is_inst_enum;
+    int is_inst_ulonglong, is_inst_double;
     memberDef *md;
     moduleDef *mod;
 
@@ -7965,10 +7589,105 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
 &quot;};\n&quot;
             );
 
+    /* Generate the PyQt4 signals table. */
+    is_signals = FALSE;
+
+    if (pluginPyQt4(pt) &amp;&amp; isQObjectSubClass(cd))
+    {
+        /* The signals must be grouped by name. */
+        for (md = cd-&gt;members; md != NULL; md = md-&gt;next)
+        {
+            overDef *od;
+
+            for (od = cd-&gt;overs; od != NULL; od = od-&gt;next)
+            {
+                int a, nr_args;
+
+                if (od-&gt;common != md || !isSignal(od))
+                    continue;
+
+                if (!is_signals)
+                {
+                    is_signals = TRUE;
+
+                    prcode(fp,
+&quot;\n&quot;
+&quot;\n&quot;
+&quot;/* Define this type's PyQt4 signals. */\n&quot;
+&quot;static const char *pyqt4_signals_%C[] = {\n&quot;
+                , classFQCName(cd));
+                }
+
+                /* Default arguments are handled as multiple signals. */
+                nr_args = od-&gt;cppsig-&gt;nrArgs;
+
+                for (a = 0; a &lt; nr_args; ++a)
+                    if (od-&gt;cppsig-&gt;args[a].defval != NULL)
+                    {
+                        od-&gt;cppsig-&gt;nrArgs = a;
+                        generateSignalTableEntry(cd, od, fp);
+                    }
+
+                od-&gt;cppsig-&gt;nrArgs = nr_args;
+                generateSignalTableEntry(cd, od, fp);
+            }
+        }
+
+        if (is_signals)
+            prcode(fp,
+&quot;    0\n&quot;
+&quot;};\n&quot;
+                );
+    }
+
     /* Generate the attributes tables. */
     nr_methods = generateMethodTable(cd,fp);
     nr_enums = generateEnumMemberTable(pt, mod, cd, fp);
 
+    /* Generate the variable handlers. */
+    nr_vars = 0;
+
+    if (hasVarHandlers(cd))
+    {
+        varDef *vd;
+
+        for (vd = pt-&gt;vars; vd != NULL; vd = vd-&gt;next)
+            if (vd-&gt;ecd == cd &amp;&amp; needsHandler(vd))
+            {
+                ++nr_vars;
+
+                generateVariableGetter(cd, vd, fp);
+
+                if (canSetVariable(vd))
+                    generateVariableSetter(cd, vd, fp);
+            }
+
+        /* Generate the variable table. */
+        prcode(fp,
+&quot;\n&quot;
+&quot;sipVariableDef variables_%C[] = {\n&quot;
+            ,classFQCName(cd));
+
+        for (vd = pt-&gt;vars; vd != NULL; vd = vd-&gt;next)
+            if (vd-&gt;ecd == cd &amp;&amp; needsHandler(vd))
+            {
+                prcode(fp,
+&quot;    {%N, varget_%C, &quot;, vd-&gt;pyname, vd-&gt;fqcname);
+
+                if (canSetVariable(vd))
+                    prcode(fp, &quot;varset_%C&quot;, vd-&gt;fqcname);
+                else
+                    prcode(fp, &quot;NULL&quot;);
+
+                prcode(fp, &quot;, %d},\n&quot;
+                    , (isStaticVar(vd) ? 1 : 0));
+            }
+
+        prcode(fp,
+&quot;};\n&quot;
+            );
+    }
+
     /* Generate each instance table. */
     is_inst_class = generateClasses(pt, mod, cd, fp);
     is_inst_voidp = generateVoidPointers(pt, mod, cd, fp);
@@ -7980,23 +7699,38 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
     is_inst_longlong = generateLongLongs(pt, mod, cd, fp);
     is_inst_ulonglong = generateUnsignedLongLongs(pt, mod, cd, fp);
     is_inst_double = generateDoubles(pt, mod, cd, fp);
-    is_inst_enum = generateEnums(pt, mod, cd, fp);
+
+    if (pluginPyQt4(pt))
+    {
+        type_prefix = &quot;pyqt4&quot;;
+        embedded = TRUE;
+    }
+    else if (pluginPyQt3(pt))
+    {
+        type_prefix = &quot;pyqt3&quot;;
+        embedded = TRUE;
+    }
+    else
+    {
+        type_prefix = &quot;sip&quot;;
+        embedded = FALSE;
+    }
 
     prcode(fp,
 &quot;\n&quot;
 &quot;\n&quot;
-&quot;sipTypeDef sipType_%s_%C = {\n&quot;
-&quot;    0,\n&quot;
-&quot;    &quot;, mname, classFQCName(cd));
+&quot;%sClassTypeDef %sType_%s_%C = {\n&quot;
+&quot;%s&quot;
+&quot;    {\n&quot;
+&quot;        0,\n&quot;
+&quot;        0,\n&quot;
+&quot;        0,\n&quot;
+&quot;        &quot;
+        , type_prefix, type_prefix, mname, classFQCName(cd)
+        , (embedded ? &quot;{\n&quot; : &quot;&quot;));
 
     sep = &quot;&quot;;
 
-    if (cd-&gt;userflags)
-    {
-        prcode(fp, &quot;%s%x&quot;, sep, ((cd-&gt;userflags &lt;&lt; TYPE_FLAGS_SHIFT) &amp; TYPE_FLAGS_MASK));
-        sep = &quot;|&quot;;
-    }
-
     if (isAbstractClass(cd))
     {
         prcode(fp, &quot;%sSIP_TYPE_ABSTRACT&quot;, sep);
@@ -8009,27 +7743,54 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
         sep = &quot;|&quot;;
     }
 
+    if (cd-&gt;iff-&gt;type == namespace_iface)
+    {
+        prcode(fp, &quot;%sSIP_TYPE_NAMESPACE&quot;, sep);
+        sep = &quot;|&quot;;
+    }
+    else
+    {
+        prcode(fp, &quot;%sSIP_TYPE_CLASS&quot;, sep);
+        sep = &quot;|&quot;;
+    }
+
     if (*sep == '\0')
         prcode(fp, &quot;0&quot;);
 
     prcode(fp, &quot;,\n&quot;);
 
-    if (cd-&gt;real != NULL)
+    prcode(fp,
+&quot;        %n,\n&quot;
+&quot;        {0}\n&quot;
+&quot;    },\n&quot;
+        , cd-&gt;iff-&gt;name);
+
+    if (cd-&gt;real == NULL)
         prcode(fp,
-&quot;    0,\n&quot;
+&quot;    %n,\n&quot;
+            , cd-&gt;pyname);
+    else
+        prcode(fp,
+&quot;    -1,\n&quot;
             );
-    else if (cd-&gt;ecd != NULL &amp;&amp; cd-&gt;ecd-&gt;real != NULL)
+
+    if (cd-&gt;metatype != NULL)
         prcode(fp,
-&quot;    \&quot;%s.%P\&quot;,\n&quot;
-            , cd-&gt;ecd-&gt;real-&gt;iff-&gt;module-&gt;name, cd-&gt;ecd, cd-&gt;pyname);
+&quot;    %n,\n&quot;
+            , cd-&gt;metatype);
     else
         prcode(fp,
-&quot;    \&quot;%s.%P\&quot;,\n&quot;
-            , mname, cd-&gt;ecd, cd-&gt;pyname);
+&quot;    -1,\n&quot;
+            );
 
-    prcode(fp,
-&quot;    \&quot;%S\&quot;,\n&quot;
-        , classFQCName(cd));
+    if (cd-&gt;supertype != NULL)
+        prcode(fp,
+&quot;    %n,\n&quot;
+            , cd-&gt;supertype);
+    else
+        prcode(fp,
+&quot;    -1,\n&quot;
+            );
 
     prcode(fp,
 &quot;    &quot;);
@@ -8080,14 +7841,14 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
 &quot;    %d, enummembers_%C,\n&quot;
             , nr_enums, classFQCName(cd));
 
-    if (hasVarHandlers(cd))
+    if (nr_vars == 0)
         prcode(fp,
-&quot;    variables_%C,\n&quot;
-            , classFQCName(cd));
+&quot;    0, 0,\n&quot;
+            );
     else
         prcode(fp,
-&quot;    0,\n&quot;
-            );
+&quot;    %d, variables_%C,\n&quot;
+            , nr_vars, classFQCName(cd));
 
     if (canCreate(cd))
         prcode(fp,
@@ -8168,22 +7929,17 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
             );
     else
         prcode(fp,
-&quot;    cast_%C,\n&quot;
 &quot;    release_%C,\n&quot;
+&quot;    cast_%C,\n&quot;
             , classFQCName(cd)
             , classFQCName(cd));
 
     if (cd-&gt;iff-&gt;type == namespace_iface)
         prcode(fp,
 &quot;    0,\n&quot;
-&quot;    0,\n&quot;
             );
     else
     {
-        prcode(fp,
-&quot;    forceConvertTo_%C,\n&quot;
-            , classFQCName(cd));
-
         if (cd-&gt;convtocode != NULL)
             prcode(fp,
 &quot;    convertTo_%C,\n&quot;
@@ -8194,20 +7950,11 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
                 );
     }
 
-    if (!optNoEmitters(pt) &amp;&amp; hasSigSlots(cd))
-        prcode(fp,
-&quot;    signals_%C,\n&quot;
-            , classFQCName(cd));
-    else
-        prcode(fp,
-&quot;    0,\n&quot;
-            );
-
     prcode(fp,
 &quot;    {&quot;);
 
     if (is_inst_class)
-        prcode(fp, &quot;classInstances_%C, &quot;, classFQCName(cd));
+        prcode(fp, &quot;typeInstances_%C, &quot;, classFQCName(cd));
     else
         prcode(fp, &quot;0, &quot;);
 
@@ -8252,12 +7999,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
         prcode(fp, &quot;0, &quot;);
 
     if (is_inst_double)
-        prcode(fp, &quot;doubleInstances_%C, &quot;, classFQCName(cd));
-    else
-        prcode(fp, &quot;0, &quot;);
-
-    if (is_inst_enum)
-        prcode(fp, &quot;enumInstances_%C&quot;, classFQCName(cd));
+        prcode(fp, &quot;doubleInstances_%C&quot;, classFQCName(cd));
     else
         prcode(fp, &quot;0&quot;);
 
@@ -8267,30 +8009,63 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
 
     if (cd-&gt;picklecode != NULL)
         prcode(fp,
-&quot;    pickle_%C,\n&quot;
+&quot;    pickle_%C\n&quot;
             , classFQCName(cd));
     else
         prcode(fp,
-&quot;    0,\n&quot;
+&quot;    0\n&quot;
             );
 
-    if (optAssignmentHelpers(pt) &amp;&amp; (generating_c || canAssign(cd)))
+    if (embedded)
         prcode(fp,
+&quot;},\n&quot;
+            );
+
+    if (pluginPyQt3(pt))
+    {
+        if (hasSigSlots(cd))
+            prcode(fp,
+&quot;    signals_%C\n&quot;
+                , classFQCName(cd));
+        else
+            prcode(fp,
+&quot;    0\n&quot;
+                );
+    }
+
+    if (pluginPyQt4(pt))
+    {
+        if (assignmentHelper(cd))
+            prcode(fp,
 &quot;    assign_%C,\n&quot;
-            , classFQCName(cd));
-    else
-        prcode(fp,
+                , classFQCName(cd));
+        else
+            prcode(fp,
 &quot;    0,\n&quot;
-            );
+                );
+
+        if (isQObjectSubClass(cd) &amp;&amp; !noPyQt4QMetaObject(cd))
+            prcode(fp,
+&quot;    &amp;%U::staticMetaObject,\n&quot;
+                , cd);
+        else
+            prcode(fp,
+&quot;    0,\n&quot;
+                );
 
-    if (isQObjectSubClass(cd) &amp;&amp; !noQMetaObject(cd) &amp;&amp; optQ_OBJECT4(pt))
-        prcode(fp,
-&quot;    &amp;%U::staticMetaObject\n&quot;
-            , cd);
-    else
         prcode(fp,
+&quot;    %u,\n&quot;
+            , cd-&gt;pyqt4_flags);
+
+        if (is_signals)
+            prcode(fp,
+&quot;    pyqt4_signals_%C\n&quot;
+                , classFQCName(cd));
+        else
+            prcode(fp,
 &quot;    0\n&quot;
-            );
+                );
+    }
 
     prcode(fp,
 &quot;};\n&quot;
@@ -8299,6 +8074,21 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
 
 
 /*
+ * Generate an entry in the PyQt4 signal table.
+ */
+static void generateSignalTableEntry(classDef *cd, overDef *od, FILE *fp)
+{
+    prcode(fp,
+&quot;    \&quot;%s(&quot;, od-&gt;cppname);
+
+    generateCalledArgs(cd, od-&gt;cppsig, Declaration, TRUE, fp);
+
+    prcode(fp,&quot;)\&quot;,\n&quot;
+        );
+}
+
+
+/*
  * Return the sip module's string equivalent of a slot.
  */
 static const char *slotName(slotType st)
@@ -8549,11 +8339,11 @@ static void generateTypeInit(classDef *cd, FILE *fp)
 
     if (!generating_c)
         prcode(fp,
-&quot;extern \&quot;C\&quot; {static void *init_%C(sipWrapper *, PyObject *, sipWrapper **, int *);}\n&quot;
+&quot;extern \&quot;C\&quot; {static void *init_%C(sipSimpleWrapper *, PyObject *, sipWrapper **, int *);}\n&quot;
             , classFQCName(cd));
 
     prcode(fp,
-&quot;static void *init_%C(sipWrapper *%s,PyObject *sipArgs,sipWrapper **%s,int *sipArgsParsed)\n&quot;
+&quot;static void *init_%C(sipSimpleWrapper *%s,PyObject *sipArgs,sipWrapper **%s,int *sipArgsParsed)\n&quot;
 &quot;{\n&quot;
         ,classFQCName(cd),(need_self ? &quot;sipSelf&quot; : &quot;&quot;),(need_owner ? &quot;sipOwner&quot; : &quot;&quot;));
 
@@ -8738,9 +8528,9 @@ static void generateCatch(throwArgs *ta, signatureDef *sd, FILE *fp)
 &quot;                /* Hope that there is a valid copy ctor. */\n&quot;
 &quot;                %S *sipExceptionCopy = new %S(sipExceptionRef);\n&quot;
 &quot;\n&quot;
-&quot;                sipRaise%sClassException(sipClass_%C,sipExceptionCopy);\n&quot;
+&quot;                sipRaiseTypeException(sipType_%C,sipExceptionCopy);\n&quot;
                         , ename, ename
-                        , (xd-&gt;cd-&gt;subbase != NULL ? &quot;Sub&quot; : &quot;&quot;), ename);
+                        , ename);
                 else
                     generateCppCodeBlock(xd-&gt;raisecode,fp);
 
@@ -8795,7 +8585,7 @@ static void generateConstructorCall(classDef *cd,ctorDef *ct,int error_flag,
 &quot;            if (sipDeprecated(%N,NULL) &lt; 0)\n&quot;
 &quot;                return NULL;\n&quot;
 &quot;\n&quot;
-            , cd-&gt;iff-&gt;name);
+            , cd-&gt;pyname);
 
     /* Call any pre-hook. */
     if (ct-&gt;prehook != NULL)
@@ -8923,15 +8713,14 @@ static void generateFunction(memberDef *md, overDef *overs, classDef *cd,
         classDef *ocd, FILE *fp)
 {
     overDef *od;
-    int need_method, need_self, need_args, need_selfarg;
+    int need_method, need_self, need_args;
 
     /*
      * Check that there is at least one overload that needs to be handled.
      * See if we can avoid naming the &quot;self&quot; argument (and suppress a
-     * compiler warning).  Finally see if we need to remember if &quot;self&quot; was
-     * explicitly passed as an argument.
+     * compiler warning).
      */
-    need_method = need_self = need_args = need_selfarg = FALSE;
+    need_method = need_self = need_args = FALSE;
 
     for (od = overs; od != NULL; od = od-&gt;next)
     {
@@ -8951,12 +8740,7 @@ static void generateFunction(memberDef *md, overDef *overs, classDef *cd,
                 need_args = TRUE;
 
                 if (!isStatic(od))
-                {
                     need_self = TRUE;
-
-                    if (isAbstract(od) || isVirtual(od) || isVirtualReimp(od) || usedInCode(od-&gt;methodcode, &quot;sipSelfWasArg&quot;))
-                        need_selfarg = TRUE;
-                }
             }
         }
     }
@@ -8991,11 +8775,6 @@ static void generateFunction(memberDef *md, overDef *overs, classDef *cd,
 &quot;    int sipArgsParsed = 0;\n&quot;
                 );
 
-        if (need_selfarg)
-            prcode(fp,
-&quot;    bool sipSelfWasArg = !sipSelf;\n&quot;
-                );
-
         for (od = overs; od != NULL; od = od-&gt;next)
         {
             /*
@@ -9018,7 +8797,7 @@ static void generateFunction(memberDef *md, overDef *overs, classDef *cd,
 &quot;\n&quot;
 &quot;    return NULL;\n&quot;
 &quot;}\n&quot;
-            ,(need_args ? &quot;sipArgsParsed&quot; : &quot;0&quot;),cd-&gt;iff-&gt;name,md-&gt;pyname);
+            ,(need_args ? &quot;sipArgsParsed&quot; : &quot;0&quot;),cd-&gt;pyname,md-&gt;pyname);
     }
 }
 
@@ -9146,14 +8925,14 @@ static void generateHandleResult(overDef *od, int isNew, int result_size,
         if (res-&gt;atype == mapped_type)
         {
             prcode(fp,
-&quot;            PyObject *sipResObj = sipConvertFromMappedType(&quot;);
+&quot;            PyObject *sipResObj = sipConvertFromType(&quot;);
 
             if (isConstArg(res))
                 prcode(fp,&quot;const_cast&lt;%b *&gt;(sipRes)&quot;,res);
             else
                 prcode(fp,&quot;sipRes&quot;);
 
-            prcode(fp,&quot;,sipMappedType_%T,%s);\n&quot;
+            prcode(fp,&quot;,sipType_%T,%s);\n&quot;
                 , res, resultOwner(od));
 
             if (isNew)
@@ -9179,14 +8958,14 @@ static void generateHandleResult(overDef *od, int isNew, int result_size,
             if (isNew || isFactory(od))
             {
                 prcode(fp,
-&quot;            %s sipConvertFromNewInstance(&quot;,(nrvals == 1 ? prefix : &quot;PyObject *sipResObj =&quot;));
+&quot;            %s sipConvertFromNewType(&quot;,(nrvals == 1 ? prefix : &quot;PyObject *sipResObj =&quot;));
 
                 if (isConstArg(res))
                     prcode(fp,&quot;const_cast&lt;%b *&gt;(sipRes)&quot;,res);
                 else
                     prcode(fp,&quot;sipRes&quot;);
 
-                prcode(fp,&quot;,sipClass_%C,%s);\n&quot;
+                prcode(fp,&quot;,sipType_%C,%s);\n&quot;
                     ,classFQCName(cd),((has_owner &amp;&amp; isFactory(od)) ? &quot;(PyObject *)sipOwner&quot; : &quot;NULL&quot;));
 
                 /*
@@ -9198,14 +8977,14 @@ static void generateHandleResult(overDef *od, int isNew, int result_size,
             else
             {
                 prcode(fp,
-&quot;            %s sipConvertFromInstance(&quot;,(nrvals == 1 ? prefix : &quot;PyObject *sipResObj =&quot;));
+&quot;            %s sipConvertFromType(&quot;,(nrvals == 1 ? prefix : &quot;PyObject *sipResObj =&quot;));
 
                 if (isConstArg(res))
                     prcode(fp,&quot;const_cast&lt;%b *&gt;(sipRes)&quot;,res);
                 else
                     prcode(fp,&quot;sipRes&quot;);
 
-                prcode(fp, &quot;,sipClass_%C,%s);\n&quot;
+                prcode(fp, &quot;,sipType_%C,%s);\n&quot;
                     , classFQCName(cd), resultOwner(od));
 
                 /*
@@ -9240,12 +9019,12 @@ static void generateHandleResult(overDef *od, int isNew, int result_size,
         /* Pass the values for conversion. */
         if (res != NULL)
         {
-            prcode(fp,&quot;,sipRes&quot;);
+            prcode(fp, &quot;,sipRes&quot;);
 
             if (res-&gt;atype == mapped_type || res-&gt;atype == class_type)
-                prcode(fp,&quot;Obj&quot;);
+                prcode(fp, &quot;Obj&quot;);
             else if (res-&gt;atype == enum_type &amp;&amp; res-&gt;u.ed-&gt;fqcname != NULL)
-                prcode(fp,&quot;,sipEnum_%C&quot;,res-&gt;u.ed-&gt;fqcname);
+                prcode(fp, &quot;,sipType_%C&quot;, res-&gt;u.ed-&gt;fqcname);
         }
 
         for (a = 0; a &lt; od-&gt;pysig.nrArgs; ++a)
@@ -9254,14 +9033,14 @@ static void generateHandleResult(overDef *od, int isNew, int result_size,
 
             if (isOutArg(ad))
             {
-                prcode(fp,&quot;,a%d&quot;,a);
+                prcode(fp, &quot;,a%d&quot;, a);
 
                 if (ad-&gt;atype == mapped_type)
-                    prcode(fp, &quot;,sipMappedType_%T,%s&quot;, ad, (isTransferredBack(ad) ? &quot;Py_None&quot; : &quot;NULL&quot;));
+                    prcode(fp, &quot;,sipType_%T,%s&quot;, ad, (isTransferredBack(ad) ? &quot;Py_None&quot; : &quot;NULL&quot;));
                 else if (ad-&gt;atype == class_type)
-                    prcode(fp, &quot;,sipClass_%C,%s&quot;, classFQCName(ad-&gt;u.cd), (isTransferredBack(ad) ? &quot;Py_None&quot; : &quot;NULL&quot;));
+                    prcode(fp, &quot;,sipType_%C,%s&quot;, classFQCName(ad-&gt;u.cd), (isTransferredBack(ad) ? &quot;Py_None&quot; : &quot;NULL&quot;));
                 else if (ad-&gt;atype == enum_type &amp;&amp; ad-&gt;u.ed-&gt;fqcname != NULL)
-                    prcode(fp,&quot;,sipEnum_%C&quot;,ad-&gt;u.ed-&gt;fqcname);
+                    prcode(fp,&quot;,sipType_%C&quot;, ad-&gt;u.ed-&gt;fqcname);
             }
         }
 
@@ -9290,14 +9069,14 @@ static void generateHandleResult(overDef *od, int isNew, int result_size,
     {
     case mapped_type:
         prcode(fp,
-&quot;            %s sipConvertFromMappedType(&quot;, prefix);
+&quot;            %s sipConvertFromType(&quot;, prefix);
 
         if (isConstArg(ad))
             prcode(fp,&quot;const_cast&lt;%b *&gt;(%s)&quot;,ad,vname);
         else
             prcode(fp,&quot;%s&quot;,vname);
 
-        prcode(fp,&quot;,sipMappedType_%T,%s);\n&quot;
+        prcode(fp,&quot;,sipType_%T,%s);\n&quot;
             , ad, (isTransferredBack(ad) ? &quot;Py_None&quot; : &quot;NULL&quot;));
 
         break;
@@ -9309,17 +9088,17 @@ static void generateHandleResult(overDef *od, int isNew, int result_size,
 
             if (needNew)
                 prcode(fp,
-&quot;            %s sipConvertFromNewInstance(&quot;, prefix);
+&quot;            %s sipConvertFromNewType(&quot;, prefix);
             else
                 prcode(fp,
-&quot;            %s sipConvertFromInstance(&quot;, prefix);
+&quot;            %s sipConvertFromType(&quot;, prefix);
 
             if (isConstArg(ad))
                 prcode(fp,&quot;const_cast&lt;%b *&gt;(%s)&quot;,ad,vname);
             else
                 prcode(fp,&quot;%s&quot;,vname);
 
-            prcode(fp,&quot;,sipClass_%C,&quot;,classFQCName(cd));
+            prcode(fp,&quot;,sipType_%C,&quot;,classFQCName(cd));
 
             if (needNew)
                 prcode(fp,&quot;NULL&quot;);
@@ -9385,8 +9164,8 @@ static void generateHandleResult(overDef *od, int isNew, int result_size,
         if (ad-&gt;u.ed-&gt;fqcname != NULL)
         {
             prcode(fp,
-&quot;            %s sipConvertFromNamedEnum(%s,sipEnum_%C);\n&quot;
-                ,prefix,vname,ad-&gt;u.ed-&gt;fqcname);
+&quot;            %s sipConvertFromEnum(%s,sipType_%C);\n&quot;
+                , prefix, vname, ad-&gt;u.ed-&gt;fqcname);
 
             break;
         }
@@ -9514,9 +9293,9 @@ static char getBuildResultFormat(argDef *ad)
     case fake_void_type:
     case class_type:
         if (needNewInstance(ad))
-            return 'B';
+            return 'N';
 
-        return 'C';
+        return 'D';
 
     case bool_type:
     case cbool_type:
@@ -9531,7 +9310,7 @@ static char getBuildResultFormat(argDef *ad)
         return (ad-&gt;nrderefs &gt; (isOutArg(ad) ? 1 : 0)) ? 'x' : 'w';
 
     case enum_type:
-        return (ad-&gt;u.ed-&gt;fqcname != NULL) ? 'E' : 'e';
+        return (ad-&gt;u.ed-&gt;fqcname != NULL) ? 'F' : 'e';
 
     case short_type:
         return 'h';
@@ -9731,16 +9510,22 @@ static void generateFunctionCall(classDef *cd,classDef *ocd,overDef *od,
 &quot;\n&quot;
             );
 
-    /* If it is abstract make sure that self was bound. */
+    /*
+     * If it is abstract then there can't be a Python implementation otherwise
+     * it would have been called instead of this.  If this is not a derived
+     * class (ie. the instance was created by C++) then it must have a C++
+     * implementation we can call.  Therefore raise an exception if the
+     * instance was created by Python.
+     */
     if (isAbstract(od))
         prcode(fp,
-&quot;            if (sipSelfWasArg)\n&quot;
+&quot;            if (sipIsDerived((sipSimpleWrapper *)sipSelf))\n&quot;
 &quot;            {\n&quot;
-&quot;                sipAbstractMethod(%N,%N);\n&quot;
+&quot;                sipAbstractMethod(%N, %N);\n&quot;
 &quot;                return NULL;\n&quot;
 &quot;            }\n&quot;
 &quot;\n&quot;
-            , cd-&gt;iff-&gt;name, od-&gt;common-&gt;pyname);
+            , cd-&gt;pyname, od-&gt;common-&gt;pyname);
 
     if (isDeprecated(od))
     {
@@ -9748,7 +9533,7 @@ static void generateFunctionCall(classDef *cd,classDef *ocd,overDef *od,
         if (cd != NULL)
             prcode(fp,
 &quot;            if (sipDeprecated(%N,%N) &lt; 0)\n&quot;
-                , cd-&gt;iff-&gt;name, od-&gt;common-&gt;pyname);
+                , cd-&gt;pyname, od-&gt;common-&gt;pyname);
         else
             prcode(fp,
 &quot;            if (sipDeprecated(NULL,%N) &lt; 0)\n&quot;
@@ -10095,51 +9880,32 @@ static void generateCppFunctionCall(classDef *cd, classDef *ocd, overDef *od,
         FILE *fp)
 {
     char *mname = od-&gt;cppname;
-    int parens = 1;
 
-    /*
-     * If the function is protected then call the public wrapper.  If it is
-     * virtual then call the explicit scoped function if &quot;self&quot; was passed as
-     * the first argument.
-     */
+    /* If the function is protected then call the public wrapper. */
 
     if (cd == NULL)
-        prcode(fp,&quot;%s(&quot;,mname);
+        prcode(fp, &quot;%s(&quot;, mname);
     else if (cd-&gt;iff-&gt;type == namespace_iface)
-        prcode(fp,&quot;%S::%s(&quot;,classFQCName(cd),mname);
+        prcode(fp, &quot;%S::%s(&quot;, classFQCName(cd), mname);
     else if (isStatic(od))
     {
         if (isProtected(od))
-            prcode(fp,&quot;sip%C::sipProtect_%s(&quot;,classFQCName(cd),mname);
+            prcode(fp, &quot;sip%C::sipProtect_%s(&quot;, classFQCName(cd),mname);
         else
-            prcode(fp,&quot;%S::%s(&quot;,classFQCName(ocd),mname);
+            prcode(fp, &quot;%S::%s(&quot;, classFQCName(ocd),mname);
     }
     else if (isProtected(od))
     {
-        if (!isAbstract(od) &amp;&amp; (isVirtual(od) || isVirtualReimp(od)))
-        {
-            prcode(fp, &quot;sipCpp-&gt;sipProtectVirt_%s(sipSelfWasArg&quot;, mname);
-
-            if (od-&gt;cppsig-&gt;nrArgs &gt; 0)
-                prcode(fp, &quot;,&quot;);
-        }
-        else
-            prcode(fp, &quot;sipCpp-&gt;sipProtect_%s(&quot;, mname);
+        prcode(fp, &quot;sipCpp-&gt;sipProtect_%s(&quot;, mname);
     }
     else if (!isAbstract(od) &amp;&amp; (isVirtual(od) || isVirtualReimp(od)))
-    {
-        prcode(fp, &quot;(sipSelfWasArg ? sipCpp-&gt;%U::%s(&quot;, ocd, mname);
-        generateCallArgs(cd, od-&gt;cppsig, &amp;od-&gt;pysig, fp);
-        prcode(fp, &quot;) : sipCpp-&gt;%s(&quot;, mname);
-        ++parens;
-    }
+        prcode(fp, &quot;sipCpp-&gt;%U::%s(&quot;, ocd, mname);
     else
         prcode(fp, &quot;sipCpp-&gt;%s(&quot;, mname);
 
     generateCallArgs(cd, od-&gt;cppsig, &amp;od-&gt;pysig, fp);
 
-    while (parens--)
-        prcode(fp, &quot;)&quot;);
+    prcode(fp, &quot;)&quot;);
 }
 
 
@@ -10470,9 +10236,6 @@ static int generateArgParser(signatureDef *sd, classDef *cd, ctorDef *ct,
             break;
 
         case mapped_type:
-            fmt = getSubFormatChar('M',ad);
-            break;
-
         case class_type:
             fmt = getSubFormatChar('J', ad);
             break;
@@ -10510,7 +10273,7 @@ static int generateArgParser(signatureDef *sd, classDef *cd, ctorDef *ct,
     /* Generate the parameters corresponding to the format string. */
 
     if (handle_self)
-        prcode(fp,&quot;,&amp;sipSelf,sipClass_%C,&amp;sipCpp&quot;,classFQCName(cd));
+        prcode(fp,&quot;,&amp;sipSelf,sipType_%C,&amp;sipCpp&quot;,classFQCName(cd));
     else if (isQtSlot &amp;&amp; od == NULL)
         prcode(fp,&quot;,sipSelf&quot;);
 
@@ -10525,14 +10288,14 @@ static int generateArgParser(signatureDef *sd, classDef *cd, ctorDef *ct,
         {
         case mapped_type:
             if (noRelease(ad-&gt;u.mtd))
-                prcode(fp, &quot;,sipMappedType_%T,&amp;a%d,NULL&quot;, ad, a);
+                prcode(fp, &quot;,sipType_%T,&amp;a%d,NULL&quot;, ad, a);
             else
-                prcode(fp, &quot;,sipMappedType_%T,&amp;a%d,&amp;a%dState&quot;, ad, a, a);
+                prcode(fp, &quot;,sipType_%T,&amp;a%d,&amp;a%dState&quot;, ad, a, a);
 
             break;
 
         case class_type:
-            prcode(fp, &quot;,sipClass_%T,&amp;a%d&quot;, ad, a);
+            prcode(fp, &quot;,sipType_%T,&amp;a%d&quot;, ad, a);
 
             if (isThisTransferred(ad))
                 prcode(fp, &quot;,%ssipOwner&quot;, (ct != NULL ? &quot;&quot; : &quot;&amp;&quot;));
@@ -10606,7 +10369,7 @@ static int generateArgParser(signatureDef *sd, classDef *cd, ctorDef *ct,
 
         case enum_type:
             if (ad-&gt;u.ed-&gt;fqcname != NULL)
-                prcode(fp,&quot;,sipEnum_%C&quot;,ad-&gt;u.ed-&gt;fqcname);
+                prcode(fp, &quot;,sipType_%C&quot;, ad-&gt;u.ed-&gt;fqcname);
 
             prcode(fp,&quot;,&amp;a%d&quot;,a);
             break;
@@ -10630,38 +10393,37 @@ static int generateArgParser(signatureDef *sd, classDef *cd, ctorDef *ct,
  * Get the format character string for something that has sub-formats.
  */
 
-static char *getSubFormatChar(char fc,argDef *ad)
+static char *getSubFormatChar(char fc, argDef *ad)
 {
     static char fmt[3];
     char flags;
 
-    fmt[0] = fc;
-
     flags = 0;
 
-    if (fc != 'P' &amp;&amp; ad-&gt;nrderefs == 0)
-        flags |= 0x01;
-
     if (isTransferred(ad))
         flags |= 0x02;
 
     if (isTransferredBack(ad))
         flags |= 0x04;
 
-    if (fc == 'J')
+    if (ad-&gt;atype == class_type || ad-&gt;atype == mapped_type)
     {
+        if (ad-&gt;nrderefs == 0)
+            flags |= 0x01;
+
         if (isThisTransferred(ad))
             flags |= 0x20;
 
         if (isGetWrapper(ad))
             flags |= 0x08;
 
-        if (ad-&gt;u.cd-&gt;convtocode == NULL || isConstrained(ad))
-            flags |= 0x10;
+        if (ad-&gt;atype == class_type)
+            if (ad-&gt;u.cd-&gt;convtocode == NULL || isConstrained(ad))
+                flags |= 0x10;
     }
 
+    fmt[0] = fc;
     fmt[1] = '0' + flags;
-
     fmt[2] = '\0';
 
     return fmt;
@@ -10735,20 +10497,8 @@ static void deleteTemps(signatureDef *sd, FILE *fp)
         }
         else if (hasConvertToCode(ad))
         {
-            const char *fstr, *sstr;
-
-            if (ad-&gt;atype == mapped_type)
-            {
-                if (noRelease(ad-&gt;u.mtd))
-                    continue;
-
-                fstr = sstr = &quot;MappedType&quot;;
-            }
-            else
-            {
-                fstr = &quot;Instance&quot;;
-                sstr = &quot;Class&quot;;
-            }
+            if (ad-&gt;atype == mapped_type &amp;&amp; noRelease(ad-&gt;u.mtd))
+                continue;
 
             if (first)
             {
@@ -10761,12 +10511,12 @@ static void deleteTemps(signatureDef *sd, FILE *fp)
 
             if (generating_c || !isConstArg(ad))
                 prcode(fp,
-&quot;            sipRelease%s(a%d,sip%s_%T,a%dState);\n&quot;
-                    , fstr, a, sstr, ad, a);
+&quot;            sipReleaseType(a%d,sipType_%T,a%dState);\n&quot;
+                    , a, ad, a);
             else
                 prcode(fp,
-&quot;            sipRelease%s(const_cast&lt;%b *&gt;(a%d),sip%s_%T,a%dState);\n&quot;
-                    , fstr, ad, a, sstr, ad, a);
+&quot;            sipReleaseType(const_cast&lt;%b *&gt;(a%d),sipType_%T,a%dState);\n&quot;
+                    , ad, a, ad, a);
         }
     }
 }
@@ -11017,7 +10767,7 @@ void prcode(FILE *fp, const char *fmt, ...)
                     resetIsReference(ad);
                     ad-&gt;nrderefs = 0;
 
-                    generateBaseType(NULL, ad, fp);
+                    generateBaseType(NULL, ad, TRUE, fp);
 
                     *ad = orig;
 
@@ -11033,12 +10783,12 @@ void prcode(FILE *fp, const char *fmt, ...)
                     classDef *context = va_arg(ap, classDef *);
                     argDef *ad = va_arg(ap, argDef *);
 
-                    generateBaseType(context, ad, fp);
+                    generateBaseType(context, ad, TRUE, fp);
                     break;
                 }
 
             case 'B':
-                generateBaseType(NULL, va_arg(ap,argDef *),fp);
+                generateBaseType(NULL, va_arg(ap,argDef *),TRUE, fp);
                 break;
 
             case 'T':
@@ -11059,7 +10809,15 @@ void prcode(FILE *fp, const char *fmt, ...)
                 {
                     nameDef *nd = va_arg(ap,nameDef *);
 
-                    fprintf(fp,&quot;sipNm_%s_%s&quot;,nd-&gt;module-&gt;name,nd-&gt;text);
+                    prCachedName(fp, nd, &quot;sipName_&quot;);
+                    break;
+                }
+
+            case 'n':
+                {
+                    nameDef *nd = va_arg(ap,nameDef *);
+
+                    prCachedName(fp, nd, &quot;sipNameNr_&quot;);
                     break;
                 }
 
@@ -11117,15 +10875,6 @@ void prcode(FILE *fp, const char *fmt, ...)
                 prOverloadName(fp, va_arg(ap, overDef *));
                 break;
 
-            case 'P':
-                {
-                    classDef *ecd = va_arg(ap, classDef *);
-                    const char *pyname = va_arg(ap, const char *);
-
-                    prScopedPythonName(fp, ecd, pyname);
-                    break;
-                }
-
             case 'X':
                 generateThrowSpecifier(va_arg(ap,throwArgs *),fp);
                 break;
@@ -11147,6 +10896,37 @@ void prcode(FILE *fp, const char *fmt, ...)
 
 
 /*
+ * Generate the symbolic name of a cached name.
+ */
+static void prCachedName(FILE *fp, nameDef *nd, const char *prefix)
+{
+    prcode(fp, &quot;%s&quot;, prefix);
+
+    /*
+     * If the name seems to be a template then just use the offset to ensure
+     * that it is unique.
+     */
+    if (strchr(nd-&gt;text, '&lt;') != NULL)
+        prcode(fp, &quot;%d&quot;, nd-&gt;offset);
+    else
+    {
+        const char *cp;
+
+        /* Handle C++ and Python scopes. */
+        for (cp = nd-&gt;text; *cp != '\0'; ++cp)
+        {
+            char ch = *cp;
+
+            if (ch == ':' || ch == '.')
+                ch = '_';
+
+            prcode(fp, &quot;%c&quot;, ch);
+        }
+    }
+}
+
+
+/*
  * Generate the C++ name of an overloaded function.
  */
 void prOverloadName(FILE *fp, overDef *od)
@@ -11326,22 +11106,6 @@ static void prScopedClassName(FILE *fp, classDef *context, classDef *cd)
 
 
 /*
- * Generate a scoped Python name.
- */
-void prScopedPythonName(FILE *fp, classDef *scope, const char *pyname)
-{
-    if (scope != NULL)
-    {
-        prScopedPythonName(fp, scope-&gt;ecd, NULL);
-        fprintf(fp, &quot;%s.&quot;, scope-&gt;pyname);
-    }
-
-    if (pyname != NULL)
-        fprintf(fp, &quot;%s&quot;, pyname);
-}
-
-
-/*
  * Generate a type name to be used as part of an identifier name.
  */
 static void prTypeName(FILE *fp,argDef *ad,int intmpl)</diff>
      <filename>sipgen/gencode.c</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 /*
  * Wrappers around standard functions that use the heap.
  *
- * Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+ * Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
  * 
  * This file is part of SIP.
  * 
@@ -27,7 +27,6 @@ static void nomem(void);
 /*
  * Wrap malloc() and handle any errors.
  */
-
 void *sipMalloc(size_t n)
 {
 	void *h;
@@ -42,9 +41,22 @@ void *sipMalloc(size_t n)
 
 
 /*
- * Wrap strdup() and handle any errors.
+ * Wrap calloc() and handle any errors.
  */
+void *sipCalloc(size_t nr, size_t n)
+{
+	void *h;
 
+	if ((h = calloc(nr, n)) == NULL)
+		nomem();
+
+    return h;
+}
+
+
+/*
+ * Wrap strdup() and handle any errors.
+ */
 char *sipStrdup(const char *s)
 {
 	char *h;
@@ -59,7 +71,6 @@ char *sipStrdup(const char *s)
 /*
  * Return a string on the heap which is the concatonation of all the arguments.
  */
-
 char *concat(const char *s, ...)
 {
 	const char *sp;</diff>
      <filename>sipgen/heap.c</filename>
    </modified>
    <modified>
      <diff>@@ -364,8 +364,8 @@ static void yy_fatal_error (yyconst char msg[]  );
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
 
-#define YY_NUM_RULES 114
-#define YY_END_OF_BUFFER 115
+#define YY_NUM_RULES 116
+#define YY_END_OF_BUFFER 117
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -373,93 +373,97 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[776] =
+static yyconst flex_int16_t yy_accept[802] =
     {   0,
-        0,    0,    0,    0,    0,    0,  115,  113,   67,   68,
-      113,  113,  113,   71,  113,   70,   70,  113,   73,   73,
-       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   73,   73,   73,  113,   67,  113,  112,
-      111,  112,   80,   78,   80,    0,   75,    0,   76,   71,
-       70,    0,   74,   71,   74,   74,   71,   77,   69,   71,
-        0,   49,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   50,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,  117,  115,   68,   69,
+      115,  115,  115,   72,  115,   71,   71,  115,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,  115,   68,  115,  114,
+      113,  114,   81,   79,   81,    0,   76,    0,   77,   72,
+       71,    0,   75,   72,   75,   75,   72,   78,   70,   72,
+        0,   50,   74,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   51,    0,    0,    0,    0,    0,    0,    0,
 
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,   79,   71,    0,   66,    0,    0,   71,
-       69,   72,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   29,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,   16,
+        0,    0,    0,   80,   72,    0,   67,    0,    0,   72,
+       70,   73,   74,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   30,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,   71,
-       42,   73,   27,   25,   73,   73,   73,   35,   73,   73,
+        0,   15,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+       72,   43,   74,   28,   26,   74,   74,   74,   36,   74,
 
-       73,   30,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   73,   40,   73,   73,   73,   33,   73,
+       74,   74,   31,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   41,   74,   74,   74,   34,
+       74,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,  106,   18,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-      104,   17,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,  110,   73,   73,
-       73,   73,   73,   18,   38,   73,   73,   41,   31,   73,
-       73,   73,   73,   73,   28,   73,   73,   24,   73,   73,
-       73,   46,   73,   73,   73,   73,    0,    0,    0,    0,
+        0,  112,   74,   74,   74,   74,   74,   19,   39,   74,
+       74,   42,   32,   74,   74,   74,   74,   74,   29,   74,
+       74,   25,   74,   74,   74,   47,   74,   74,   74,   74,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,   73,   73,   73,   73,   73,   73,   32,   73,
-       73,   73,   73,   73,   20,   73,   36,   39,   19,   73,
-       73,   73,   73,   73,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,   74,   74,   74,
+       74,   74,   74,   33,   74,   74,   74,   74,   74,   21,
+       74,   37,   40,   20,   74,   74,   74,   74,   74,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   73,   22,   73,   23,   73,   43,   73,
+        0,    0,    0,    0,    0,    0,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
 
-       34,   26,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    5,
-        0,    0,    0,    0,    0,    6,    0,    0,    0,    0,
+       23,   74,   24,   74,   44,   74,   35,   27,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   59,   47,   73,   45,   73,   48,   37,    6,
-        0,    0,    0,    0,    0,    7,    0,    0,    0,   81,
-        0,    0,   12,    0,    0,  108,    3,   13,    0,    0,
+        0,    0,    0,    0,    0,    0,    4,    0,    0,    0,
+        0,    0,    0,    5,    0,    0,    0,    1,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   74,   74,   60,
+       48,   74,   46,   74,   49,   38,    5,    0,    0,    0,
+        0,    0,    6,    0,    0,    0,   82,    0,    0,    0,
+       11,    0,    0,  110,    2,    0,   12,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,  111,
+
+        0,    0,    0,    0,    0,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   45,   22,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,  109,    0,    0,    0,    0,    0,   73,   73,
-
-       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-       44,   21,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,  106,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,   10,
-       92,    0,   90,    0,   73,   73,   54,   53,   73,   73,
-       73,   57,   73,   73,   58,   73,   73,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,   15,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,   11,    0,    0,
-        0,  103,    0,    0,    0,    0,   60,   73,   73,   56,
-       52,   65,   73,   73,   73,   73,  107,    0,    0,    0,
-
+        0,    0,    0,    0,    0,  108,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    9,   94,    0,
+       92,    0,   74,   74,   55,   54,   74,   74,   74,   58,
+       74,   74,   59,   74,   74,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,   14,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,   10,    0,
+        0,    0,  105,    0,    0,   61,   74,   74,   57,   53,
+
+       66,   74,   74,   74,   74,  109,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-       14,   93,   91,    0,    0,  101,    0,    0,    0,    0,
-        1,    0,    0,   73,   51,   73,   73,   63,   64,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,  105,    0,
-       96,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-       73,   61,   62,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,   13,   95,   93,    0,    0,  103,    0,    0,
+        0,    0,    0,   74,   52,   74,   74,   64,   65,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,   55,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,  102,    2,
+      107,    0,   98,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,   74,   62,   63,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,   56,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
-        0,    0,   95,    0,    0,    0,    0,   87,    0,    0,
-        0,    0,    0,    9,    0,    0,    0,    0,    0,    0,
-        4,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,   86,    0,    0,    0,    0,    0,   99,
-        0,    0,    0,    0,   83,    0,    0,    0,    0,    0,
-        0,    0,    8,    0,    0,   85,    0,    0,   94,  100,
-       97,    0,   82,    0,    0,    0,   98,    0,    0,    0,
-       84,    0,   88,   89,    0
+        0,    0,    0,    0,    0,  104,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+       97,    0,    0,    0,    0,    0,   88,    0,    0,    0,
+        0,    0,    8,    0,    0,    0,    0,   16,    0,    0,
+        0,    0,    3,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,   17,    0,    0,   87,    0,    0,
+        0,    0,    0,  101,    0,    0,    0,    0,   84,    0,
+        0,    0,    0,    0,    0,    0,    0,    7,    0,    0,
+       86,   90,    0,    0,   96,  102,   99,    0,   83,    0,
+        0,    0,  100,    0,    0,    0,   85,    0,   89,   91,
+
+        0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -505,187 +509,193 @@ static yyconst flex_int32_t yy_meta[66] =
         3,    3,    3,    3,    1
     } ;
 
-static yyconst flex_int16_t yy_base[784] =
+static yyconst flex_int16_t yy_base[810] =
     {   0,
-        0,   64, 1646,   65,   64,   66, 1648, 1650, 1650, 1650,
-       70,   73,   68,   73,   80,   84,   88, 1632,   79,   96,
+        0,   64, 1674,   65,   64,   66, 1676, 1678, 1678, 1678,
+       70,   73,   68,   73,   80,   84,   88, 1660,   79,   96,
       100,  103,  111,  106,  115,  128,  118,  131,  134,  138,
-      141,  163,  171,  145,  177,  180, 1581,   94,  220, 1650,
-     1650, 1625, 1650, 1650, 1632,  131, 1650,  130, 1650,  183,
-      205,  152,  195,  248,  155,  261,  167, 1650,    0, 1650,
-        0, 1650,  198,  253,  266,  271,  274,  277,  280,  288,
+      141,  163,  171,  145,  177,  180, 1609,   94,  220, 1678,
+     1678, 1653, 1678, 1678, 1660,  131, 1678,  130, 1678,  183,
+      205,  152,  195,  248,  155,  261,  167, 1678,    0, 1678,
+        0, 1678,  198,  253,  266,  271,  274,  277,  280,  288,
       291,  294,  297,  300,  303,  310,  313,  317,  320,  325,
       328,  331,  334,  342,  347,  361,  366,  375,  370,  380,
-      383,  386, 1650,  219,  420, 1599, 1618,   49, 1586,  105,
+      383,  386, 1678,  219,  420, 1627, 1646,   49,  113,  130,
 
-     1594,  177,  354, 1589,  314, 1582,  354, 1595,  147,  150,
-     1582, 1585, 1580, 1650,  399,  443,  221,  171,  411,  448,
+     1623,  177,  354, 1618,  314, 1611,  354, 1624, 1619,  121,
+     1610, 1613, 1608, 1678,  399,  443,  190,  220,  411,  448,
         0,    0,  405,  453,  456,  460,  463,  466,  469,  472,
       475,  478,  481,  486,  489,  492,  495,  499,  503,  518,
       508,  521,  529,  532,  535,  538,  543,  546,  556,  561,
-      566,  569,  573,  217,  148,  204, 1581, 1608, 1581, 1586,
-     1607, 1573,  349, 1583, 1581,  223, 1583,  231, 1565, 1650,
-     1567, 1578, 1577,  371, 1561, 1574, 1559, 1573, 1574, 1557,
-     1568, 1563, 1581, 1552, 1557, 1553, 1558, 1550, 1561,  576,
-      589,  596,  593,  606,  609,  621,  624,  627,  631,  636,
-
-      639,  642,  645,  648,  651,  654,  658,  661,  667,  673,
-      676,  684,  694,  700,  704,  707,  711,  722,  725,  728,
-      264, 1561, 1548, 1558, 1556, 1555, 1555, 1543,  235, 1534,
-     1650, 1650, 1551, 1541, 1536, 1542, 1536, 1574, 1536, 1538,
-     1543, 1542, 1531, 1537, 1525, 1534, 1532, 1523, 1522,  343,
-     1522,  400, 1561, 1532, 1531, 1517, 1516, 1650,  731,  737,
-      743,  753,  756,  746,  759,  764,  776,  779,  783,  786,
-      789,  792,  795,  801,  804,  807,  811,  814,  817,  820,
-      823,  826,  842,  852,  856,  859, 1516, 1513, 1514, 1512,
-     1510, 1514, 1513, 1521, 1516, 1509, 1507, 1503, 1516, 1519,
-
-     1505, 1502, 1498, 1503, 1509, 1509, 1499, 1501, 1497, 1499,
-     1503, 1525, 1494, 1483, 1500, 1490, 1488, 1488, 1490,  416,
-     1523, 1480,  862,  874,  865,  884,  900,  905,  879,  908,
-      913,  916,  919,  922,  926,  929,  932,  935,  938,  941,
-      949,  952,  956,  962, 1487, 1480,  951, 1485, 1478, 1483,
-     1477, 1479, 1473, 1472, 1473, 1487, 1467, 1482, 1467, 1480,
-     1466, 1473, 1477, 1476, 1474, 1465, 1472, 1462, 1462, 1465,
-     1455, 1495, 1492, 1452, 1465, 1459, 1453, 1461, 1451, 1463,
-      965,  981,  991,  994,  999,  968, 1002, 1012, 1015, 1018,
-     1023, 1029, 1033, 1038, 1041, 1044, 1049, 1052, 1055, 1058,
-
-     1061, 1064, 1458, 1485, 1453, 1455, 1454, 1442, 1452, 1447,
-     1446, 1436, 1446, 1443, 1446, 1445, 1433, 1443, 1442, 1650,
-     1441, 1440, 1433, 1449, 1465,  541, 1440, 1463, 1423, 1429,
-     1419, 1428, 1421, 1422, 1424, 1427, 1418, 1426, 1428, 1424,
-     1416, 1069, 1072, 1075, 1090, 1094, 1097, 1100, 1103, 1106,
-     1117, 1125, 1128, 1133, 1136, 1139, 1142, 1145, 1148, 1650,
-     1412, 1424, 1423, 1416, 1413, 1650, 1403, 1416,  312, 1650,
-     1405, 1414, 1650, 1440, 1400, 1650, 1650, 1650, 1410, 1391,
-     1399, 1398, 1406, 1399, 1395, 1396, 1389, 1397, 1391, 1400,
-     1394, 1388, 1650, 1396, 1395, 1395, 1393, 1420, 1151, 1156,
-
-     1160, 1163, 1166, 1178, 1181, 1189, 1192, 1195, 1201, 1204,
-     1207, 1214, 1392, 1379, 1390, 1416, 1374, 1386, 1389, 1373,
-     1374, 1374,  342, 1372, 1368, 1650, 1369, 1379, 1378, 1380,
-     1397, 1375, 1361, 1368, 1375, 1362, 1369, 1355, 1359, 1650,
-     1650, 1366, 1650, 1369, 1219, 1222, 1229, 1232, 1235, 1238,
-     1245, 1249, 1252, 1256, 1259, 1266, 1269, 1364, 1392, 1391,
-     1352, 1360, 1377, 1345, 1348,  408, 1650, 1347, 1355, 1355,
-     1353, 1352, 1351, 1350, 1350, 1338, 1320, 1650, 1322, 1301,
-     1334, 1650, 1282, 1281, 1281, 1274, 1272, 1278, 1287, 1290,
-     1293, 1296, 1299, 1302, 1305, 1308, 1650, 1268, 1267, 1261,
-
-     1277, 1237, 1245, 1233, 1225, 1209, 1228, 1210, 1205, 1219,
-     1650, 1650, 1650, 1189, 1183, 1650, 1169, 1170, 1142, 1148,
-     1650, 1167, 1140, 1313, 1320, 1325, 1333, 1336, 1339, 1133,
-     1132, 1111, 1104, 1088, 1087, 1095, 1082, 1067, 1650, 1077,
-     1650, 1065, 1040, 1042, 1042, 1033, 1044, 1021, 1002,  997,
-     1345, 1348, 1351,  989,  984,  961,  972,  957,  979,  930,
-      972,  942,  940,  938,  964,  910,  899,  914,  908,  863,
-      868,  861, 1358,  859,  857,  881,  850,  835,  828,  825,
-      828,  860,  803,  812,  802,  810,  808,  790, 1650, 1650,
-      801,  789,  787,  786,  786,  794,  763,  763,  738,  739,
-
-      724,  760, 1650,  727,  715,  692,  700, 1650,  727,  726,
-      712,  684,  670, 1650,  665,  706,  649,  657,  646,  653,
-     1650,  647,  637,  636,  634,  620,  628,  627,  592,  585,
-      568,  578,  577, 1650,  558,  556,  564,  551,  548, 1650,
-      532,  540,  537,  556, 1650,  523,  509,  543,  505,  489,
-      488,  481, 1650,  476,  461, 1650,  441,  394, 1650, 1650,
-     1650,  390, 1650,  369,  355,  343, 1650,  197,  189,  108,
-     1650,   57, 1650, 1650, 1650, 1370, 1374, 1378, 1382, 1384,
-     1386, 1390,   74
+      566,  569,  573,  217, 1615,  311,  389,  204, 1608, 1609,
+     1614, 1635, 1601,  349, 1608, 1610, 1608,  187, 1610,  231,
+     1592, 1678, 1594,  317, 1605,  371, 1589, 1602, 1587, 1601,
+      474, 1586, 1597, 1592, 1582, 1587, 1583, 1588, 1580, 1591,
+      576,  589,  596,  593,  606,  609,  621,  624,  627,  631,
+
+      636,  639,  642,  645,  648,  651,  654,  658,  661,  667,
+      673,  676,  684,  694,  700,  704,  707,  711,  722,  725,
+      728,  264, 1591, 1590, 1577, 1587, 1585, 1584, 1584, 1572,
+      153, 1563, 1584, 1678, 1678, 1579, 1569, 1564, 1570, 1564,
+     1602, 1564, 1566, 1558, 1570, 1569, 1558, 1564, 1552, 1561,
+     1559, 1550, 1560, 1548,  562, 1548, 1587, 1558, 1557, 1543,
+     1542, 1678,  731,  737,  743,  753,  756,  746,  759,  764,
+      776,  779,  783,  786,  789,  792,  795,  801,  804,  807,
+      811,  814,  817,  820,  823,  826,  842,  852,  856,  859,
+     1542, 1539, 1540, 1538, 1536, 1540, 1539, 1547, 1542, 1531,
+
+     1534, 1532, 1528, 1541, 1544, 1530, 1527, 1523, 1532, 1527,
+     1533, 1533, 1523, 1525, 1521, 1523, 1527, 1523, 1548, 1517,
+     1506, 1523, 1513, 1515,  411, 1548, 1505,  862,  874,  865,
+      884,  900,  905,  879,  908,  913,  916,  919,  922,  926,
+      929,  932,  935,  938,  941,  949,  952,  956,  962, 1512,
+     1505,  951, 1510, 1503, 1508, 1502, 1504, 1505, 1497, 1496,
+     1497, 1511, 1491, 1506, 1491, 1504, 1506, 1489, 1496, 1500,
+     1499, 1497, 1488, 1495, 1485, 1485, 1484, 1487, 1477, 1517,
+     1489, 1483, 1477, 1485, 1475, 1487,  965,  981,  991,  994,
+      999,  968, 1002, 1012, 1015, 1018, 1023, 1029, 1033, 1038,
+
+     1041, 1044, 1049, 1052, 1055, 1058, 1061, 1064, 1482, 1509,
+     1477, 1479, 1478, 1466, 1476, 1471, 1470, 1460, 1470, 1458,
+     1466, 1469, 1468, 1456, 1466, 1465, 1678, 1464, 1457, 1462,
+     1455, 1471, 1487,  431, 1462, 1485, 1445, 1678, 1451, 1441,
+     1450, 1443, 1451, 1442, 1450, 1452, 1448, 1440, 1069, 1072,
+     1075, 1090, 1094, 1097, 1100, 1103, 1106, 1117, 1125, 1128,
+     1133, 1136, 1139, 1142, 1145, 1148, 1678, 1436, 1448, 1447,
+     1440, 1437, 1678, 1427, 1440,  258, 1678,  535, 1429, 1438,
+     1678, 1464, 1424, 1678, 1678, 1430, 1678, 1433, 1414, 1422,
+     1421, 1429, 1422, 1418, 1419, 1412, 1420, 1414, 1423, 1678,
+
+     1421, 1420, 1420, 1418, 1445, 1151, 1156, 1160, 1163, 1166,
+     1178, 1181, 1189, 1192, 1195, 1201, 1204, 1207, 1214, 1417,
+     1404, 1415, 1441, 1399, 1411, 1414, 1398, 1399, 1407, 1392,
+     1397,  391, 1395, 1391, 1390, 1678, 1391, 1401, 1400, 1402,
+     1419, 1397, 1383, 1390, 1397, 1384, 1391, 1678, 1678, 1390,
+     1678, 1393, 1219, 1222, 1229, 1232, 1235, 1238, 1245, 1249,
+     1252, 1256, 1259, 1266, 1269, 1388, 1416, 1415, 1376, 1384,
+     1401, 1369, 1372,  575, 1367, 1369, 1678, 1369, 1377, 1377,
+     1375, 1378, 1373, 1372, 1371, 1371, 1361, 1368, 1678, 1371,
+     1360, 1393, 1678, 1353, 1350, 1272, 1278, 1287, 1290, 1293,
+
+     1296, 1299, 1302, 1305, 1308, 1678, 1348, 1347, 1346, 1388,
+     1349, 1357, 1349, 1341, 1336, 1357, 1352, 1353, 1354, 1349,
+     1374, 1307, 1678, 1678, 1678, 1318, 1309, 1678, 1300, 1291,
+     1284, 1320, 1289, 1313, 1320, 1325, 1333, 1336, 1339, 1281,
+     1280, 1267, 1234, 1247, 1246, 1251, 1242, 1217, 1213, 1195,
+     1678, 1206, 1678, 1182, 1185, 1170, 1169, 1170, 1139, 1149,
+     1130, 1135, 1345, 1348, 1351, 1133, 1132, 1106, 1117, 1073,
+     1104, 1066, 1107, 1077, 1058, 1061, 1051, 1049, 1037, 1073,
+     1029, 1020, 1015, 1000,  991,  985, 1358,  974,  973,  999,
+      960,  942,  935,  932,  934,  965,  926,  906,  900,  910,
+
+      900,  866,  868,  865,  846, 1678,  857,  842,  840,  830,
+      828,  835,  834,  833,  814,  816,  802,  809,  794,  831,
+     1678,  829,  801,  798,  784,  791, 1678,  822,  791,  790,
+      739,  724, 1678,  719,  760,  714,  716, 1678,  705,  695,
+      690,  698, 1678,  680,  674,  672,  670,  669,  661,  684,
+      649,  644,  639,  646, 1678,  646,  644, 1678,  620,  620,
+      600,  599,  595, 1678,  571,  578,  577,  595, 1678,  550,
+      541,  528,  556,  518,  515,  513,  506, 1678,  489,  471,
+     1678, 1678,  504,  404, 1678, 1678, 1678,  384, 1678,  343,
+      292,  288, 1678,  250,  222,  108, 1678,   57, 1678, 1678,
+
+     1678, 1370, 1374, 1378, 1382, 1384, 1386, 1390,   74
     } ;
 
-static yyconst flex_int16_t yy_def[784] =
+static yyconst flex_int16_t yy_def[810] =
     {   0,
-      775,    1,  776,  776,  777,  777,  775,  775,  775,  775,
-      778,  779,  775,  780,  775,  775,  775,  775,  781,  781,
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  781,  781,  781,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  778,  775,  779,  775,  775,
-      775,  780,  780,  780,  780,  780,  780,  775,  782,  775,
-      783,  775,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  775,  775,  775,  775,  775,  775,  775,  775,
-
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  780,  775,  780,  780,
-      782,  783,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  781,  781,
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  781,  781,  781,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  781,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-
-      781,  781,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  781,  781,
-
-      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
-      781,  781,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  781,  781,  781,  781,  781,  781,
-      781,  781,  781,  781,  781,  781,  781,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  781,  781,  781,  781,
-      781,  781,  781,  781,  781,  781,  775,  775,  775,  775,
-
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  781,  781,  781,  781,  781,  781,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      781,  781,  781,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  781,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,    0,  775,  775,  775,  775,  775,
-      775,  775,  775
+      801,    1,  802,  802,  803,  803,  801,  801,  801,  801,
+      804,  805,  801,  806,  801,  801,  801,  801,  807,  807,
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  807,  807,  807,  807,  807,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  804,  801,  805,  801,  801,
+      801,  806,  806,  806,  806,  806,  806,  801,  808,  801,
+      809,  801,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  807,  801,  801,  801,  801,  801,  801,  801,  801,
+
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  806,  801,  806,  806,
+      808,  809,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  807,  807,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  807,  807,  807,  807,  807,  807,  807,  807,  807,
+
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  807,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  807,  807,  807,
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  807,  807,  807,  807,
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  807,
+
+      807,  807,  807,  807,  807,  807,  807,  807,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  807,  807,
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  807,  807,  807,  807,  807,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+
+      801,  801,  801,  801,  801,  807,  807,  807,  807,  807,
+      807,  807,  807,  807,  807,  807,  807,  807,  807,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  807,  807,  807,  807,  807,  807,  807,  807,
+      807,  807,  807,  807,  807,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  807,  807,  807,  807,  807,
+
+      807,  807,  807,  807,  807,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  807,  807,  807,  807,  807,  807,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  807,  807,  807,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  807,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+
+        0,  801,  801,  801,  801,  801,  801,  801,  801
     } ;
 
-static yyconst flex_int16_t yy_nxt[1716] =
+static yyconst flex_int16_t yy_nxt[1744] =
     {   0,
         8,    9,   10,    9,   11,    8,   12,    8,    8,   13,
        14,   15,   16,   17,   18,   19,   19,   19,   19,   19,
@@ -694,191 +704,194 @@ static yyconst flex_int16_t yy_nxt[1716] =
        19,   19,   22,   23,   24,   25,   26,   19,   19,   27,
        19,   28,   19,   29,   30,   31,   19,   32,   33,   34,
        35,   36,   19,   19,   37,   38,   44,   41,   44,   39,
-       42,   45,   47,   45,   47,   49,  162,  122,   50,   49,
+       42,   45,   47,   45,   47,   49,  163,  122,   50,   49,
        51,   51,   52,   53,   52,   54,   54,   58,   52,   55,
        52,   59,   56,   57,   50,   94,   51,   51,   50,   95,
 
-       51,   51,  774,  163,   60,   52,   55,   52,   60,   52,
+       51,   51,  800,  164,   60,   52,   55,   52,   60,   52,
        55,   52,   52,   55,   52,   52,   55,   52,   56,   57,
        52,   55,   52,   65,   52,   55,   52,   52,   55,   52,
        60,   64,   49,   47,   60,   47,   49,   52,   55,   52,
        52,   55,   52,   52,   55,   52,   61,   52,   55,   52,
-       52,   55,   52,  773,   52,   55,   52,   66,  165,   67,
+       52,   55,   52,  799,   52,   55,   52,   66,  165,   67,
        70,   52,   68,   52,   52,   69,   52,  166,   71,   73,
-      183,   75,   52,   55,   52,   77,   52,   72,   52,   74,
-       52,   55,   52,  190,  190,   76,   52,   55,   52,   52,
-       55,   52,  184,   78,  168,  115,  115,   79,   89,  185,
-
-       80,  165,  116,   60,   52,  117,   52,   52,   55,   52,
-      222,   81,   82,  186,   83,   50,   85,   51,   51,   86,
-       94,   84,  169,   92,   95,   60,   90,   87,  116,   60,
-       52,   91,   52,  772,   88,   96,   97,   98,   99,  100,
-      101,  102,  771,  103,  162,  223,  104,  105,  236,  106,
-      107,   60,  108,  109,  110,  111,  112,   52,  224,   52,
-       54,   54,   52,   55,   52,  237,  233,   56,   57,  118,
-      119,  221,   52,  120,  120,   52,   55,   52,  234,  123,
+      186,   75,   52,   55,   52,   77,   52,   72,   52,   74,
+       52,   55,   52,  167,  187,   76,   52,   55,   52,   52,
+       55,   52,  168,   78,  170,  115,  115,   79,   89,   52,
+
+       80,   52,  116,   60,   52,  117,   52,   52,   55,   52,
+      297,   81,   82,  298,   83,   50,   85,   51,   51,   86,
+       94,   84,  171,   92,   95,   60,   90,   87,  116,   60,
+      236,   91,  191,  191,   88,   96,   97,   98,   99,  100,
+      101,  102,  237,  103,  163,  225,  104,  105,  239,  106,
+      107,   60,  108,  109,  110,  111,  112,   52,  226,   52,
+       54,   54,   52,   55,   52,  240,  798,   56,   57,  118,
+      119,  222,   52,  120,  120,   52,   55,   52,  527,  123,
        52,   55,   52,   52,   55,   52,   52,   55,   52,   52,
-       55,   52,  293,   56,   57,  294,  124,   52,   55,   52,
+       55,   52,  528,   56,   57,  797,  124,   52,   55,   52,
 
        52,   55,   52,   52,   55,   52,   52,   55,   52,   52,
-       55,   52,   52,   55,   52,  126,  228,  287,  127,   52,
+       55,   52,   52,   55,   52,  126,  230,  291,  127,   52,
        55,   52,   52,   55,   52,  125,   52,   55,   52,   52,
-       55,   52,  520,  128,   52,   55,   52,   52,   55,   52,
-       52,   55,   52,   52,   55,   52,  521,  129,  132,  131,
-      130,   52,   55,   52,  133,  174,   52,   55,   52,  175,
-      568,  134,  137,  135,  569,  136,  313,  140,  176,  138,
-       52,   55,   52,  314,  139,   52,   55,   52,  142,   52,
-       55,   52,  141,  144,   52,   55,   52,  770,  143,   52,
+       55,   52,  796,  128,   52,   55,   52,   52,   55,   52,
+       52,   55,   52,   52,   55,   52,  795,  129,  132,  131,
+      130,   52,   55,   52,  133,  176,   52,   55,   52,  177,
+      243,  134,  137,  135,  167,  136,  244,  140,  178,  138,
+       52,   55,   52,  223,  139,   52,   55,   52,  142,   52,
+       55,   52,  141,  144,   52,   55,   52,  794,  143,   52,
        55,   52,   52,   55,   52,   52,   55,   52,  145,  146,
 
-      170,  228,  229,  178,  230,  179,  171,  172,  180,  769,
-      181,  115,  115,  768,   52,   55,   52,  147,  116,   60,
-       52,  242,   52,  120,  120,  148,  243,  150,  316,  317,
-      149,  191,  152,  377,  153,  767,  151,  154,  378,  155,
-      101,  605,  606,  103,  116,   60,  104,  156,  766,  106,
-      157,  118,  118,  158,  159,  190,  190,   52,  765,   52,
+      172,  230,  231,  180,  232,  181,  173,  174,  182,  578,
+      183,  115,  115,  579,   52,   55,   52,  147,  116,   60,
+       52,  246,   52,  120,  120,  148,  247,  150,  383,  793,
+      149,  192,  152,  384,  153,  172,  151,  154,  155,  156,
+      101,  173,  224,  157,  116,   60,  104,  158,  491,  106,
+      159,  118,  118,  492,  160,  191,  191,   52,  792,   52,
       120,  120,   52,   55,   52,   52,   55,   52,   57,   52,
        55,   52,   52,   55,   52,   52,   55,   52,   52,   55,
        52,   52,   55,   52,   52,   55,   52,   52,   55,   52,
-       52,   55,   52,  192,   57,   52,   55,   52,   52,   55,
+       52,   55,   52,  193,   57,   52,   55,   52,   52,   55,
 
-       52,   52,   55,   52,   52,   55,   52,  193,   52,   55,
-       52,  197,   52,   55,   52,  764,  194,   52,   55,   52,
-      195,  763,  201,  196,  198,  762,  199,   52,   55,   52,
-       52,   55,   52,  761,  760,  200,  202,  203,   52,   55,
+       52,   52,   55,   52,   52,   55,   52,  194,   52,   55,
+       52,  198,   52,   55,   52,  252,  195,   52,   55,   52,
+      196,  791,  202,  197,  199,  790,  200,   52,   55,   52,
+       52,   55,   52,  253,  789,  201,  203,  204,   52,   55,
        52,   52,   55,   52,   52,   55,   52,   52,   55,   52,
-      759,  204,   52,   55,   52,   52,   55,   52,  482,  205,
-      758,  206,  757,  483,  208,   52,   55,   52,  756,  207,
-       52,   55,   52,  755,  209,   52,   55,   52,   52,   55,
-       52,  754,   52,   55,   52,  753,  752,  210,  190,  190,
-      211,  215,  751,  213,  212,  750,   60,  214,   52,   55,
-
-       52,  216,   52,   55,   52,   52,   55,   52,  749,  748,
-      217,  259,  747,  219,  220,   52,   55,   52,   52,   55,
-       52,  746,   60,  745,  218,  744,  260,  261,  262,  263,
-       52,   55,   52,   52,   55,   52,   52,   55,   52,  743,
-       52,   55,   52,  742,  741,   52,   55,   52,   52,   55,
+      788,  205,   52,   55,   52,   52,   55,   52,  787,  206,
+      786,  207,  529,  785,  209,   52,   55,   52,  530,  208,
+       52,   55,   52,  784,  210,   52,   55,   52,   52,   55,
+       52,  783,   52,   55,   52,  320,  782,  211,  191,  191,
+      212,  216,  321,  214,  213,  781,   60,  215,   52,   55,
+
+       52,  217,   52,   55,   52,   52,   55,   52,  614,  615,
+      218,  263,  780,  220,  221,   52,   55,   52,   52,   55,
+       52,  779,   60,  778,  219,  777,  264,  265,  266,  267,
+       52,   55,   52,   52,   55,   52,   52,   55,   52,  776,
+       52,   55,   52,  775,  774,   52,   55,   52,   52,   55,
        52,   52,   55,   52,   52,   55,   52,   52,   55,   52,
-       52,   55,   52,   52,   55,   52,  264,   52,   55,   52,
-       52,   55,   52,  740,  739,  266,   52,   55,   52,  265,
-      267,  268,   52,   55,   52,   52,   55,   52,  738,  271,
-      737,  736,  272,   52,   55,   52,  735,  269,  734,  273,
-
-      733,  732,  270,   52,   55,   52,  731,  274,  276,   52,
-       55,   52,  277,   52,   55,   52,   52,   55,   52,  275,
-       52,   55,   52,  730,  729,  279,  728,  280,  727,  726,
-      278,   52,   55,   52,   52,   55,   52,   52,   55,   52,
-       52,   55,   52,  725,  724,  281,   52,   55,   52,  723,
-      722,  283,   52,   55,   52,   52,   55,   52,  284,  323,
-      721,  282,   52,   55,   52,   52,   55,   52,   52,   55,
-       52,  720,  325,   52,   55,   52,  324,  719,  718,  327,
-      717,  285,  328,  716,  286,   52,   55,   52,   52,   55,
-       52,  326,   52,   55,   52,   52,   55,   52,   52,   55,
-
-       52,   52,   55,   52,   52,   55,   52,  715,  714,  329,
-       52,   55,   52,   52,   55,   52,   52,   55,   52,  330,
+       52,   55,   52,   52,   55,   52,  268,   52,   55,   52,
+       52,   55,   52,  773,  772,  270,   52,   55,   52,  269,
+      271,  272,   52,   55,   52,   52,   55,   52,  771,  275,
+      770,  769,  276,   52,   55,   52,  768,  273,  767,  277,
+
+      766,  765,  274,   52,   55,   52,  764,  278,  280,   52,
+       55,   52,  281,   52,   55,   52,   52,   55,   52,  279,
+       52,   55,   52,  763,  762,  283,  761,  284,  760,  759,
+      282,   52,   55,   52,   52,   55,   52,   52,   55,   52,
+       52,   55,   52,  758,  757,  285,   52,   55,   52,  756,
+      755,  287,   52,   55,   52,   52,   55,   52,  288,  328,
+      754,  286,   52,   55,   52,   52,   55,   52,   52,   55,
+       52,  753,  330,   52,   55,   52,  329,  752,  751,  332,
+      750,  289,  333,  749,  290,   52,   55,   52,   52,   55,
+       52,  331,   52,   55,   52,   52,   55,   52,   52,   55,
+
+       52,   52,   55,   52,   52,   55,   52,  748,  747,  334,
+       52,   55,   52,   52,   55,   52,   52,   55,   52,  335,
        52,   55,   52,   52,   55,   52,   52,   55,   52,   52,
-       55,   52,   52,   55,   52,   52,   55,   52,  334,  713,
-      712,  331,  711,  710,  335,  709,  708,  332,  707,  706,
-      333,   52,   55,   52,  705,  337,  704,  703,  336,  702,
-      338,   52,   55,   52,  340,   52,   55,   52,   52,   55,
-       52,   52,   55,   52,   52,   55,   52,  701,  339,  700,
-      699,  388,  698,   52,   55,   52,  697,  341,   52,   55,
-       52,  382,  383,   52,   55,   52,  696,  343,  695,  344,
-
-      384,  381,  694,  385,  693,  342,  692,  386,  387,   52,
-       55,   52,  691,  389,   52,   55,   52,   52,   55,   52,
-      690,  390,   52,   55,   52,   52,   55,   52,   52,   55,
-       52,   52,   55,   52,  391,   52,   55,   52,   52,   55,
+       55,   52,   52,   55,   52,   52,   55,   52,  339,  746,
+      745,  336,  744,  743,  340,  742,  741,  337,  740,  739,
+      338,   52,   55,   52,  738,  342,  737,  736,  341,  735,
+      343,   52,   55,   52,  345,   52,   55,   52,   52,   55,
+       52,   52,   55,   52,   52,   55,   52,  734,  344,  733,
+      732,  394,  731,   52,   55,   52,  730,  346,   52,   55,
+       52,  388,  389,   52,   55,   52,  729,  348,  728,  349,
+
+      390,  387,  727,  391,  726,  347,  725,  392,  393,   52,
+       55,   52,  724,  395,   52,   55,   52,   52,   55,   52,
+      723,  396,   52,   55,   52,   52,   55,   52,   52,   55,
+       52,   52,   55,   52,  397,   52,   55,   52,   52,   55,
        52,   52,   55,   52,   52,   55,   52,   52,   55,   52,
-       52,   55,   52,  689,  393,  688,  687,  392,   52,   55,
-       52,   52,   55,   52,  395,   52,   55,   52,  405,  686,
-      394,   52,   55,   52,   52,   55,   52,   52,   55,   52,
-      396,  685,  684,  406,  407,  683,  397,  682,  408,  681,
-       52,   55,   52,  680,  447,  399,  443,  400,  442,  398,
-
-       52,   55,   52,   52,   55,   52,  679,  401,   52,   55,
-       52,   52,   55,   52,  444,  446,  678,  445,  677,  676,
-      402,   52,   55,   52,   52,   55,   52,   52,   55,   52,
-      675,  451,   52,   55,   52,  674,  450,  448,   52,   55,
-       52,  449,   52,   55,   52,  672,  452,   52,   55,   52,
-       52,   55,   52,   52,   55,   52,  671,  453,   52,   55,
+       52,   55,   52,  722,  399,  721,  720,  398,   52,   55,
+       52,   52,   55,   52,  401,   52,   55,   52,  411,  719,
+      400,   52,   55,   52,   52,   55,   52,   52,   55,   52,
+      402,  718,  717,  412,  413,  716,  403,  715,  414,  714,
+       52,   55,   52,  713,  454,  405,  450,  406,  449,  404,
+
+       52,   55,   52,   52,   55,   52,  712,  407,   52,   55,
+       52,   52,   55,   52,  451,  453,  711,  452,  710,  709,
+      408,   52,   55,   52,   52,   55,   52,   52,   55,   52,
+      708,  458,   52,   55,   52,  707,  457,  455,   52,   55,
+       52,  456,   52,   55,   52,  706,  459,   52,   55,   52,
+       52,   55,   52,   52,   55,   52,  705,  460,   52,   55,
        52,   52,   55,   52,   52,   55,   52,   52,   55,   52,
-       52,   55,   52,   52,   55,   52,  455,  670,   52,   55,
-       52,   52,   55,   52,   52,   55,   52,  454,  669,  457,
-      668,  667,  501,  666,  456,  499,  665,  458,  500,   52,
-
-       55,   52,  459,   52,   55,   52,   52,   55,   52,   52,
-       55,   52,   52,   55,   52,   52,   55,   52,  503,  664,
-      504,  663,  662,  502,  661,  507,   52,   55,   52,  660,
-      505,  659,  658,  506,   52,   55,   52,   52,   55,   52,
-      509,  508,   52,   55,   52,   52,   55,   52,   52,   55,
+       52,   55,   52,   52,   55,   52,  462,  704,   52,   55,
+       52,   52,   55,   52,   52,   55,   52,  461,  703,  464,
+      702,  701,  508,  700,  463,  506,  699,  465,  507,   52,
+
+       55,   52,  466,   52,   55,   52,   52,   55,   52,   52,
+       55,   52,   52,   55,   52,   52,   55,   52,  510,  698,
+      511,  697,  696,  509,  695,  514,   52,   55,   52,  694,
+      512,  693,  692,  513,   52,   55,   52,   52,   55,   52,
+      516,  515,   52,   55,   52,   52,   55,   52,   52,   55,
        52,   52,   55,   52,   52,   55,   52,   52,   55,   52,
-       52,   55,   52,  657,  656,   52,   55,   52,  510,   52,
-       55,   52,   52,   55,   52,   52,   55,   52,  655,  654,
-      545,  511,  546,  650,  649,  549,  512,   52,   55,   52,
-       52,   55,   52,  648,  547,  550,  647,  548,   52,   55,
-
-       52,   52,   55,   52,   52,   55,   52,  551,  552,  553,
-       52,   55,   52,   52,   55,   52,   52,   55,   52,  646,
-      645,  556,  557,   52,   55,   52,  644,  555,   52,   55,
-       52,   52,   55,   52,  643,  554,  642,  588,   52,   55,
+       52,   55,   52,  691,  690,   52,   55,   52,  517,   52,
+       55,   52,   52,   55,   52,   52,   55,   52,  689,  688,
+      553,  518,  554,  686,  685,  557,  519,   52,   55,   52,
+       52,   55,   52,  684,  555,  558,  683,  556,   52,   55,
+
+       52,   52,   55,   52,   52,   55,   52,  559,  560,  561,
+       52,   55,   52,   52,   55,   52,   52,   55,   52,  682,
+      681,  564,  565,   52,   55,   52,  680,  563,   52,   55,
+       52,   52,   55,   52,  679,  562,  678,  597,   52,   55,
        52,   52,   55,   52,   52,   55,   52,   52,   55,   52,
-      641,  640,  589,  587,   52,   55,   52,  590,   52,   55,
-       52,   52,   55,   52,  591,   52,   55,   52,   52,   55,
-       52,  639,  638,  593,  594,   52,   55,   52,   52,   55,
-       52,   52,   55,   52,  637,  636,  592,   52,   55,   52,
-      635,  634,  596,  633,  624,  595,   52,   55,   52,   52,
+      677,  676,  598,  596,   52,   55,   52,  599,   52,   55,
+       52,   52,   55,   52,  600,   52,   55,   52,   52,   55,
+       52,  675,  674,  602,  603,   52,   55,   52,   52,   55,
+       52,   52,   55,   52,  673,  672,  601,   52,   55,   52,
+      671,  670,  605,  669,  634,  604,   52,   55,   52,   52,
 
        55,   52,   52,   55,   52,   52,   55,   52,   52,   55,
        52,   52,   55,   52,   52,   55,   52,   52,   55,   52,
-      632,  625,   52,   55,   52,  627,  631,  630,  626,   52,
-       55,   52,  623,  628,   52,   55,   52,  622,  621,  651,
-      620,  629,   52,   55,   52,   52,   55,   52,   52,   55,
-       52,  619,  618,  652,   52,   55,   52,   52,   55,   52,
-       52,   55,   52,  617,  673,  616,  653,   52,   55,   52,
+      668,  635,   52,   55,   52,  637,  667,  666,  636,   52,
+       55,   52,  662,  638,   52,   55,   52,  661,  660,  663,
+      659,  639,   52,   55,   52,   52,   55,   52,   52,   55,
+       52,  658,  657,  664,   52,   55,   52,   52,   55,   52,
+       52,   55,   52,  656,  687,  655,  665,   52,   55,   52,
        40,   40,   40,   40,   43,   43,   43,   43,   46,   46,
        46,   46,   48,   48,   48,   48,   55,   55,   63,   63,
-      121,  615,  121,  121,  614,  613,  612,  611,  610,  609,
-
-      608,  607,  604,  603,  602,  601,  600,  599,  598,  597,
-      586,  585,  584,  583,  582,  581,  580,  579,  578,  577,
-      576,  575,  574,  573,  572,  571,  570,  567,  566,  565,
-      564,  563,  562,  561,  560,  559,  558,  544,  543,  542,
-      541,  540,  539,  538,  537,  536,  535,  534,  533,  532,
-      531,  530,  529,  528,  527,  526,  525,  524,  523,  522,
-      519,  518,  517,  516,  515,  514,  513,  498,  497,  496,
-      495,  494,  493,  492,  491,  490,  489,  488,  487,  486,
-      485,  484,  481,  480,  479,  478,  477,  476,  475,  474,
-      473,  472,  471,  470,  469,  468,  467,  466,  465,  464,
-
-      463,  462,  461,  460,  441,  440,  439,  438,  437,  436,
-      435,  434,  433,  432,  431,  430,  429,  428,  427,  426,
-      425,  424,  423,  422,  421,  420,  419,  418,  417,  416,
-      415,  414,  413,  412,  411,  410,  409,  404,  403,  380,
-      379,  376,  375,  374,  373,  372,  371,  370,  369,  368,
-      367,  366,  365,  364,  363,  362,  361,  360,  359,  358,
-      357,  356,  355,  354,  353,  352,  351,  350,  349,  348,
-      347,  346,  345,  293,  322,  321,  320,  319,  318,  315,
-      312,  311,  310,  309,  308,  307,  306,  305,  304,  303,
-      302,  301,  300,  299,  298,  297,  296,  295,  292,  291,
-
-      290,  289,  288,  243,  233,  258,  257,  256,  255,  254,
-      253,  252,  251,  250,  249,  248,  247,  246,  245,  244,
-      241,  240,  239,  238,  235,  232,  231,  227,  226,  225,
-      185,  183,  179,  189,  188,  187,  182,  177,  173,  167,
-      164,  161,  160,  114,  113,   93,   62,  775,   41,    7,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775
+      121,  654,  121,  121,  653,  652,  651,  650,  649,  648,
+
+      647,  646,  645,  644,  643,  642,  641,  640,  633,  632,
+      631,  630,  629,  628,  627,  626,  625,  624,  623,  622,
+      621,  620,  619,  618,  617,  616,  613,  612,  611,  610,
+      609,  608,  607,  606,  595,  594,  593,  592,  591,  590,
+      589,  588,  587,  586,  585,  584,  583,  582,  581,  580,
+      577,  576,  575,  574,  573,  572,  571,  570,  569,  568,
+      567,  566,  552,  551,  550,  549,  548,  547,  546,  545,
+      544,  543,  542,  541,  540,  539,  538,  537,  536,  535,
+      534,  533,  532,  531,  526,  525,  524,  523,  522,  521,
+      520,  505,  504,  503,  502,  501,  500,  499,  498,  497,
+
+      496,  495,  494,  493,  490,  489,  488,  487,  486,  485,
+      484,  483,  482,  481,  480,  479,  478,  477,  476,  475,
+      474,  473,  472,  471,  470,  469,  468,  467,  448,  447,
+      446,  445,  444,  443,  442,  441,  440,  439,  438,  437,
+      436,  435,  434,  433,  432,  431,  430,  429,  428,  427,
+      426,  425,  424,  423,  422,  421,  420,  419,  418,  417,
+      416,  415,  410,  409,  386,  385,  382,  381,  380,  379,
+      378,  377,  376,  375,  374,  373,  372,  371,  370,  369,
+      368,  367,  366,  365,  364,  363,  362,  361,  360,  359,
+      358,  357,  356,  355,  354,  353,  352,  351,  350,  297,
+
+      327,  326,  325,  324,  323,  322,  319,  318,  317,  316,
+      315,  314,  313,  312,  311,  310,  309,  308,  307,  306,
+      305,  304,  303,  302,  301,  300,  299,  296,  295,  294,
+      293,  292,  247,  243,  236,  262,  261,  260,  259,  258,
+      257,  256,  255,  254,  251,  250,  249,  248,  245,  242,
+      241,  238,  235,  234,  233,  229,  228,  227,  186,  181,
+      165,  190,  189,  188,  185,  184,  179,  175,  169,  162,
+      161,  114,  113,   93,   62,  801,   41,    7,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801
     } ;
 
-static yyconst flex_int16_t yy_chk[1716] =
+static yyconst flex_int16_t yy_chk[1744] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -887,188 +900,191 @@ static yyconst flex_int16_t yy_chk[1716] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    2,    5,    4,    6,    2,
-        4,    5,   11,    6,   11,   12,   98,  783,   13,   12,
+        4,    5,   11,    6,   11,   12,   98,  809,   13,   12,
        13,   13,   14,   14,   14,   14,   14,   15,   19,   19,
        19,   15,   14,   14,   16,   38,   16,   16,   17,   38,
 
-       17,   17,  772,   98,   16,   20,   20,   20,   17,   21,
+       17,   17,  798,   98,   16,   20,   20,   20,   17,   21,
        21,   21,   22,   22,   22,   24,   24,   24,   14,   14,
        23,   23,   23,   21,   25,   25,   25,   27,   27,   27,
        16,   20,   48,   46,   17,   46,   48,   26,   26,   26,
        28,   28,   28,   29,   29,   29,   16,   30,   30,   30,
-       31,   31,   31,  770,   34,   34,   34,   22,  100,   23,
-       24,   52,   23,   52,   55,   23,   55,  100,   25,   26,
-      109,   27,   32,   32,   32,   29,   57,   25,   57,   26,
-       33,   33,   33,  118,  118,   28,   35,   35,   35,   36,
-       36,   36,  109,   30,  102,   50,   50,   31,   34,  110,
-
-       31,  155,   50,   50,   53,   53,   53,   63,   63,   63,
-      155,   32,   32,  110,   32,   51,   33,   51,   51,   33,
+       31,   31,   31,  796,   34,   34,   34,   22,   99,   23,
+       24,   52,   23,   52,   55,   23,   55,   99,   25,   26,
+      110,   27,   32,   32,   32,   29,   57,   25,   57,   26,
+       33,   33,   33,  100,  110,   28,   35,   35,   35,   36,
+       36,   36,  100,   30,  102,   50,   50,   31,   34,  117,
+
+       31,  117,   50,   50,   53,   53,   53,   63,   63,   63,
+      231,   32,   32,  231,   32,   51,   33,   51,   51,   33,
        94,   32,  102,   36,   94,   51,   35,   33,   50,   50,
-      117,   35,  117,  769,   33,   39,   39,   39,   39,   39,
-       39,   39,  768,   39,  154,  156,   39,   39,  168,   39,
-       39,   51,   39,   39,   39,   39,   39,   54,  156,   54,
-       54,   54,   64,   64,   64,  168,  166,   54,   54,   56,
-       56,  154,   56,   56,   56,   65,   65,   65,  166,   64,
+      168,   35,  118,  118,   33,   39,   39,   39,   39,   39,
+       39,   39,  168,   39,  154,  158,   39,   39,  170,   39,
+       39,   51,   39,   39,   39,   39,   39,   54,  158,   54,
+       54,   54,   64,   64,   64,  170,  795,   54,   54,   56,
+       56,  154,   56,   56,   56,   65,   65,   65,  476,   64,
        66,   66,   66,   67,   67,   67,   68,   68,   68,   69,
-       69,   69,  229,   54,   54,  229,   65,   70,   70,   70,
+       69,   69,  476,   54,   54,  794,   65,   70,   70,   70,
 
        71,   71,   71,   72,   72,   72,   73,   73,   73,   74,
-       74,   74,   75,   75,   75,   67,  221,  221,   68,   76,
+       74,   74,   75,   75,   75,   67,  222,  222,   68,   76,
        76,   76,   77,   77,   77,   66,   78,   78,   78,   79,
-       79,   79,  469,   69,   80,   80,   80,   81,   81,   81,
-       82,   82,   82,   83,   83,   83,  469,   70,   73,   72,
+       79,   79,  792,   69,   80,   80,   80,   81,   81,   81,
+       82,   82,   82,   83,   83,   83,  791,   70,   73,   72,
        71,   84,   84,   84,   74,  105,   85,   85,   85,  105,
-      523,   75,   78,   76,  523,   77,  250,   80,  105,   79,
-       86,   86,   86,  250,   79,   87,   87,   87,   82,   89,
-       89,   89,   81,   84,   88,   88,   88,  766,   83,   90,
+      174,   75,   78,   76,  156,   77,  174,   80,  105,   79,
+       86,   86,   86,  156,   79,   87,   87,   87,   82,   89,
+       89,   89,   81,   84,   88,   88,   88,  790,   83,   90,
        90,   90,   91,   91,   91,   92,   92,   92,   84,   85,
 
-      103,  163,  163,  107,  163,  107,  103,  103,  107,  765,
-      107,  115,  115,  764,  123,  123,  123,   86,  115,  115,
-      119,  174,  119,  119,  119,   87,  174,   89,  252,  252,
-       88,  123,   91,  320,   92,  762,   90,   95,  320,   95,
-       95,  566,  566,   95,  115,  115,   95,   95,  758,   95,
-       95,  116,  116,   95,   95,  116,  116,  120,  757,  120,
+      103,  164,  164,  107,  164,  107,  103,  103,  107,  532,
+      107,  115,  115,  532,  123,  123,  123,   86,  115,  115,
+      119,  176,  119,  119,  119,   87,  176,   89,  325,  788,
+       88,  123,   91,  325,   92,  157,   90,   95,   95,   95,
+       95,  157,  157,   95,  115,  115,   95,   95,  434,   95,
+       95,  116,  116,  434,   95,  116,  116,  120,  784,  120,
       120,  120,  124,  124,  124,  125,  125,  125,  120,  126,
       126,  126,  127,  127,  127,  128,  128,  128,  129,  129,
       129,  130,  130,  130,  131,  131,  131,  132,  132,  132,
       133,  133,  133,  124,  120,  134,  134,  134,  135,  135,
 
       135,  136,  136,  136,  137,  137,  137,  125,  138,  138,
-      138,  129,  139,  139,  139,  755,  126,  141,  141,  141,
-      127,  754,  133,  128,  130,  752,  131,  140,  140,  140,
-      142,  142,  142,  751,  750,  132,  135,  136,  143,  143,
+      138,  129,  139,  139,  139,  181,  126,  141,  141,  141,
+      127,  783,  133,  128,  130,  780,  131,  140,  140,  140,
+      142,  142,  142,  181,  779,  132,  135,  136,  143,  143,
       143,  144,  144,  144,  145,  145,  145,  146,  146,  146,
-      749,  137,  147,  147,  147,  148,  148,  148,  426,  138,
-      748,  139,  747,  426,  141,  149,  149,  149,  746,  140,
-      150,  150,  150,  744,  142,  151,  151,  151,  152,  152,
-      152,  743,  153,  153,  153,  742,  741,  143,  190,  190,
-      144,  148,  739,  146,  145,  738,  190,  147,  191,  191,
-
-      191,  149,  193,  193,  193,  192,  192,  192,  737,  736,
-      150,  192,  735,  152,  153,  194,  194,  194,  195,  195,
-      195,  733,  190,  732,  151,  731,  192,  192,  192,  192,
-      196,  196,  196,  197,  197,  197,  198,  198,  198,  730,
-      199,  199,  199,  729,  728,  200,  200,  200,  201,  201,
-      201,  202,  202,  202,  203,  203,  203,  204,  204,  204,
-      205,  205,  205,  206,  206,  206,  195,  207,  207,  207,
-      208,  208,  208,  727,  726,  197,  209,  209,  209,  196,
-      199,  200,  210,  210,  210,  211,  211,  211,  725,  204,
-      724,  723,  205,  212,  212,  212,  722,  201,  720,  206,
-
-      719,  718,  203,  213,  213,  213,  717,  207,  209,  214,
-      214,  214,  209,  215,  215,  215,  216,  216,  216,  208,
-      217,  217,  217,  716,  715,  211,  713,  212,  712,  711,
-      210,  218,  218,  218,  219,  219,  219,  220,  220,  220,
-      259,  259,  259,  710,  709,  213,  260,  260,  260,  707,
-      706,  216,  261,  261,  261,  264,  264,  264,  217,  259,
-      705,  214,  262,  262,  262,  263,  263,  263,  265,  265,
-      265,  704,  261,  266,  266,  266,  260,  702,  701,  263,
-      700,  218,  263,  699,  220,  267,  267,  267,  268,  268,
-      268,  262,  269,  269,  269,  270,  270,  270,  271,  271,
-
-      271,  272,  272,  272,  273,  273,  273,  698,  697,  266,
-      274,  274,  274,  275,  275,  275,  276,  276,  276,  267,
-      277,  277,  277,  278,  278,  278,  279,  279,  279,  280,
-      280,  280,  281,  281,  281,  282,  282,  282,  273,  696,
-      695,  270,  694,  693,  274,  692,  691,  271,  688,  687,
-      272,  283,  283,  283,  686,  277,  685,  684,  276,  683,
-      279,  284,  284,  284,  281,  285,  285,  285,  286,  286,
-      286,  323,  323,  323,  325,  325,  325,  682,  280,  681,
-      680,  325,  679,  324,  324,  324,  678,  283,  329,  329,
-      329,  324,  324,  326,  326,  326,  677,  285,  676,  286,
-
-      324,  323,  675,  324,  674,  284,  672,  324,  324,  327,
-      327,  327,  671,  326,  328,  328,  328,  330,  330,  330,
-      670,  327,  331,  331,  331,  332,  332,  332,  333,  333,
-      333,  334,  334,  334,  328,  335,  335,  335,  336,  336,
-      336,  337,  337,  337,  338,  338,  338,  339,  339,  339,
-      340,  340,  340,  669,  331,  668,  667,  330,  341,  341,
-      341,  342,  342,  342,  333,  343,  343,  343,  347,  666,
-      332,  344,  344,  344,  381,  381,  381,  386,  386,  386,
-      334,  665,  664,  347,  347,  663,  336,  662,  347,  661,
-      382,  382,  382,  660,  386,  341,  382,  342,  381,  340,
-
-      383,  383,  383,  384,  384,  384,  659,  343,  385,  385,
-      385,  387,  387,  387,  383,  385,  658,  384,  657,  656,
-      344,  388,  388,  388,  389,  389,  389,  390,  390,  390,
-      655,  389,  391,  391,  391,  654,  388,  387,  392,  392,
-      392,  387,  393,  393,  393,  650,  390,  394,  394,  394,
-      395,  395,  395,  396,  396,  396,  649,  391,  397,  397,
-      397,  398,  398,  398,  399,  399,  399,  400,  400,  400,
-      401,  401,  401,  402,  402,  402,  393,  648,  442,  442,
-      442,  443,  443,  443,  444,  444,  444,  392,  647,  396,
-      646,  645,  444,  644,  394,  442,  643,  398,  443,  445,
-
-      445,  445,  400,  446,  446,  446,  447,  447,  447,  448,
-      448,  448,  449,  449,  449,  450,  450,  450,  446,  642,
-      447,  640,  638,  445,  637,  450,  451,  451,  451,  636,
-      448,  635,  634,  449,  452,  452,  452,  453,  453,  453,
-      452,  451,  454,  454,  454,  455,  455,  455,  456,  456,
-      456,  457,  457,  457,  458,  458,  458,  459,  459,  459,
-      499,  499,  499,  633,  632,  500,  500,  500,  453,  501,
-      501,  501,  502,  502,  502,  503,  503,  503,  631,  630,
-      499,  455,  500,  623,  622,  503,  457,  504,  504,  504,
-      505,  505,  505,  620,  501,  504,  619,  502,  506,  506,
-
-      506,  507,  507,  507,  508,  508,  508,  505,  506,  507,
-      509,  509,  509,  510,  510,  510,  511,  511,  511,  618,
-      617,  510,  510,  512,  512,  512,  615,  509,  545,  545,
-      545,  546,  546,  546,  614,  508,  610,  546,  547,  547,
-      547,  548,  548,  548,  549,  549,  549,  550,  550,  550,
-      609,  608,  549,  545,  551,  551,  551,  550,  552,  552,
-      552,  553,  553,  553,  551,  554,  554,  554,  555,  555,
-      555,  607,  606,  554,  554,  556,  556,  556,  557,  557,
-      557,  587,  587,  587,  605,  604,  553,  588,  588,  588,
-      603,  602,  557,  601,  588,  556,  589,  589,  589,  590,
-
-      590,  590,  591,  591,  591,  592,  592,  592,  593,  593,
-      593,  594,  594,  594,  595,  595,  595,  596,  596,  596,
-      600,  589,  624,  624,  624,  594,  599,  598,  593,  625,
-      625,  625,  586,  595,  626,  626,  626,  585,  584,  624,
-      583,  596,  627,  627,  627,  628,  628,  628,  629,  629,
-      629,  581,  580,  626,  651,  651,  651,  652,  652,  652,
-      653,  653,  653,  579,  651,  577,  627,  673,  673,  673,
-      776,  776,  776,  776,  777,  777,  777,  777,  778,  778,
-      778,  778,  779,  779,  779,  779,  780,  780,  781,  781,
-      782,  576,  782,  782,  575,  574,  573,  572,  571,  570,
-
-      569,  568,  565,  564,  563,  562,  561,  560,  559,  558,
-      544,  542,  539,  538,  537,  536,  535,  534,  533,  532,
-      531,  530,  529,  528,  527,  525,  524,  522,  521,  520,
-      519,  518,  517,  516,  515,  514,  513,  498,  497,  496,
-      495,  494,  492,  491,  490,  489,  488,  487,  486,  485,
-      484,  483,  482,  481,  480,  479,  475,  474,  472,  471,
-      468,  467,  465,  464,  463,  462,  461,  441,  440,  439,
-      438,  437,  436,  435,  434,  433,  432,  431,  430,  429,
-      428,  427,  425,  424,  423,  422,  421,  419,  418,  417,
-      416,  415,  414,  413,  412,  411,  410,  409,  408,  407,
-
-      406,  405,  404,  403,  380,  379,  378,  377,  376,  375,
+      777,  137,  147,  147,  147,  148,  148,  148,  776,  138,
+      775,  139,  478,  774,  141,  149,  149,  149,  478,  140,
+      150,  150,  150,  773,  142,  151,  151,  151,  152,  152,
+      152,  772,  153,  153,  153,  255,  771,  143,  191,  191,
+      144,  148,  255,  146,  145,  770,  191,  147,  192,  192,
+
+      192,  149,  194,  194,  194,  193,  193,  193,  574,  574,
+      150,  193,  768,  152,  153,  195,  195,  195,  196,  196,
+      196,  767,  191,  766,  151,  765,  193,  193,  193,  193,
+      197,  197,  197,  198,  198,  198,  199,  199,  199,  763,
+      200,  200,  200,  762,  761,  201,  201,  201,  202,  202,
+      202,  203,  203,  203,  204,  204,  204,  205,  205,  205,
+      206,  206,  206,  207,  207,  207,  196,  208,  208,  208,
+      209,  209,  209,  760,  759,  198,  210,  210,  210,  197,
+      200,  201,  211,  211,  211,  212,  212,  212,  757,  205,
+      756,  754,  206,  213,  213,  213,  753,  202,  752,  207,
+
+      751,  750,  204,  214,  214,  214,  749,  208,  210,  215,
+      215,  215,  210,  216,  216,  216,  217,  217,  217,  209,
+      218,  218,  218,  748,  747,  212,  746,  213,  745,  744,
+      211,  219,  219,  219,  220,  220,  220,  221,  221,  221,
+      263,  263,  263,  742,  741,  214,  264,  264,  264,  740,
+      739,  217,  265,  265,  265,  268,  268,  268,  218,  263,
+      737,  215,  266,  266,  266,  267,  267,  267,  269,  269,
+      269,  736,  265,  270,  270,  270,  264,  735,  734,  267,
+      732,  219,  267,  731,  221,  271,  271,  271,  272,  272,
+      272,  266,  273,  273,  273,  274,  274,  274,  275,  275,
+
+      275,  276,  276,  276,  277,  277,  277,  730,  729,  270,
+      278,  278,  278,  279,  279,  279,  280,  280,  280,  271,
+      281,  281,  281,  282,  282,  282,  283,  283,  283,  284,
+      284,  284,  285,  285,  285,  286,  286,  286,  277,  728,
+      726,  274,  725,  724,  278,  723,  722,  275,  720,  719,
+      276,  287,  287,  287,  718,  281,  717,  716,  280,  715,
+      283,  288,  288,  288,  285,  289,  289,  289,  290,  290,
+      290,  328,  328,  328,  330,  330,  330,  714,  284,  713,
+      712,  330,  711,  329,  329,  329,  710,  287,  334,  334,
+      334,  329,  329,  331,  331,  331,  709,  289,  708,  290,
+
+      329,  328,  707,  329,  705,  288,  704,  329,  329,  332,
+      332,  332,  703,  331,  333,  333,  333,  335,  335,  335,
+      702,  332,  336,  336,  336,  337,  337,  337,  338,  338,
+      338,  339,  339,  339,  333,  340,  340,  340,  341,  341,
+      341,  342,  342,  342,  343,  343,  343,  344,  344,  344,
+      345,  345,  345,  701,  336,  700,  699,  335,  346,  346,
+      346,  347,  347,  347,  338,  348,  348,  348,  352,  698,
+      337,  349,  349,  349,  387,  387,  387,  392,  392,  392,
+      339,  697,  696,  352,  352,  695,  341,  694,  352,  693,
+      388,  388,  388,  692,  392,  346,  388,  347,  387,  345,
+
+      389,  389,  389,  390,  390,  390,  691,  348,  391,  391,
+      391,  393,  393,  393,  389,  391,  690,  390,  689,  688,
+      349,  394,  394,  394,  395,  395,  395,  396,  396,  396,
+      686,  395,  397,  397,  397,  685,  394,  393,  398,  398,
+      398,  393,  399,  399,  399,  684,  396,  400,  400,  400,
+      401,  401,  401,  402,  402,  402,  683,  397,  403,  403,
+      403,  404,  404,  404,  405,  405,  405,  406,  406,  406,
+      407,  407,  407,  408,  408,  408,  399,  682,  449,  449,
+      449,  450,  450,  450,  451,  451,  451,  398,  681,  402,
+      680,  679,  451,  678,  400,  449,  677,  404,  450,  452,
+
+      452,  452,  406,  453,  453,  453,  454,  454,  454,  455,
+      455,  455,  456,  456,  456,  457,  457,  457,  453,  676,
+      454,  675,  674,  452,  673,  457,  458,  458,  458,  672,
+      455,  671,  670,  456,  459,  459,  459,  460,  460,  460,
+      459,  458,  461,  461,  461,  462,  462,  462,  463,  463,
+      463,  464,  464,  464,  465,  465,  465,  466,  466,  466,
+      506,  506,  506,  669,  668,  507,  507,  507,  460,  508,
+      508,  508,  509,  509,  509,  510,  510,  510,  667,  666,
+      506,  462,  507,  662,  661,  510,  464,  511,  511,  511,
+      512,  512,  512,  660,  508,  511,  659,  509,  513,  513,
+
+      513,  514,  514,  514,  515,  515,  515,  512,  513,  514,
+      516,  516,  516,  517,  517,  517,  518,  518,  518,  658,
+      657,  517,  517,  519,  519,  519,  656,  516,  553,  553,
+      553,  554,  554,  554,  655,  515,  654,  554,  555,  555,
+      555,  556,  556,  556,  557,  557,  557,  558,  558,  558,
+      652,  650,  557,  553,  559,  559,  559,  558,  560,  560,
+      560,  561,  561,  561,  559,  562,  562,  562,  563,  563,
+      563,  649,  648,  562,  562,  564,  564,  564,  565,  565,
+      565,  596,  596,  596,  647,  646,  561,  597,  597,  597,
+      645,  644,  565,  643,  597,  564,  598,  598,  598,  599,
+
+      599,  599,  600,  600,  600,  601,  601,  601,  602,  602,
+      602,  603,  603,  603,  604,  604,  604,  605,  605,  605,
+      642,  598,  634,  634,  634,  603,  641,  640,  602,  635,
+      635,  635,  633,  604,  636,  636,  636,  632,  631,  634,
+      630,  605,  637,  637,  637,  638,  638,  638,  639,  639,
+      639,  629,  627,  636,  663,  663,  663,  664,  664,  664,
+      665,  665,  665,  626,  663,  622,  637,  687,  687,  687,
+      802,  802,  802,  802,  803,  803,  803,  803,  804,  804,
+      804,  804,  805,  805,  805,  805,  806,  806,  807,  807,
+      808,  621,  808,  808,  620,  619,  618,  617,  616,  615,
+
+      614,  613,  612,  611,  610,  609,  608,  607,  595,  594,
+      592,  591,  590,  588,  587,  586,  585,  584,  583,  582,
+      581,  580,  579,  578,  576,  575,  573,  572,  571,  570,
+      569,  568,  567,  566,  552,  550,  547,  546,  545,  544,
+      543,  542,  541,  540,  539,  538,  537,  535,  534,  533,
+      531,  530,  529,  528,  527,  526,  525,  524,  523,  522,
+      521,  520,  505,  504,  503,  502,  501,  499,  498,  497,
+      496,  495,  494,  493,  492,  491,  490,  489,  488,  486,
+      483,  482,  480,  479,  475,  474,  472,  471,  470,  469,
+      468,  448,  447,  446,  445,  444,  443,  442,  441,  440,
+
+      439,  437,  436,  435,  433,  432,  431,  430,  429,  428,
+      426,  425,  424,  423,  422,  421,  420,  419,  418,  417,
+      416,  415,  414,  413,  412,  411,  410,  409,  386,  385,
+      384,  383,  382,  381,  380,  379,  378,  377,  376,  375,
       374,  373,  372,  371,  370,  369,  368,  367,  366,  365,
       364,  363,  362,  361,  360,  359,  358,  357,  356,  355,
-      354,  353,  352,  351,  350,  349,  348,  346,  345,  322,
-      321,  319,  318,  317,  316,  315,  314,  313,  312,  311,
+      354,  353,  351,  350,  327,  326,  324,  323,  322,  321,
+      320,  319,  318,  317,  316,  315,  314,  313,  312,  311,
       310,  309,  308,  307,  306,  305,  304,  303,  302,  301,
       300,  299,  298,  297,  296,  295,  294,  293,  292,  291,
-      290,  289,  288,  287,  257,  256,  255,  254,  253,  251,
-      249,  248,  247,  246,  245,  244,  243,  242,  241,  240,
-      239,  238,  237,  236,  235,  234,  233,  230,  228,  227,
-
-      226,  225,  224,  223,  222,  189,  188,  187,  186,  185,
-      184,  183,  182,  181,  180,  179,  178,  177,  176,  175,
-      173,  172,  171,  169,  167,  165,  164,  162,  161,  160,
-      159,  158,  157,  113,  112,  111,  108,  106,  104,  101,
-       99,   97,   96,   45,   42,   37,   18,    7,    3,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-
-      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
-      775,  775,  775,  775,  775
+
+      261,  260,  259,  258,  257,  256,  254,  253,  252,  251,
+      250,  249,  248,  247,  246,  245,  244,  243,  242,  241,
+      240,  239,  238,  237,  236,  233,  232,  230,  229,  228,
+      227,  226,  225,  224,  223,  190,  189,  188,  187,  186,
+      185,  184,  183,  182,  180,  179,  178,  177,  175,  173,
+      171,  169,  167,  166,  165,  163,  162,  161,  160,  159,
+      155,  113,  112,  111,  109,  108,  106,  104,  101,   97,
+       96,   45,   42,   37,   18,    7,    3,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
+      801,  801,  801
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -1089,7 +1105,7 @@ char *yytext;
 /*
  * The SIP lexer.
  *
- * Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+ * Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
  * 
  * This file is part of SIP.
  * 
@@ -1136,7 +1152,7 @@ static FILE *openFile(const char *);
 static void fatallex(char *);
 
 
-#line 1140 &quot;lexer.c.tmp&quot;
+#line 1156 &quot;lexer.c.tmp&quot;
 
 #define INITIAL 0
 #define code 1
@@ -1297,7 +1313,7 @@ YY_DECL
 #line 55 &quot;lexer.l&quot;
 
 
-#line 1301 &quot;lexer.c.tmp&quot;
+#line 1317 &quot;lexer.c.tmp&quot;
 
 	if ( !(yy_init) )
 		{
@@ -1351,13 +1367,13 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state &gt;= 776 )
+				if ( yy_current_state &gt;= 802 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_base[yy_current_state] != 1650 );
+		while ( yy_base[yy_current_state] != 1678 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -1384,344 +1400,349 @@ do_action:	/* This label is used only to access EOF actions. */
 case 1:
 YY_RULE_SETUP
 #line 57 &quot;lexer.l&quot;
-{return TK_OPTIONS;}
+{return TK_PLUGIN;}
 	YY_BREAK
 case 2:
 YY_RULE_SETUP
 #line 58 &quot;lexer.l&quot;
-{return TK_NOEMITTERS;}
+{return TK_INCLUDE;}
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
 #line 59 &quot;lexer.l&quot;
-{return TK_INCLUDE;}
+{return TK_OPTINCLUDE;}
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
 #line 60 &quot;lexer.l&quot;
-{return TK_OPTINCLUDE;}
+{return TK_IMPORT;}
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
 #line 61 &quot;lexer.l&quot;
-{return TK_IMPORT;}
+{return TK_MODULE;}
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
 #line 62 &quot;lexer.l&quot;
-{return TK_MODULE;}
+{return TK_CMODULE;}
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
 #line 63 &quot;lexer.l&quot;
-{return TK_CMODULE;}
+{return TK_CONSMODULE;}
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
 #line 64 &quot;lexer.l&quot;
-{return TK_CONSMODULE;}
+{return TK_COMPOMODULE;}
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
 #line 65 &quot;lexer.l&quot;
-{return TK_COMPOMODULE;}
+{return TK_TIMELINE;}
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
 #line 66 &quot;lexer.l&quot;
-{return TK_TIMELINE;}
+{return TK_PLATFORMS;}
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
 #line 67 &quot;lexer.l&quot;
-{return TK_PLATFORMS;}
+{return TK_FEATURE;}
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
 #line 68 &quot;lexer.l&quot;
-{return TK_FEATURE;}
+{return TK_LICENSE;}
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
 #line 69 &quot;lexer.l&quot;
-{return TK_LICENSE;}
+{return TK_MAPPEDTYPE;}
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
 #line 70 &quot;lexer.l&quot;
-{return TK_MAPPEDTYPE;}
+{return TK_EXCEPTION;}
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
 #line 71 &quot;lexer.l&quot;
-{return TK_EXCEPTION;}
+{return TK_IF;}
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
 #line 72 &quot;lexer.l&quot;
-{return TK_IF;}
+{return TK_DEFMETATYPE;}
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
 #line 73 &quot;lexer.l&quot;
-{return TK_END;}
+{return TK_DEFSUPERTYPE;}
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
 #line 74 &quot;lexer.l&quot;
-{return TK_CLASS;}
+{return TK_END;}
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
 #line 75 &quot;lexer.l&quot;
-{return TK_STRUCT;}
+{return TK_CLASS;}
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
 #line 76 &quot;lexer.l&quot;
-{return TK_PUBLIC;}
+{return TK_STRUCT;}
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
 #line 77 &quot;lexer.l&quot;
-{return TK_PROTECTED;}
+{return TK_PUBLIC;}
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
 #line 78 &quot;lexer.l&quot;
-{return TK_PRIVATE;}
+{return TK_PROTECTED;}
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
 #line 79 &quot;lexer.l&quot;
-{return TK_SIGNALS;}
+{return TK_PRIVATE;}
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
 #line 80 &quot;lexer.l&quot;
-{return TK_SLOTS;}
+{return TK_SIGNALS;}
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
 #line 81 &quot;lexer.l&quot;
-{return TK_CHAR;}
+{return TK_SLOTS;}
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
 #line 82 &quot;lexer.l&quot;
-{return TK_WCHAR_T;}
+{return TK_CHAR;}
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
 #line 83 &quot;lexer.l&quot;
-{return TK_BOOL;}
+{return TK_WCHAR_T;}
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
 #line 84 &quot;lexer.l&quot;
-{return TK_SHORT;}
+{return TK_BOOL;}
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
 #line 85 &quot;lexer.l&quot;
-{return TK_INT;}
+{return TK_SHORT;}
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
 #line 86 &quot;lexer.l&quot;
-{return TK_LONG;}
+{return TK_INT;}
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
 #line 87 &quot;lexer.l&quot;
-{return TK_FLOAT;}
+{return TK_LONG;}
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
 #line 88 &quot;lexer.l&quot;
-{return TK_DOUBLE;}
+{return TK_FLOAT;}
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
 #line 89 &quot;lexer.l&quot;
-{return TK_VOID;}
+{return TK_DOUBLE;}
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
 #line 90 &quot;lexer.l&quot;
-{return TK_VIRTUAL;}
+{return TK_VOID;}
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
 #line 91 &quot;lexer.l&quot;
-{return TK_ENUM;}
+{return TK_VIRTUAL;}
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
 #line 92 &quot;lexer.l&quot;
-{return TK_SIGNED;}
+{return TK_ENUM;}
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
 #line 93 &quot;lexer.l&quot;
-{return TK_UNSIGNED;}
+{return TK_SIGNED;}
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
 #line 94 &quot;lexer.l&quot;
-{return TK_CONST;}
+{return TK_UNSIGNED;}
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
 #line 95 &quot;lexer.l&quot;
-{return TK_STATIC;}
+{return TK_CONST;}
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
 #line 96 &quot;lexer.l&quot;
-{return TK_TRUE;}
+{return TK_STATIC;}
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
 #line 97 &quot;lexer.l&quot;
-{return TK_FALSE;}
+{return TK_TRUE;}
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
 #line 98 &quot;lexer.l&quot;
-{return TK_NULL;}
+{return TK_FALSE;}
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
 #line 99 &quot;lexer.l&quot;
-{return TK_TYPEDEF;}
+{return TK_NULL;}
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
 #line 100 &quot;lexer.l&quot;
-{return TK_NAMESPACE;}
+{return TK_TYPEDEF;}
 	YY_BREAK
 case 45:
 YY_RULE_SETUP
 #line 101 &quot;lexer.l&quot;
-{return TK_OPERATOR;}
+{return TK_NAMESPACE;}
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
 #line 102 &quot;lexer.l&quot;
-{return TK_THROW;}
+{return TK_OPERATOR;}
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
 #line 103 &quot;lexer.l&quot;
-{return TK_EXPLICIT;}
+{return TK_THROW;}
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
 #line 104 &quot;lexer.l&quot;
-{return TK_TEMPLATE;}
+{return TK_EXPLICIT;}
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
 #line 105 &quot;lexer.l&quot;
-{return TK_SCOPE;}
+{return TK_TEMPLATE;}
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
 #line 106 &quot;lexer.l&quot;
-{return TK_LOGICAL_OR;}
+{return TK_SCOPE;}
 	YY_BREAK
 case 51:
 YY_RULE_SETUP
 #line 107 &quot;lexer.l&quot;
-{return TK_PYOBJECT;}
+{return TK_LOGICAL_OR;}
 	YY_BREAK
 case 52:
 YY_RULE_SETUP
 #line 108 &quot;lexer.l&quot;
-{return TK_PYTUPLE;}
+{return TK_PYOBJECT;}
 	YY_BREAK
 case 53:
 YY_RULE_SETUP
 #line 109 &quot;lexer.l&quot;
-{return TK_PYLIST;}
+{return TK_PYTUPLE;}
 	YY_BREAK
 case 54:
 YY_RULE_SETUP
 #line 110 &quot;lexer.l&quot;
-{return TK_PYDICT;}
+{return TK_PYLIST;}
 	YY_BREAK
 case 55:
 YY_RULE_SETUP
 #line 111 &quot;lexer.l&quot;
-{return TK_PYCALLABLE;}
+{return TK_PYDICT;}
 	YY_BREAK
 case 56:
 YY_RULE_SETUP
 #line 112 &quot;lexer.l&quot;
-{return TK_PYSLICE;}
+{return TK_PYCALLABLE;}
 	YY_BREAK
 case 57:
 YY_RULE_SETUP
 #line 113 &quot;lexer.l&quot;
-{return TK_PYTYPE;}
+{return TK_PYSLICE;}
 	YY_BREAK
 case 58:
 YY_RULE_SETUP
 #line 114 &quot;lexer.l&quot;
-{return TK_SIPSIGNAL;}
+{return TK_PYTYPE;}
 	YY_BREAK
 case 59:
 YY_RULE_SETUP
 #line 115 &quot;lexer.l&quot;
-{return TK_SIPSLOT;}
+{return TK_SIPSIGNAL;}
 	YY_BREAK
 case 60:
 YY_RULE_SETUP
 #line 116 &quot;lexer.l&quot;
-{return TK_SIPANYSLOT;}
+{return TK_SIPSLOT;}
 	YY_BREAK
 case 61:
 YY_RULE_SETUP
 #line 117 &quot;lexer.l&quot;
-{return TK_SIPRXCON;}
+{return TK_SIPANYSLOT;}
 	YY_BREAK
 case 62:
 YY_RULE_SETUP
 #line 118 &quot;lexer.l&quot;
-{return TK_SIPRXDIS;}
+{return TK_SIPRXCON;}
 	YY_BREAK
 case 63:
 YY_RULE_SETUP
 #line 119 &quot;lexer.l&quot;
-{return TK_SIPSLOTCON;}
+{return TK_SIPRXDIS;}
 	YY_BREAK
 case 64:
 YY_RULE_SETUP
 #line 120 &quot;lexer.l&quot;
-{return TK_SIPSLOTDIS;}
+{return TK_SIPSLOTCON;}
 	YY_BREAK
 case 65:
 YY_RULE_SETUP
 #line 121 &quot;lexer.l&quot;
-{return TK_QOBJECT;}
+{return TK_SIPSLOTDIS;}
 	YY_BREAK
 case 66:
 YY_RULE_SETUP
 #line 122 &quot;lexer.l&quot;
-{return TK_ELLIPSIS;}
+{return TK_QOBJECT;}
 	YY_BREAK
 case 67:
 YY_RULE_SETUP
-#line 125 &quot;lexer.l&quot;
+#line 123 &quot;lexer.l&quot;
+{return TK_ELLIPSIS;}
+	YY_BREAK
+case 68:
+YY_RULE_SETUP
+#line 126 &quot;lexer.l&quot;
 {           /* Ignore whitespace. */
     ;
 }
 	YY_BREAK
-case 68:
-/* rule 68 can match eol */
+case 69:
+/* rule 69 can match eol */
 YY_RULE_SETUP
-#line 129 &quot;lexer.l&quot;
+#line 130 &quot;lexer.l&quot;
 {                /* Maintain the line number. */
     ++inputFileStack[currentFile].lineno;
 
@@ -1731,57 +1752,57 @@ YY_RULE_SETUP
     }
 }
 	YY_BREAK
-case 69:
+case 70:
 YY_RULE_SETUP
-#line 138 &quot;lexer.l&quot;
+#line 139 &quot;lexer.l&quot;
 {            /* Ignore C++ style comments. */
     ;
 }
 	YY_BREAK
-case 70:
+case 71:
 YY_RULE_SETUP
-#line 143 &quot;lexer.l&quot;
+#line 144 &quot;lexer.l&quot;
 {          /* A signed decimal number. */
     yylval.number = strtol(yytext,NULL,0);
     return TK_NUMBER;
 }
 	YY_BREAK
-case 71:
+case 72:
 YY_RULE_SETUP
-#line 149 &quot;lexer.l&quot;
+#line 150 &quot;lexer.l&quot;
 {/* A floating point number. */
     yylval.real = strtod(yytext,NULL);
     return TK_REAL;
 }
 	YY_BREAK
-case 72:
+case 73:
 YY_RULE_SETUP
-#line 155 &quot;lexer.l&quot;
+#line 156 &quot;lexer.l&quot;
 {        /* An unsigned hexadecimal number. */
     yylval.number = strtol(yytext,NULL,16);
     return TK_NUMBER;
 }
 	YY_BREAK
-case 73:
+case 74:
 YY_RULE_SETUP
-#line 161 &quot;lexer.l&quot;
+#line 162 &quot;lexer.l&quot;
 {    /* An identifier name. */
     yylval.text = sipStrdup(yytext);
     return TK_NAME;
 }
 	YY_BREAK
-case 74:
+case 75:
 YY_RULE_SETUP
-#line 167 &quot;lexer.l&quot;
+#line 168 &quot;lexer.l&quot;
 {  /* A relative pathname. */
     yylval.text = sipStrdup(yytext);
     return TK_PATHNAME;
 }
 	YY_BREAK
-case 75:
-/* rule 75 can match eol */
+case 76:
+/* rule 76 can match eol */
 YY_RULE_SETUP
-#line 173 &quot;lexer.l&quot;
+#line 174 &quot;lexer.l&quot;
 {        /* A double-quoted string. */
     char *dp, *sp;
 
@@ -1805,10 +1826,10 @@ YY_RULE_SETUP
     return TK_STRING;
 }
 	YY_BREAK
-case 76:
-/* rule 76 can match eol */
+case 77:
+/* rule 77 can match eol */
 YY_RULE_SETUP
-#line 197 &quot;lexer.l&quot;
+#line 198 &quot;lexer.l&quot;
 {        /* A single-quoted character. */
     if (strlen(yytext) != 3)
         fatallex(&quot;Exactly one character expected between single quotes&quot;);
@@ -1818,280 +1839,288 @@ YY_RULE_SETUP
     return TK_QCHAR;
 }
 	YY_BREAK
-case 77:
+case 78:
 YY_RULE_SETUP
-#line 207 &quot;lexer.l&quot;
+#line 208 &quot;lexer.l&quot;
 {              /* Ignore C-style comments. */
     BEGIN ccomment;
 }
 	YY_BREAK
-case 78:
-/* rule 78 can match eol */
+case 79:
+/* rule 79 can match eol */
 YY_RULE_SETUP
-#line 210 &quot;lexer.l&quot;
+#line 211 &quot;lexer.l&quot;
 {
     ++inputFileStack[currentFile].lineno;
 }
 	YY_BREAK
-case 79:
+case 80:
 YY_RULE_SETUP
-#line 213 &quot;lexer.l&quot;
+#line 214 &quot;lexer.l&quot;
 {
     BEGIN INITIAL;
 }
 	YY_BREAK
-case 80:
+case 81:
 YY_RULE_SETUP
-#line 216 &quot;lexer.l&quot;
+#line 217 &quot;lexer.l&quot;
 {
     ;
 }
 	YY_BREAK
-case 81:
+case 82:
 YY_RULE_SETUP
-#line 221 &quot;lexer.l&quot;
+#line 222 &quot;lexer.l&quot;
 {         /* The software license. */
     codeIdx = 0;
     return TK_COPYING;
 }
 	YY_BREAK
-case 82:
+case 83:
 YY_RULE_SETUP
-#line 226 &quot;lexer.l&quot;
+#line 227 &quot;lexer.l&quot;
 {     /* The start of a from-type code block. */
     codeIdx = 0;
     return TK_FROMTYPE;
 }
 	YY_BREAK
-case 83:
+case 84:
 YY_RULE_SETUP
-#line 231 &quot;lexer.l&quot;
+#line 232 &quot;lexer.l&quot;
 {       /* The start of a to-type code block. */
     codeIdx = 0;
     return TK_TOTYPE;
 }
 	YY_BREAK
-case 84:
+case 85:
 YY_RULE_SETUP
-#line 236 &quot;lexer.l&quot;
+#line 237 &quot;lexer.l&quot;
 {   /* The start of a to-sub-class code block. */
     codeIdx = 0;
     return TK_TOSUBCLASS;
 }
 	YY_BREAK
-case 85:
+case 86:
 YY_RULE_SETUP
-#line 241 &quot;lexer.l&quot;
+#line 242 &quot;lexer.l&quot;
 {      /* The start of an exported header code block. */
     codeIdx = 0;
     return TK_EXPHEADERCODE;
 }
 	YY_BREAK
-case 86:
+case 87:
 YY_RULE_SETUP
-#line 246 &quot;lexer.l&quot;
+#line 247 &quot;lexer.l&quot;
 {        /* The start of a module header code block. */
     codeIdx = 0;
     return TK_MODHEADERCODE;
 }
 	YY_BREAK
-case 87:
+case 88:
 YY_RULE_SETUP
-#line 251 &quot;lexer.l&quot;
+#line 252 &quot;lexer.l&quot;
 {      /* The start of a type header code block. */
     codeIdx = 0;
     return TK_TYPEHEADERCODE;
 }
 	YY_BREAK
-case 88:
+case 89:
 YY_RULE_SETUP
-#line 256 &quot;lexer.l&quot;
+#line 257 &quot;lexer.l&quot;
 {   /* The start of a pre-initialisation code block. */
     codeIdx = 0;
     return TK_PREINITCODE;
 }
 	YY_BREAK
-case 89:
+case 90:
 YY_RULE_SETUP
-#line 261 &quot;lexer.l&quot;
+#line 262 &quot;lexer.l&quot;
+{      /* The start of an initialisation code block. */
+    codeIdx = 0;
+    return TK_INITCODE;
+}
+	YY_BREAK
+case 91:
+YY_RULE_SETUP
+#line 267 &quot;lexer.l&quot;
 {  /* The start of a post-initialisation code block. */
     codeIdx = 0;
     return TK_POSTINITCODE;
 }
 	YY_BREAK
-case 90:
+case 92:
 YY_RULE_SETUP
-#line 266 &quot;lexer.l&quot;
+#line 272 &quot;lexer.l&quot;
 {            /* The start of a unit code block. */
     codeIdx = 0;
     return TK_UNITCODE;
 }
 	YY_BREAK
-case 91:
+case 93:
 YY_RULE_SETUP
-#line 271 &quot;lexer.l&quot;
+#line 277 &quot;lexer.l&quot;
 {          /* The start of a module code block. */
     codeIdx = 0;
     return TK_MODCODE;
 }
 	YY_BREAK
-case 92:
+case 94:
 YY_RULE_SETUP
-#line 276 &quot;lexer.l&quot;
+#line 282 &quot;lexer.l&quot;
 {            /* The start of a type code block. */
     codeIdx = 0;
     return TK_TYPECODE;
 }
 	YY_BREAK
-case 93:
+case 95:
 YY_RULE_SETUP
-#line 281 &quot;lexer.l&quot;
+#line 287 &quot;lexer.l&quot;
 {          /* The start of a C++ method code block. */
     codeIdx = 0;
     return TK_METHODCODE;
 }
 	YY_BREAK
-case 94:
+case 96:
 YY_RULE_SETUP
-#line 286 &quot;lexer.l&quot;
+#line 292 &quot;lexer.l&quot;
 {      /* The start of a C++ virtual code block. */
     codeIdx = 0;
     return TK_VIRTUALCATCHERCODE;
 }
 	YY_BREAK
-case 95:
+case 97:
 YY_RULE_SETUP
-#line 291 &quot;lexer.l&quot;
+#line 297 &quot;lexer.l&quot;
 {      /* The start of a traverse code block. */
     codeIdx = 0;
     return TK_TRAVERSECODE;
 }
 	YY_BREAK
-case 96:
+case 98:
 YY_RULE_SETUP
-#line 296 &quot;lexer.l&quot;
+#line 302 &quot;lexer.l&quot;
 {         /* The start of a clear code block. */
     codeIdx = 0;
     return TK_CLEARCODE;
 }
 	YY_BREAK
-case 97:
+case 99:
 YY_RULE_SETUP
-#line 301 &quot;lexer.l&quot;
+#line 307 &quot;lexer.l&quot;
 {     /* The start of a read buffer code block. */
     codeIdx = 0;
     return TK_READBUFFERCODE;
 }
 	YY_BREAK
-case 98:
+case 100:
 YY_RULE_SETUP
-#line 306 &quot;lexer.l&quot;
+#line 312 &quot;lexer.l&quot;
 {    /* The start of a write buffer code block. */
     codeIdx = 0;
     return TK_WRITEBUFFERCODE;
 }
 	YY_BREAK
-case 99:
+case 101:
 YY_RULE_SETUP
-#line 311 &quot;lexer.l&quot;
+#line 317 &quot;lexer.l&quot;
 {       /* The start of a segment count code block. */
     codeIdx = 0;
     return TK_SEGCOUNTCODE;
 }
 	YY_BREAK
-case 100:
+case 102:
 YY_RULE_SETUP
-#line 316 &quot;lexer.l&quot;
+#line 322 &quot;lexer.l&quot;
 {     /* The start of a char buffer code block. */
     codeIdx = 0;
     return TK_CHARBUFFERCODE;
 }
 	YY_BREAK
-case 101:
+case 103:
 YY_RULE_SETUP
-#line 321 &quot;lexer.l&quot;
+#line 327 &quot;lexer.l&quot;
 {         /* The start of a pickle code block. */
     codeIdx = 0;
     return TK_PICKLECODE;
 }
 	YY_BREAK
-case 102:
+case 104:
 YY_RULE_SETUP
-#line 326 &quot;lexer.l&quot;
+#line 332 &quot;lexer.l&quot;
 {       /* The start of a pre-Python code block. */
     codeIdx = 0;
     return TK_PREPYCODE;
 }
 	YY_BREAK
-case 103:
+case 105:
 YY_RULE_SETUP
-#line 331 &quot;lexer.l&quot;
+#line 337 &quot;lexer.l&quot;
 {           /* The start of a raise exception code block. */
     codeIdx = 0;
     return TK_RAISECODE;
 }
 	YY_BREAK
-case 104:
+case 106:
 YY_RULE_SETUP
-#line 336 &quot;lexer.l&quot;
+#line 342 &quot;lexer.l&quot;
 {             /* The start of a documentation block. */
     codeIdx = 0;
     return TK_DOC;
 }
 	YY_BREAK
-case 105:
+case 107:
 YY_RULE_SETUP
-#line 341 &quot;lexer.l&quot;
+#line 347 &quot;lexer.l&quot;
 {         /* The start of an exported documentation block. */
     codeIdx = 0;
     return TK_EXPORTEDDOC;
 }
 	YY_BREAK
-case 106:
+case 108:
 YY_RULE_SETUP
-#line 346 &quot;lexer.l&quot;
+#line 352 &quot;lexer.l&quot;
 {            /* The start of a Makefile code block. */
     codeIdx = 0;
     return TK_MAKEFILE;
 }
 	YY_BREAK
-case 107:
+case 109:
 YY_RULE_SETUP
-#line 351 &quot;lexer.l&quot;
+#line 357 &quot;lexer.l&quot;
 {          /* The start of an access code block. */
     codeIdx = 0;
     return TK_ACCESSCODE;
 }
 	YY_BREAK
-case 108:
+case 110:
 YY_RULE_SETUP
-#line 356 &quot;lexer.l&quot;
+#line 362 &quot;lexer.l&quot;
 {         /* The start of a get code block. */
     codeIdx = 0;
     return TK_GETCODE;
 }
 	YY_BREAK
-case 109:
+case 111:
 YY_RULE_SETUP
-#line 361 &quot;lexer.l&quot;
+#line 367 &quot;lexer.l&quot;
 {         /* The start of a set code block. */
     codeIdx = 0;
     return TK_SETCODE;
 }
 	YY_BREAK
-case 110:
+case 112:
 YY_RULE_SETUP
-#line 366 &quot;lexer.l&quot;
+#line 372 &quot;lexer.l&quot;
 {           /* The end of a code block. */
     BEGIN INITIAL;
     codeIdx = -1;
     return TK_END;
 }
 	YY_BREAK
-case 111:
-/* rule 111 can match eol */
+case 113:
+/* rule 113 can match eol */
 YY_RULE_SETUP
-#line 372 &quot;lexer.l&quot;
+#line 378 &quot;lexer.l&quot;
 {          /* The end of a code line . */
     struct inputFile *ifp;
 
@@ -2111,9 +2140,9 @@ YY_RULE_SETUP
     return TK_CODELINE;
 }
 	YY_BREAK
-case 112:
+case 114:
 YY_RULE_SETUP
-#line 391 &quot;lexer.l&quot;
+#line 397 &quot;lexer.l&quot;
 {           /* The contents of a code line. */
     if (codeIdx == MAX_CODE_LINE_LENGTH)
         fatallex(&quot;Line is too long&quot;);
@@ -2121,19 +2150,19 @@ YY_RULE_SETUP
     codeLine[codeIdx++] = yytext[0];
 }
 	YY_BREAK
-case 113:
+case 115:
 YY_RULE_SETUP
-#line 398 &quot;lexer.l&quot;
+#line 404 &quot;lexer.l&quot;
 {             /* Anything else is returned as is. */
     return yytext[0];
 }
 	YY_BREAK
-case 114:
+case 116:
 YY_RULE_SETUP
-#line 402 &quot;lexer.l&quot;
+#line 408 &quot;lexer.l&quot;
 ECHO;
 	YY_BREAK
-#line 2137 &quot;lexer.c.tmp&quot;
+#line 2166 &quot;lexer.c.tmp&quot;
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(code):
 case YY_STATE_EOF(ccomment):
@@ -2420,7 +2449,7 @@ static int yy_get_next_buffer (void)
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state &gt;= 776 )
+			if ( yy_current_state &gt;= 802 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -2448,11 +2477,11 @@ static int yy_get_next_buffer (void)
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state &gt;= 776 )
+		if ( yy_current_state &gt;= 802 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 775);
+	yy_is_jam = (yy_current_state == 801);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -3134,7 +3163,7 @@ void yyfree (void * ptr )
 
 #define YYTABLES_NAME &quot;yytables&quot;
 
-#line 402 &quot;lexer.l&quot;
+#line 408 &quot;lexer.l&quot;
 
 
 </diff>
      <filename>sipgen/lexer.c</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 /*
  * The SIP lexer.
  *
- * Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+ * Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
  * 
  * This file is part of SIP.
  * 
@@ -54,8 +54,7 @@ static void fatallex(char *);
 
 %%
 
-^[ \t]*%SIPOptions          {return TK_OPTIONS;}
-^[ \t]*%SIPNoEmitters       {return TK_NOEMITTERS;}
+^[ \t]*%Plugin              {return TK_PLUGIN;}
 ^[ \t]*%Include             {return TK_INCLUDE;}
 ^[ \t]*%OptionalInclude     {return TK_OPTINCLUDE;}
 ^[ \t]*%Import              {return TK_IMPORT;}
@@ -70,6 +69,8 @@ static void fatallex(char *);
 ^[ \t]*%MappedType          {return TK_MAPPEDTYPE;}
 ^[ \t]*%Exception           {return TK_EXCEPTION;}
 ^[ \t]*%If                  {return TK_IF;}
+^[ \t]*%DefaultMetatype     {return TK_DEFMETATYPE;}
+^[ \t]*%DefaultSupertype    {return TK_DEFSUPERTYPE;}
 &lt;INITIAL&gt;^[ \t]*%End        {return TK_END;}
 class                       {return TK_CLASS;}
 struct                      {return TK_STRUCT;}
@@ -258,6 +259,11 @@ SIP_QOBJECT                 {return TK_QOBJECT;}
     return TK_PREINITCODE;
 }
 
+^%InitialisationCode {      /* The start of an initialisation code block. */
+    codeIdx = 0;
+    return TK_INITCODE;
+}
+
 ^%PostInitialisationCode {  /* The start of a post-initialisation code block. */
     codeIdx = 0;
     return TK_POSTINITCODE;</diff>
      <filename>sipgen/lexer.l</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 /*
  * The main module for SIP.
  *
- * Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+ * Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
  * 
  * This file is part of SIP.
  * 
@@ -26,7 +26,7 @@
 #define PACKAGE &quot;sip&quot;
 #endif
 
-#define VERSION &quot;4.7.8-snapshot-20081102&quot;
+#define VERSION &quot;4.8-snapshot-20090225&quot;
 
 
 /* Global variables - see sip.h for their meaning. */</diff>
      <filename>sipgen/main.c</filename>
    </modified>
    <modified>
      <diff>@@ -53,15 +53,15 @@
    /* Put the tokens into the symbol table, so that GDB and other debuggers
       know about them.  */
    enum yytokentype {
-     TK_OPTIONS = 258,
-     TK_NOEMITTERS = 259,
-     TK_DOC = 260,
-     TK_EXPORTEDDOC = 261,
-     TK_MAKEFILE = 262,
-     TK_ACCESSCODE = 263,
-     TK_GETCODE = 264,
-     TK_SETCODE = 265,
-     TK_PREINITCODE = 266,
+     TK_PLUGIN = 258,
+     TK_DOC = 259,
+     TK_EXPORTEDDOC = 260,
+     TK_MAKEFILE = 261,
+     TK_ACCESSCODE = 262,
+     TK_GETCODE = 263,
+     TK_SETCODE = 264,
+     TK_PREINITCODE = 265,
+     TK_INITCODE = 266,
      TK_POSTINITCODE = 267,
      TK_UNITCODE = 268,
      TK_MODCODE = 269,
@@ -154,18 +154,20 @@
      TK_RAISECODE = 356,
      TK_EXPLICIT = 357,
      TK_TEMPLATE = 358,
-     TK_ELLIPSIS = 359
+     TK_ELLIPSIS = 359,
+     TK_DEFMETATYPE = 360,
+     TK_DEFSUPERTYPE = 361
    };
 #endif
-#define TK_OPTIONS 258
-#define TK_NOEMITTERS 259
-#define TK_DOC 260
-#define TK_EXPORTEDDOC 261
-#define TK_MAKEFILE 262
-#define TK_ACCESSCODE 263
-#define TK_GETCODE 264
-#define TK_SETCODE 265
-#define TK_PREINITCODE 266
+#define TK_PLUGIN 258
+#define TK_DOC 259
+#define TK_EXPORTEDDOC 260
+#define TK_MAKEFILE 261
+#define TK_ACCESSCODE 262
+#define TK_GETCODE 263
+#define TK_SETCODE 264
+#define TK_PREINITCODE 265
+#define TK_INITCODE 266
 #define TK_POSTINITCODE 267
 #define TK_UNITCODE 268
 #define TK_MODCODE 269
@@ -259,6 +261,8 @@
 #define TK_EXPLICIT 357
 #define TK_TEMPLATE 358
 #define TK_ELLIPSIS 359
+#define TK_DEFMETATYPE 360
+#define TK_DEFSUPERTYPE 361
 
 
 
@@ -347,12 +351,12 @@ static int getDeprecated(optFlags *);
 static void templateSignature(signatureDef *sd, int result, classTmplDef *tcd, templateDef *td, classDef *ncd);
 static void templateType(argDef *ad, classTmplDef *tcd, templateDef *td, classDef *ncd);
 static int search_back(const char *end, const char *start, const char *target);
-static char *getType(scopedNameDef *ename, argDef *ad);
+static char *type2string(argDef *ad);
 static char *scopedNameToString(scopedNameDef *name);
 static void addUsedFromCode(sipSpec *pt, ifaceFileList **used, const char *sname);
 static int sameName(scopedNameDef *snd, const char *sname);
-static int optFind(sipSpec *pt, const char *opt);
-static void setModuleName(moduleDef *mod, const char *fullname);
+static int stringFind(stringList *sl, const char *s);
+static void setModuleName(sipSpec *pt, moduleDef *mod, const char *fullname);
 static int foundInScope(scopedNameDef *fq_name, scopedNameDef *rel_name);
 static void defineClass(scopedNameDef *snd);
 static classDef *completeClass(scopedNameDef *snd, optFlags *of, int has_def);
@@ -368,6 +372,7 @@ static overDef *instantiateTemplateOverloads(sipSpec *pt, overDef *tod,
         templateDef *td, classDef *cd, ifaceFileList **used,
         scopedNameDef *type_names, scopedNameDef *type_values);
 static void resolveAnyTypedef(sipSpec *pt, argDef *ad);
+static void addVariable(sipSpec *pt, varDef *vd);
 
 
 /* Enabling traces.  */
@@ -384,7 +389,7 @@ static void resolveAnyTypedef(sipSpec *pt, argDef *ad);
 #endif
 
 #if ! defined (YYSTYPE) &amp;&amp; ! defined (YYSTYPE_IS_DECLARED)
-#line 120 &quot;parser.y&quot;
+#line 121 &quot;parser.y&quot;
 typedef union YYSTYPE {
     char            qchar;
     char            *text;
@@ -406,7 +411,7 @@ typedef union YYSTYPE {
     classDef        *klass;
 } YYSTYPE;
 /* Line 186 of yacc.c.  */
-#line 410 &quot;parser.c&quot;
+#line 415 &quot;parser.c&quot;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 # define YYSTYPE_IS_TRIVIAL 1
@@ -418,7 +423,7 @@ typedef union YYSTYPE {
 
 
 /* Line 214 of yacc.c.  */
-#line 422 &quot;parser.c&quot;
+#line 427 &quot;parser.c&quot;
 
 #if ! defined (yyoverflow) || YYERROR_VERBOSE
 
@@ -524,20 +529,20 @@ union yyalloc
 /* YYFINAL -- State number of the termination state. */
 #define YYFINAL  4
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   967
+#define YYLAST   1016
 
 /* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS  127
+#define YYNTOKENS  129
 /* YYNNTS -- Number of nonterminals. */
-#define YYNNTS  138
+#define YYNNTS  139
 /* YYNRULES -- Number of rules. */
-#define YYNRULES  346
+#define YYNRULES  348
 /* YYNRULES -- Number of states. */
-#define YYNSTATES  582
+#define YYNSTATES  584
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   359
+#define YYMAXUTOK   361
 
 #define YYTRANSLATE(YYX) 						\
   ((unsigned int) (YYX) &lt;= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -548,16 +553,16 @@ static const unsigned char yytranslate[] =
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   111,     2,     2,     2,   125,   117,     2,
-     105,   106,   115,   114,   107,   112,     2,   116,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,   122,   110,
-     120,   113,   121,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,   112,     2,     2,     2,   127,   119,     2,
+     110,   111,   117,   116,   114,   113,     2,   118,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,   124,   109,
+     122,   115,   123,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,   123,     2,   124,   126,     2,     2,     2,     2,     2,
+       2,   125,     2,   126,   128,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   108,   118,   109,   119,     2,     2,     2,
+       2,     2,     2,   107,   120,   108,   121,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -580,7 +585,8 @@ static const unsigned char yytranslate[] =
       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
       85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
-      95,    96,    97,    98,    99,   100,   101,   102,   103,   104
+      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
+     105,   106
 };
 
 #if YYDEBUG
@@ -592,180 +598,180 @@ static const unsigned short int yyprhs[] =
       20,    22,    24,    26,    28,    30,    32,    34,    36,    38,
       40,    42,    44,    46,    48,    50,    52,    54,    56,    58,
       60,    62,    64,    66,    68,    70,    72,    74,    76,    78,
-      80,    82,    84,    86,    88,    93,    95,    99,   101,   111,
-     112,   116,   119,   120,   126,   127,   133,   138,   140,   143,
-     145,   148,   151,   152,   160,   162,   165,   166,   172,   174,
-     177,   179,   182,   183,   189,   191,   194,   196,   201,   203,
-     206,   210,   215,   217,   221,   223,   226,   229,   232,   236,
-     238,   240,   242,   244,   245,   247,   250,   253,   256,   257,
-     260,   261,   264,   265,   268,   271,   274,   277,   280,   281,
-     283,   286,   289,   292,   295,   298,   301,   304,   307,   310,
-     313,   316,   319,   322,   325,   328,   333,   336,   338,   341,
-     342,   351,   352,   354,   355,   357,   358,   360,   362,   365,
-     367,   369,   374,   375,   377,   378,   381,   382,   385,   387,
-     391,   393,   395,   397,   399,   401,   403,   404,   406,   408,
-     410,   412,   415,   417,   421,   423,   425,   430,   432,   434,
-     436,   438,   440,   442,   444,   445,   447,   451,   457,   469,
-     470,   478,   479,   483,   488,   489,   497,   498,   501,   503,
-     507,   509,   510,   514,   516,   519,   521,   523,   525,   527,
-     529,   531,   533,   535,   537,   539,   541,   543,   545,   547,
-     549,   551,   553,   555,   557,   559,   562,   565,   569,   573,
-     577,   580,   581,   583,   595,   596,   600,   602,   612,   613,
-     619,   620,   627,   628,   630,   644,   659,   673,   675,   677,
-     679,   681,   683,   685,   687,   689,   692,   695,   698,   701,
-     704,   707,   710,   713,   716,   719,   723,   727,   729,   732,
-     735,   737,   740,   743,   746,   748,   751,   752,   754,   755,
-     758,   759,   763,   765,   769,   771,   775,   777,   779,   781,
-     782,   785,   786,   789,   791,   792,   794,   798,   803,   808,
-     813,   817,   821,   828,   835,   839,   842,   843,   847,   849,
-     851,   853,   854,   858,   860,   868,   873,   877,   881,   882,
-     884,   885,   888,   890,   895,   898,   901,   903,   905,   908,
-     910,   912,   915,   918,   922,   924,   926,   928,   931,   934,
-     936,   938,   940,   942,   944,   946,   948,   950,   952,   954,
-     956,   958,   962,   963,   968,   969,   971
+      80,    82,    84,    86,    88,    90,    92,    95,   105,   106,
+     110,   113,   114,   120,   121,   127,   132,   134,   137,   139,
+     142,   145,   146,   154,   156,   159,   160,   166,   168,   171,
+     173,   176,   177,   183,   185,   188,   190,   195,   197,   200,
+     204,   209,   211,   215,   217,   220,   223,   226,   229,   232,
+     236,   238,   240,   242,   244,   245,   247,   250,   253,   256,
+     257,   260,   261,   264,   265,   268,   271,   274,   277,   280,
+     281,   283,   286,   289,   292,   295,   298,   301,   304,   307,
+     310,   313,   316,   319,   322,   325,   328,   331,   336,   339,
+     341,   344,   345,   354,   355,   357,   358,   360,   361,   363,
+     365,   368,   370,   372,   377,   378,   380,   381,   384,   385,
+     388,   390,   394,   396,   398,   400,   402,   404,   406,   407,
+     409,   411,   413,   415,   418,   420,   424,   426,   428,   433,
+     435,   437,   439,   441,   443,   445,   447,   448,   450,   454,
+     460,   472,   473,   481,   482,   486,   491,   492,   500,   501,
+     504,   506,   510,   512,   513,   517,   519,   522,   524,   526,
+     528,   530,   532,   534,   536,   538,   540,   542,   544,   546,
+     548,   550,   552,   554,   556,   558,   560,   562,   565,   568,
+     572,   576,   580,   583,   584,   586,   598,   599,   603,   605,
+     615,   616,   622,   623,   630,   631,   633,   647,   662,   676,
+     678,   680,   682,   684,   686,   688,   690,   692,   695,   698,
+     701,   704,   707,   710,   713,   716,   719,   722,   726,   730,
+     732,   735,   738,   740,   743,   746,   749,   751,   754,   755,
+     757,   758,   761,   762,   766,   768,   772,   774,   778,   780,
+     782,   784,   785,   788,   789,   792,   794,   795,   797,   801,
+     806,   811,   816,   820,   824,   831,   838,   842,   845,   846,
+     850,   852,   854,   856,   857,   861,   863,   871,   876,   880,
+     884,   885,   887,   888,   891,   893,   898,   901,   904,   906,
+     908,   911,   913,   915,   918,   921,   925,   927,   929,   931,
+     934,   937,   939,   941,   943,   945,   947,   949,   951,   953,
+     955,   957,   959,   961,   965,   966,   971,   972,   974
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
 static const short int yyrhs[] =
 {
-     128,     0,    -1,   129,    -1,   128,   129,    -1,    -1,   130,
-     131,    -1,   165,    -1,   163,    -1,   164,    -1,   133,    -1,
-     135,    -1,   175,    -1,   169,    -1,   170,    -1,   171,    -1,
-     154,    -1,   149,    -1,   153,    -1,   162,    -1,   176,    -1,
-     177,    -1,   187,    -1,   189,    -1,   190,    -1,   191,    -1,
-     192,    -1,   193,    -1,   194,    -1,   195,    -1,   139,    -1,
-     141,    -1,   132,    -1,   158,    -1,   161,    -1,   146,    -1,
-     217,    -1,   222,    -1,   219,    -1,   136,    -1,   216,    -1,
-     198,    -1,   238,    -1,   256,    -1,   178,    -1,     3,   105,
-     134,   106,    -1,    22,    -1,   134,   107,    22,    -1,     4,
-      -1,   100,   212,   137,   242,   108,   179,   138,   109,   110,
-      -1,    -1,   105,   212,   106,    -1,   101,   196,    -1,    -1,
-      18,   261,   242,   140,   143,    -1,    -1,   221,    18,   261,
-     142,   143,    -1,   108,   144,   109,   110,    -1,   145,    -1,
-     144,   145,    -1,   178,    -1,    34,   196,    -1,    35,   196,
-      -1,    -1,    88,    22,   147,   108,   148,   109,   110,    -1,
-     132,    -1,   148,   132,    -1,    -1,    90,   150,   108,   151,
-     109,    -1,   152,    -1,   151,   152,    -1,    22,    -1,    91,
-      22,    -1,    -1,    89,   155,   108,   156,   109,    -1,   157,
-      -1,   156,   157,    -1,    22,    -1,    20,   105,   160,   106,
-      -1,    22,    -1,   111,    22,    -1,   159,    75,    22,    -1,
-     159,    75,   111,    22,    -1,   159,    -1,   201,   112,   201,
-      -1,    21,    -1,    92,   242,    -1,    45,   167,    -1,    46,
-     167,    -1,   166,   167,   168,    -1,    43,    -1,    44,    -1,
+     130,     0,    -1,   131,    -1,   130,   131,    -1,    -1,   132,
+     133,    -1,   167,    -1,   165,    -1,   166,    -1,   135,    -1,
+     177,    -1,   171,    -1,   172,    -1,   173,    -1,   154,    -1,
+     149,    -1,   153,    -1,   162,    -1,   163,    -1,   164,    -1,
+     178,    -1,   179,    -1,   189,    -1,   191,    -1,   192,    -1,
+     193,    -1,   194,    -1,   195,    -1,   196,    -1,   197,    -1,
+     198,    -1,   139,    -1,   141,    -1,   134,    -1,   158,    -1,
+     161,    -1,   146,    -1,   220,    -1,   225,    -1,   222,    -1,
+     136,    -1,   219,    -1,   201,    -1,   241,    -1,   259,    -1,
+     180,    -1,     3,    22,    -1,   100,   215,   137,   245,   107,
+     181,   138,   108,   109,    -1,    -1,   110,   215,   111,    -1,
+     101,   199,    -1,    -1,    18,   264,   245,   140,   143,    -1,
+      -1,   224,    18,   264,   142,   143,    -1,   107,   144,   108,
+     109,    -1,   145,    -1,   144,   145,    -1,   180,    -1,    34,
+     199,    -1,    35,   199,    -1,    -1,    88,    22,   147,   107,
+     148,   108,   109,    -1,   134,    -1,   148,   134,    -1,    -1,
+      90,   150,   107,   151,   108,    -1,   152,    -1,   151,   152,
+      -1,    22,    -1,    91,    22,    -1,    -1,    89,   155,   107,
+     156,   108,    -1,   157,    -1,   156,   157,    -1,    22,    -1,
+      20,   110,   160,   111,    -1,    22,    -1,   112,    22,    -1,
+     159,    75,    22,    -1,   159,    75,   112,    22,    -1,   159,
+      -1,   204,   113,   204,    -1,    21,    -1,    92,   245,    -1,
+     105,   169,    -1,   106,   169,    -1,    45,   169,    -1,    46,
+     169,    -1,   168,   169,   170,    -1,    43,    -1,    44,    -1,
       22,    -1,    23,    -1,    -1,    85,    -1,    37,    23,    -1,
-      38,    23,    -1,    39,    23,    -1,    -1,     8,   196,    -1,
-      -1,     9,   196,    -1,    -1,    10,   196,    -1,    17,   196,
-      -1,    40,   196,    -1,    41,   196,    -1,    42,   196,    -1,
-      -1,   178,    -1,    26,   196,    -1,    27,   196,    -1,    28,
-     196,    -1,    29,   196,    -1,    30,   196,    -1,    31,   196,
-      -1,    32,   196,    -1,    14,   196,    -1,    15,   196,    -1,
-      11,   196,    -1,    12,   196,    -1,    13,   196,    -1,    16,
-     196,    -1,     5,   196,    -1,     6,   196,    -1,     7,    23,
-     200,   196,    -1,   197,    21,    -1,    19,    -1,   197,    19,
-      -1,    -1,    71,   201,   242,   199,   108,   202,   109,   110,
-      -1,    -1,    23,    -1,    -1,    22,    -1,    -1,   203,    -1,
-     204,    -1,   203,   204,    -1,   158,    -1,   161,    -1,    22,
-     206,   242,   205,    -1,    -1,   107,    -1,    -1,   113,   211,
-      -1,    -1,   113,   208,    -1,   211,    -1,   208,   209,   211,
-      -1,   112,    -1,   114,    -1,   115,    -1,   116,    -1,   117,
-      -1,   118,    -1,    -1,   111,    -1,   119,    -1,   112,    -1,
-     114,    -1,   210,   214,    -1,   213,    -1,   212,    74,   213,
-      -1,    22,    -1,   212,    -1,   261,   105,   215,   106,    -1,
-      86,    -1,    85,    -1,    94,    -1,    95,    -1,    96,    -1,
-      24,    -1,    93,    -1,    -1,   208,    -1,   215,   107,   208,
-      -1,    87,   257,    22,   242,   110,    -1,    87,   257,   105,
-     260,    22,   106,   105,   262,   106,   242,   110,    -1,    -1,
-      48,   212,   218,   224,   242,   227,   110,    -1,    -1,   221,
-     220,   222,    -1,   103,   120,   262,   121,    -1,    -1,    47,
-     212,   223,   224,   242,   227,   110,    -1,    -1,   122,   225,
-      -1,   226,    -1,   225,   107,   226,    -1,   212,    -1,    -1,
-     108,   228,   109,    -1,   229,    -1,   228,   229,    -1,   158,
-      -1,   161,    -1,   146,    -1,   217,    -1,   222,    -1,   136,
-      -1,   216,    -1,   198,    -1,   188,    -1,   178,    -1,   180,
-      -1,   181,    -1,   182,    -1,   183,    -1,   184,    -1,   185,
-      -1,   186,    -1,   232,    -1,   231,    -1,   251,    -1,    36,
-     196,    -1,    35,   196,    -1,    49,   230,   122,    -1,    50,
-     230,   122,    -1,    51,   230,   122,    -1,    52,   122,    -1,
-      -1,    53,    -1,   237,   119,    22,   105,   106,   263,   241,
-     242,   110,   246,   247,    -1,    -1,   102,   233,   234,    -1,
-     234,    -1,    22,   105,   248,   106,   263,   242,   235,   110,
-     246,    -1,    -1,   123,   105,   248,   106,   124,    -1,    -1,
-     123,   257,   105,   248,   106,   124,    -1,    -1,    70,    -1,
-     257,    22,   105,   248,   106,   240,   263,   241,   242,   236,
-     110,   246,   247,    -1,   257,    97,   239,   105,   248,   106,
-     240,   263,   241,   242,   236,   110,   246,   247,    -1,    97,
-     257,   105,   248,   106,   240,   263,   241,   242,   236,   110,
-     246,   247,    -1,   114,    -1,   112,    -1,   115,    -1,   116,
-      -1,   125,    -1,   117,    -1,   118,    -1,   126,    -1,   120,
-     120,    -1,   121,   121,    -1,   114,   113,    -1,   112,   113,
-      -1,   115,   113,    -1,   116,   113,    -1,   125,   113,    -1,
-     117,   113,    -1,   118,   113,    -1,   126,   113,    -1,   120,
-     120,   113,    -1,   121,   121,   113,    -1,   119,    -1,   105,
-     106,    -1,   123,   124,    -1,   120,    -1,   120,   113,    -1,
-     113,   113,    -1,   111,   113,    -1,   121,    -1,   121,   113,
-      -1,    -1,    76,    -1,    -1,   113,    85,    -1,    -1,   116,
-     243,   116,    -1,   244,    -1,   243,   107,   244,    -1,    22,
-      -1,    22,   113,   245,    -1,    22,    -1,    24,    -1,    85,
-      -1,    -1,    33,   196,    -1,    -1,    25,   196,    -1,   249,
-      -1,    -1,   250,    -1,   249,   107,   250,    -1,    78,   201,
-     242,   207,    -1,    79,   201,   242,   207,    -1,    80,   201,
-     242,   207,    -1,    81,   201,   242,    -1,    82,   201,   242,
-      -1,    83,   105,   248,   106,   201,   242,    -1,    84,   105,
-     248,   106,   201,   242,    -1,    99,   201,   242,    -1,   258,
-     207,    -1,    -1,    77,   252,   253,    -1,   253,    -1,   254,
-      -1,   256,    -1,    -1,    70,   255,   238,    -1,   238,    -1,
-     257,    22,   242,   110,   172,   173,   174,    -1,    76,   261,
-     260,   259,    -1,   261,   260,   259,    -1,   257,   201,   242,
-      -1,    -1,   117,    -1,    -1,   260,   115,    -1,   212,    -1,
-     212,   120,   262,   121,    -1,    48,   212,    -1,    73,    55,
-      -1,    55,    -1,    73,    -1,    73,    56,    -1,    56,    -1,
-      57,    -1,    73,    57,    -1,    57,    57,    -1,    73,    57,
-      57,    -1,    58,    -1,    59,    -1,    54,    -1,    72,    60,
-      -1,    73,    60,    -1,    60,    -1,    61,    -1,    62,    -1,
-      63,    -1,    64,    -1,    65,    -1,    66,    -1,    67,    -1,
-      68,    -1,    69,    -1,   104,    -1,   257,    -1,   262,   107,
-     257,    -1,    -1,    98,   105,   264,   106,    -1,    -1,   212,
-      -1,   264,   107,   212,    -1
+      38,    23,    -1,    39,    23,    -1,    -1,     7,   199,    -1,
+      -1,     8,   199,    -1,    -1,     9,   199,    -1,    17,   199,
+      -1,    40,   199,    -1,    41,   199,    -1,    42,   199,    -1,
+      -1,   180,    -1,    26,   199,    -1,    27,   199,    -1,    28,
+     199,    -1,    29,   199,    -1,    30,   199,    -1,    31,   199,
+      -1,    32,   199,    -1,    14,   199,    -1,    15,   199,    -1,
+      10,   199,    -1,    11,   199,    -1,    12,   199,    -1,    13,
+     199,    -1,    16,   199,    -1,     4,   199,    -1,     5,   199,
+      -1,     6,    23,   203,   199,    -1,   200,    21,    -1,    19,
+      -1,   200,    19,    -1,    -1,    71,   204,   245,   202,   107,
+     205,   108,   109,    -1,    -1,    23,    -1,    -1,    22,    -1,
+      -1,   206,    -1,   207,    -1,   206,   207,    -1,   158,    -1,
+     161,    -1,    22,   209,   245,   208,    -1,    -1,   114,    -1,
+      -1,   115,   214,    -1,    -1,   115,   211,    -1,   214,    -1,
+     211,   212,   214,    -1,   113,    -1,   116,    -1,   117,    -1,
+     118,    -1,   119,    -1,   120,    -1,    -1,   112,    -1,   121,
+      -1,   113,    -1,   116,    -1,   213,   217,    -1,   216,    -1,
+     215,    74,   216,    -1,    22,    -1,   215,    -1,   264,   110,
+     218,   111,    -1,    86,    -1,    85,    -1,    94,    -1,    95,
+      -1,    96,    -1,    24,    -1,    93,    -1,    -1,   211,    -1,
+     218,   114,   211,    -1,    87,   260,    22,   245,   109,    -1,
+      87,   260,   110,   263,    22,   111,   110,   265,   111,   245,
+     109,    -1,    -1,    48,   215,   221,   227,   245,   230,   109,
+      -1,    -1,   224,   223,   225,    -1,   103,   122,   265,   123,
+      -1,    -1,    47,   215,   226,   227,   245,   230,   109,    -1,
+      -1,   124,   228,    -1,   229,    -1,   228,   114,   229,    -1,
+     215,    -1,    -1,   107,   231,   108,    -1,   232,    -1,   231,
+     232,    -1,   158,    -1,   161,    -1,   146,    -1,   220,    -1,
+     225,    -1,   136,    -1,   219,    -1,   201,    -1,   190,    -1,
+     180,    -1,   182,    -1,   183,    -1,   184,    -1,   185,    -1,
+     186,    -1,   187,    -1,   188,    -1,   235,    -1,   234,    -1,
+     254,    -1,    36,   199,    -1,    35,   199,    -1,    49,   233,
+     124,    -1,    50,   233,   124,    -1,    51,   233,   124,    -1,
+      52,   124,    -1,    -1,    53,    -1,   240,   121,    22,   110,
+     111,   266,   244,   245,   109,   249,   250,    -1,    -1,   102,
+     236,   237,    -1,   237,    -1,    22,   110,   251,   111,   266,
+     245,   238,   109,   249,    -1,    -1,   125,   110,   251,   111,
+     126,    -1,    -1,   125,   260,   110,   251,   111,   126,    -1,
+      -1,    70,    -1,   260,    22,   110,   251,   111,   243,   266,
+     244,   245,   239,   109,   249,   250,    -1,   260,    97,   242,
+     110,   251,   111,   243,   266,   244,   245,   239,   109,   249,
+     250,    -1,    97,   260,   110,   251,   111,   243,   266,   244,
+     245,   239,   109,   249,   250,    -1,   116,    -1,   113,    -1,
+     117,    -1,   118,    -1,   127,    -1,   119,    -1,   120,    -1,
+     128,    -1,   122,   122,    -1,   123,   123,    -1,   116,   115,
+      -1,   113,   115,    -1,   117,   115,    -1,   118,   115,    -1,
+     127,   115,    -1,   119,   115,    -1,   120,   115,    -1,   128,
+     115,    -1,   122,   122,   115,    -1,   123,   123,   115,    -1,
+     121,    -1,   110,   111,    -1,   125,   126,    -1,   122,    -1,
+     122,   115,    -1,   115,   115,    -1,   112,   115,    -1,   123,
+      -1,   123,   115,    -1,    -1,    76,    -1,    -1,   115,    85,
+      -1,    -1,   118,   246,   118,    -1,   247,    -1,   246,   114,
+     247,    -1,    22,    -1,    22,   115,   248,    -1,   169,    -1,
+      24,    -1,    85,    -1,    -1,    33,   199,    -1,    -1,    25,
+     199,    -1,   252,    -1,    -1,   253,    -1,   252,   114,   253,
+      -1,    78,   204,   245,   210,    -1,    79,   204,   245,   210,
+      -1,    80,   204,   245,   210,    -1,    81,   204,   245,    -1,
+      82,   204,   245,    -1,    83,   110,   251,   111,   204,   245,
+      -1,    84,   110,   251,   111,   204,   245,    -1,    99,   204,
+     245,    -1,   261,   210,    -1,    -1,    77,   255,   256,    -1,
+     256,    -1,   257,    -1,   259,    -1,    -1,    70,   258,   241,
+      -1,   241,    -1,   260,    22,   245,   109,   174,   175,   176,
+      -1,    76,   264,   263,   262,    -1,   264,   263,   262,    -1,
+     260,   204,   245,    -1,    -1,   119,    -1,    -1,   263,   117,
+      -1,   215,    -1,   215,   122,   265,   123,    -1,    48,   215,
+      -1,    73,    55,    -1,    55,    -1,    73,    -1,    73,    56,
+      -1,    56,    -1,    57,    -1,    73,    57,    -1,    57,    57,
+      -1,    73,    57,    57,    -1,    58,    -1,    59,    -1,    54,
+      -1,    72,    60,    -1,    73,    60,    -1,    60,    -1,    61,
+      -1,    62,    -1,    63,    -1,    64,    -1,    65,    -1,    66,
+      -1,    67,    -1,    68,    -1,    69,    -1,   104,    -1,   260,
+      -1,   265,   114,   260,    -1,    -1,    98,   110,   267,   111,
+      -1,    -1,   215,    -1,   267,   114,   215,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const unsigned short int yyrline[] =
 {
-       0,   310,   310,   311,   314,   314,   333,   334,   335,   336,
-     337,   338,   339,   340,   341,   342,   343,   344,   345,   346,
-     350,   354,   358,   359,   360,   361,   362,   363,   364,   365,
-     366,   367,   370,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   394,   397,   400,   405,   414,   449,
-     453,   527,   532,   532,   538,   538,   587,   601,   602,   605,
-     609,   618,   629,   629,   669,   670,   673,   673,   700,   701,
-     704,   709,   714,   714,   739,   740,   743,   748,   761,   764,
-     767,   770,   775,   776,   781,   787,   814,   827,   840,   873,
-     876,   881,   882,   898,   901,   904,   909,   914,   919,   922,
-     927,   930,   935,   938,   943,   948,   953,   958,   963,   966,
-     969,   974,   979,   984,   989,   994,   999,  1004,  1009,  1014,
-    1020,  1026,  1032,  1041,  1047,  1052,  1058,  1061,  1062,  1073,
-    1073,  1084,  1087,  1092,  1095,  1100,  1101,  1104,  1105,  1108,
-    1109,  1110,  1137,  1138,  1141,  1142,  1145,  1148,  1153,  1154,
-    1172,  1175,  1178,  1181,  1184,  1187,  1192,  1195,  1198,  1201,
-    1204,  1209,  1227,  1228,  1236,  1241,  1250,  1260,  1264,  1268,
-    1272,  1276,  1280,  1284,  1290,  1295,  1301,  1319,  1323,  1346,
-    1346,  1366,  1366,  1393,  1398,  1398,  1413,  1414,  1417,  1418,
-    1421,  1460,  1463,  1468,  1469,  1472,  1473,  1474,  1475,  1476,
-    1477,  1478,  1479,  1480,  1484,  1488,  1499,  1510,  1521,  1532,
-    1543,  1554,  1565,  1566,  1567,  1568,  1579,  1590,  1597,  1604,
-    1611,  1620,  1623,  1628,  1677,  1677,  1678,  1681,  1707,  1710,
-    1717,  1720,  1728,  1731,  1736,  1753,  1778,  1854,  1855,  1856,
-    1857,  1858,  1859,  1860,  1861,  1862,  1863,  1864,  1865,  1866,
-    1867,  1868,  1869,  1870,  1871,  1872,  1873,  1874,  1875,  1876,
-    1877,  1878,  1879,  1880,  1881,  1882,  1885,  1888,  1893,  1896,
-    1904,  1907,  1913,  1917,  1929,  1933,  1939,  1943,  1947,  1953,
-    1956,  1961,  1964,  1969,  2017,  2022,  2028,  2055,  2064,  2073,
-    2082,  2093,  2101,  2116,  2131,  2137,  2143,  2143,  2144,  2147,
-    2148,  2151,  2151,  2152,  2155,  2188,  2194,  2202,  2262,  2265,
-    2273,  2276,  2281,  2292,  2306,  2323,  2330,  2337,  2344,  2351,
-    2358,  2365,  2372,  2379,  2386,  2393,  2400,  2407,  2414,  2421,
-    2428,  2435,  2442,  2449,  2456,  2463,  2470,  2477,  2484,  2491,
-    2500,  2506,  2522,  2525,  2533,  2539,  2546
+       0,   313,   313,   314,   317,   317,   336,   337,   338,   339,
+     340,   341,   342,   343,   344,   345,   346,   347,   348,   349,
+     350,   354,   358,   362,   363,   364,   365,   366,   367,   368,
+     369,   370,   371,   372,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,   385,   386,   399,   404,   439,   443,
+     517,   522,   522,   528,   528,   577,   591,   592,   595,   599,
+     608,   619,   619,   650,   651,   654,   654,   681,   682,   685,
+     690,   695,   695,   720,   721,   724,   729,   742,   745,   748,
+     751,   756,   757,   762,   768,   795,   806,   817,   830,   843,
+     876,   879,   884,   885,   901,   904,   907,   912,   917,   922,
+     925,   930,   933,   938,   941,   946,   951,   956,   961,   966,
+     969,   972,   977,   982,   987,   992,   997,  1002,  1007,  1012,
+    1017,  1023,  1029,  1035,  1041,  1050,  1056,  1061,  1067,  1070,
+    1071,  1082,  1082,  1093,  1096,  1101,  1104,  1109,  1110,  1113,
+    1114,  1117,  1118,  1119,  1146,  1147,  1150,  1151,  1154,  1157,
+    1162,  1163,  1181,  1184,  1187,  1190,  1193,  1196,  1201,  1204,
+    1207,  1210,  1213,  1218,  1236,  1237,  1245,  1250,  1259,  1269,
+    1273,  1277,  1281,  1285,  1289,  1293,  1299,  1304,  1310,  1328,
+    1332,  1355,  1355,  1375,  1375,  1402,  1407,  1407,  1422,  1423,
+    1426,  1427,  1430,  1469,  1472,  1477,  1478,  1481,  1482,  1483,
+    1484,  1485,  1486,  1487,  1488,  1489,  1493,  1497,  1508,  1519,
+    1530,  1541,  1552,  1563,  1574,  1575,  1576,  1577,  1588,  1599,
+    1606,  1613,  1620,  1629,  1632,  1637,  1686,  1686,  1687,  1690,
+    1716,  1719,  1726,  1729,  1737,  1740,  1745,  1762,  1787,  1863,
+    1864,  1865,  1866,  1867,  1868,  1869,  1870,  1871,  1872,  1873,
+    1874,  1875,  1876,  1877,  1878,  1879,  1880,  1881,  1882,  1883,
+    1884,  1885,  1886,  1887,  1888,  1889,  1890,  1891,  1894,  1897,
+    1902,  1905,  1913,  1916,  1922,  1926,  1938,  1942,  1948,  1952,
+    1956,  1962,  1965,  1970,  1973,  1978,  2026,  2031,  2037,  2064,
+    2073,  2082,  2091,  2102,  2110,  2125,  2140,  2146,  2152,  2152,
+    2153,  2156,  2157,  2160,  2160,  2161,  2164,  2197,  2203,  2211,
+    2271,  2274,  2282,  2285,  2290,  2301,  2315,  2332,  2339,  2346,
+    2353,  2360,  2367,  2374,  2381,  2388,  2395,  2402,  2409,  2416,
+    2423,  2430,  2437,  2444,  2451,  2458,  2465,  2472,  2479,  2486,
+    2493,  2500,  2509,  2515,  2531,  2534,  2542,  2548,  2555
 };
 #endif
 
@@ -774,9 +780,9 @@ static const unsigned short int yyrline[] =
    First, the terminals, then, starting at YYNTOKENS, nonterminals. */
 static const char *const yytname[] =
 {
-  &quot;$end&quot;, &quot;error&quot;, &quot;$undefined&quot;, &quot;TK_OPTIONS&quot;, &quot;TK_NOEMITTERS&quot;, &quot;TK_DOC&quot;,
-  &quot;TK_EXPORTEDDOC&quot;, &quot;TK_MAKEFILE&quot;, &quot;TK_ACCESSCODE&quot;, &quot;TK_GETCODE&quot;,
-  &quot;TK_SETCODE&quot;, &quot;TK_PREINITCODE&quot;, &quot;TK_POSTINITCODE&quot;, &quot;TK_UNITCODE&quot;,
+  &quot;$end&quot;, &quot;error&quot;, &quot;$undefined&quot;, &quot;TK_PLUGIN&quot;, &quot;TK_DOC&quot;, &quot;TK_EXPORTEDDOC&quot;,
+  &quot;TK_MAKEFILE&quot;, &quot;TK_ACCESSCODE&quot;, &quot;TK_GETCODE&quot;, &quot;TK_SETCODE&quot;,
+  &quot;TK_PREINITCODE&quot;, &quot;TK_INITCODE&quot;, &quot;TK_POSTINITCODE&quot;, &quot;TK_UNITCODE&quot;,
   &quot;TK_MODCODE&quot;, &quot;TK_TYPECODE&quot;, &quot;TK_PREPYCODE&quot;, &quot;TK_COPYING&quot;,
   &quot;TK_MAPPEDTYPE&quot;, &quot;TK_CODELINE&quot;, &quot;TK_IF&quot;, &quot;TK_END&quot;, &quot;TK_NAME&quot;,
   &quot;TK_PATHNAME&quot;, &quot;TK_STRING&quot;, &quot;TK_VIRTUALCATCHERCODE&quot;, &quot;TK_TRAVERSECODE&quot;,
@@ -796,26 +802,27 @@ static const char *const yytname[] =
   &quot;TK_TYPEDEF&quot;, &quot;TK_NAMESPACE&quot;, &quot;TK_TIMELINE&quot;, &quot;TK_PLATFORMS&quot;,
   &quot;TK_FEATURE&quot;, &quot;TK_LICENSE&quot;, &quot;TK_QCHAR&quot;, &quot;TK_TRUE&quot;, &quot;TK_FALSE&quot;, &quot;TK_NULL&quot;,
   &quot;TK_OPERATOR&quot;, &quot;TK_THROW&quot;, &quot;TK_QOBJECT&quot;, &quot;TK_EXCEPTION&quot;, &quot;TK_RAISECODE&quot;,
-  &quot;TK_EXPLICIT&quot;, &quot;TK_TEMPLATE&quot;, &quot;TK_ELLIPSIS&quot;, &quot;'('&quot;, &quot;')'&quot;, &quot;','&quot;, &quot;'{'&quot;,
-  &quot;'}'&quot;, &quot;';'&quot;, &quot;'!'&quot;, &quot;'-'&quot;, &quot;'='&quot;, &quot;'+'&quot;, &quot;'*'&quot;, &quot;'/'&quot;, &quot;'&amp;'&quot;, &quot;'|'&quot;,
-  &quot;'~'&quot;, &quot;'&lt;'&quot;, &quot;'&gt;'&quot;, &quot;':'&quot;, &quot;'['&quot;, &quot;']'&quot;, &quot;'%'&quot;, &quot;'^'&quot;, &quot;$accept&quot;,
-  &quot;specification&quot;, &quot;statement&quot;, &quot;@1&quot;, &quot;modstatement&quot;, &quot;nsstatement&quot;,
-  &quot;options&quot;, &quot;optionlist&quot;, &quot;noemitters&quot;, &quot;exception&quot;, &quot;baseexception&quot;,
-  &quot;raisecode&quot;, &quot;mappedtype&quot;, &quot;@2&quot;, &quot;mappedtypetmpl&quot;, &quot;@3&quot;, &quot;mtdefinition&quot;,
-  &quot;mtbody&quot;, &quot;mtline&quot;, &quot;namespace&quot;, &quot;@4&quot;, &quot;nsbody&quot;, &quot;platforms&quot;, &quot;@5&quot;,
-  &quot;platformlist&quot;, &quot;platform&quot;, &quot;feature&quot;, &quot;timeline&quot;, &quot;@6&quot;, &quot;qualifierlist&quot;,
-  &quot;qualifiername&quot;, &quot;ifstart&quot;, &quot;oredqualifiers&quot;, &quot;qualifiers&quot;, &quot;ifend&quot;,
-  &quot;license&quot;, &quot;consmodule&quot;, &quot;compmodule&quot;, &quot;module&quot;, &quot;modlang&quot;, &quot;modname&quot;,
+  &quot;TK_EXPLICIT&quot;, &quot;TK_TEMPLATE&quot;, &quot;TK_ELLIPSIS&quot;, &quot;TK_DEFMETATYPE&quot;,
+  &quot;TK_DEFSUPERTYPE&quot;, &quot;'{'&quot;, &quot;'}'&quot;, &quot;';'&quot;, &quot;'('&quot;, &quot;')'&quot;, &quot;'!'&quot;, &quot;'-'&quot;,
+  &quot;','&quot;, &quot;'='&quot;, &quot;'+'&quot;, &quot;'*'&quot;, &quot;'/'&quot;, &quot;'&amp;'&quot;, &quot;'|'&quot;, &quot;'~'&quot;, &quot;'&lt;'&quot;, &quot;'&gt;'&quot;,
+  &quot;':'&quot;, &quot;'['&quot;, &quot;']'&quot;, &quot;'%'&quot;, &quot;'^'&quot;, &quot;$accept&quot;, &quot;specification&quot;,
+  &quot;statement&quot;, &quot;@1&quot;, &quot;modstatement&quot;, &quot;nsstatement&quot;, &quot;plugin&quot;, &quot;exception&quot;,
+  &quot;baseexception&quot;, &quot;raisecode&quot;, &quot;mappedtype&quot;, &quot;@2&quot;, &quot;mappedtypetmpl&quot;, &quot;@3&quot;,
+  &quot;mtdefinition&quot;, &quot;mtbody&quot;, &quot;mtline&quot;, &quot;namespace&quot;, &quot;@4&quot;, &quot;nsbody&quot;,
+  &quot;platforms&quot;, &quot;@5&quot;, &quot;platformlist&quot;, &quot;platform&quot;, &quot;feature&quot;, &quot;timeline&quot;,
+  &quot;@6&quot;, &quot;qualifierlist&quot;, &quot;qualifiername&quot;, &quot;ifstart&quot;, &quot;oredqualifiers&quot;,
+  &quot;qualifiers&quot;, &quot;ifend&quot;, &quot;license&quot;, &quot;defmetatype&quot;, &quot;defsupertype&quot;,
+  &quot;consmodule&quot;, &quot;compmodule&quot;, &quot;module&quot;, &quot;modlang&quot;, &quot;dottedname&quot;,
   &quot;optnumber&quot;, &quot;include&quot;, &quot;optinclude&quot;, &quot;import&quot;, &quot;optaccesscode&quot;,
   &quot;optgetcode&quot;, &quot;optsetcode&quot;, &quot;copying&quot;, &quot;exphdrcode&quot;, &quot;modhdrcode&quot;,
   &quot;typehdrcode&quot;, &quot;opttypehdrcode&quot;, &quot;travcode&quot;, &quot;clearcode&quot;, &quot;readbufcode&quot;,
   &quot;writebufcode&quot;, &quot;segcountcode&quot;, &quot;charbufcode&quot;, &quot;picklecode&quot;, &quot;modcode&quot;,
-  &quot;typecode&quot;, &quot;preinitcode&quot;, &quot;postinitcode&quot;, &quot;unitcode&quot;, &quot;prepycode&quot;,
-  &quot;doc&quot;, &quot;exporteddoc&quot;, &quot;makefile&quot;, &quot;codeblock&quot;, &quot;codelines&quot;, &quot;enum&quot;, &quot;@7&quot;,
-  &quot;optfilename&quot;, &quot;optname&quot;, &quot;optenumbody&quot;, &quot;enumbody&quot;, &quot;enumline&quot;,
-  &quot;optcomma&quot;, &quot;optenumassign&quot;, &quot;optassign&quot;, &quot;expr&quot;, &quot;binop&quot;, &quot;optunop&quot;,
-  &quot;value&quot;, &quot;scopedname&quot;, &quot;scopepart&quot;, &quot;simplevalue&quot;, &quot;exprlist&quot;, &quot;typedef&quot;,
-  &quot;struct&quot;, &quot;@8&quot;, &quot;classtmpl&quot;, &quot;@9&quot;, &quot;template&quot;, &quot;class&quot;, &quot;@10&quot;,
+  &quot;typecode&quot;, &quot;preinitcode&quot;, &quot;initcode&quot;, &quot;postinitcode&quot;, &quot;unitcode&quot;,
+  &quot;prepycode&quot;, &quot;doc&quot;, &quot;exporteddoc&quot;, &quot;makefile&quot;, &quot;codeblock&quot;, &quot;codelines&quot;,
+  &quot;enum&quot;, &quot;@7&quot;, &quot;optfilename&quot;, &quot;optname&quot;, &quot;optenumbody&quot;, &quot;enumbody&quot;,
+  &quot;enumline&quot;, &quot;optcomma&quot;, &quot;optenumassign&quot;, &quot;optassign&quot;, &quot;expr&quot;, &quot;binop&quot;,
+  &quot;optunop&quot;, &quot;value&quot;, &quot;scopedname&quot;, &quot;scopepart&quot;, &quot;simplevalue&quot;, &quot;exprlist&quot;,
+  &quot;typedef&quot;, &quot;struct&quot;, &quot;@8&quot;, &quot;classtmpl&quot;, &quot;@9&quot;, &quot;template&quot;, &quot;class&quot;, &quot;@10&quot;,
   &quot;superclasses&quot;, &quot;superlist&quot;, &quot;superclass&quot;, &quot;optclassbody&quot;, &quot;classbody&quot;,
   &quot;classline&quot;, &quot;optslot&quot;, &quot;dtor&quot;, &quot;ctor&quot;, &quot;@11&quot;, &quot;simplector&quot;,
   &quot;optctorsig&quot;, &quot;optsig&quot;, &quot;optvirtual&quot;, &quot;function&quot;, &quot;operatorname&quot;,
@@ -842,50 +849,50 @@ static const unsigned short int yytoknum[] =
      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
      335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
      345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
-     355,   356,   357,   358,   359,    40,    41,    44,   123,   125,
-      59,    33,    45,    61,    43,    42,    47,    38,   124,   126,
-      60,    62,    58,    91,    93,    37,    94
+     355,   356,   357,   358,   359,   360,   361,   123,   125,    59,
+      40,    41,    33,    45,    44,    61,    43,    42,    47,    38,
+     124,   126,    60,    62,    58,    91,    93,    37,    94
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const unsigned short int yyr1[] =
 {
-       0,   127,   128,   128,   130,   129,   131,   131,   131,   131,
-     131,   131,   131,   131,   131,   131,   131,   131,   131,   131,
-     131,   131,   131,   131,   131,   131,   131,   131,   131,   131,
-     131,   131,   132,   132,   132,   132,   132,   132,   132,   132,
-     132,   132,   132,   132,   133,   134,   134,   135,   136,   137,
-     137,   138,   140,   139,   142,   141,   143,   144,   144,   145,
-     145,   145,   147,   146,   148,   148,   150,   149,   151,   151,
-     152,   153,   155,   154,   156,   156,   157,   158,   159,   159,
-     159,   159,   160,   160,   161,   162,   163,   164,   165,   166,
-     166,   167,   167,   168,   168,   169,   170,   171,   172,   172,
-     173,   173,   174,   174,   175,   176,   177,   178,   179,   179,
-     180,   181,   182,   183,   184,   185,   186,   187,   188,   189,
-     190,   191,   192,   193,   194,   195,   196,   197,   197,   199,
-     198,   200,   200,   201,   201,   202,   202,   203,   203,   204,
-     204,   204,   205,   205,   206,   206,   207,   207,   208,   208,
-     209,   209,   209,   209,   209,   209,   210,   210,   210,   210,
-     210,   211,   212,   212,   213,   214,   214,   214,   214,   214,
-     214,   214,   214,   214,   215,   215,   215,   216,   216,   218,
-     217,   220,   219,   221,   223,   222,   224,   224,   225,   225,
-     226,   227,   227,   228,   228,   229,   229,   229,   229,   229,
-     229,   229,   229,   229,   229,   229,   229,   229,   229,   229,
-     229,   229,   229,   229,   229,   229,   229,   229,   229,   229,
-     229,   230,   230,   231,   233,   232,   232,   234,   235,   235,
-     236,   236,   237,   237,   238,   238,   238,   239,   239,   239,
-     239,   239,   239,   239,   239,   239,   239,   239,   239,   239,
-     239,   239,   239,   239,   239,   239,   239,   239,   239,   239,
-     239,   239,   239,   239,   239,   239,   240,   240,   241,   241,
-     242,   242,   243,   243,   244,   244,   245,   245,   245,   246,
-     246,   247,   247,   248,   249,   249,   249,   250,   250,   250,
-     250,   250,   250,   250,   250,   250,   252,   251,   251,   253,
-     253,   255,   254,   254,   256,   257,   257,   258,   259,   259,
-     260,   260,   261,   261,   261,   261,   261,   261,   261,   261,
-     261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
-     261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
-     262,   262,   263,   263,   264,   264,   264
+       0,   129,   130,   130,   132,   131,   133,   133,   133,   133,
+     133,   133,   133,   133,   133,   133,   133,   133,   133,   133,
+     133,   133,   133,   133,   133,   133,   133,   133,   133,   133,
+     133,   133,   133,   133,   134,   134,   134,   134,   134,   134,
+     134,   134,   134,   134,   134,   134,   135,   136,   137,   137,
+     138,   140,   139,   142,   141,   143,   144,   144,   145,   145,
+     145,   147,   146,   148,   148,   150,   149,   151,   151,   152,
+     153,   155,   154,   156,   156,   157,   158,   159,   159,   159,
+     159,   160,   160,   161,   162,   163,   164,   165,   166,   167,
+     168,   168,   169,   169,   170,   170,   171,   172,   173,   174,
+     174,   175,   175,   176,   176,   177,   178,   179,   180,   181,
+     181,   182,   183,   184,   185,   186,   187,   188,   189,   190,
+     191,   192,   193,   194,   195,   196,   197,   198,   199,   200,
+     200,   202,   201,   203,   203,   204,   204,   205,   205,   206,
+     206,   207,   207,   207,   208,   208,   209,   209,   210,   210,
+     211,   211,   212,   212,   212,   212,   212,   212,   213,   213,
+     213,   213,   213,   214,   215,   215,   216,   217,   217,   217,
+     217,   217,   217,   217,   217,   217,   218,   218,   218,   219,
+     219,   221,   220,   223,   222,   224,   226,   225,   227,   227,
+     228,   228,   229,   230,   230,   231,   231,   232,   232,   232,
+     232,   232,   232,   232,   232,   232,   232,   232,   232,   232,
+     232,   232,   232,   232,   232,   232,   232,   232,   232,   232,
+     232,   232,   232,   233,   233,   234,   236,   235,   235,   237,
+     238,   238,   239,   239,   240,   240,   241,   241,   241,   242,
+     242,   242,   242,   242,   242,   242,   242,   242,   242,   242,
+     242,   242,   242,   242,   242,   242,   242,   242,   242,   242,
+     242,   242,   242,   242,   242,   242,   242,   242,   243,   243,
+     244,   244,   245,   245,   246,   246,   247,   247,   248,   248,
+     248,   249,   249,   250,   250,   251,   252,   252,   252,   253,
+     253,   253,   253,   253,   253,   253,   253,   253,   255,   254,
+     254,   256,   256,   258,   257,   257,   259,   260,   260,   261,
+     262,   262,   263,   263,   264,   264,   264,   264,   264,   264,
+     264,   264,   264,   264,   264,   264,   264,   264,   264,   264,
+     264,   264,   264,   264,   264,   264,   264,   264,   264,   264,
+     264,   264,   265,   265,   266,   266,   267,   267,   267
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -895,37 +902,37 @@ static const unsigned char yyr2[] =
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     4,     1,     3,     1,     9,     0,
-       3,     2,     0,     5,     0,     5,     4,     1,     2,     1,
-       2,     2,     0,     7,     1,     2,     0,     5,     1,     2,
-       1,     2,     0,     5,     1,     2,     1,     4,     1,     2,
-       3,     4,     1,     3,     1,     2,     2,     2,     3,     1,
-       1,     1,     1,     0,     1,     2,     2,     2,     0,     2,
-       0,     2,     0,     2,     2,     2,     2,     2,     0,     1,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     4,     2,     1,     2,     0,
-       8,     0,     1,     0,     1,     0,     1,     1,     2,     1,
-       1,     4,     0,     1,     0,     2,     0,     2,     1,     3,
-       1,     1,     1,     1,     1,     1,     0,     1,     1,     1,
-       1,     2,     1,     3,     1,     1,     4,     1,     1,     1,
-       1,     1,     1,     1,     0,     1,     3,     5,    11,     0,
-       7,     0,     3,     4,     0,     7,     0,     2,     1,     3,
-       1,     0,     3,     1,     2,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     2,     2,     3,     3,     3,
-       2,     0,     1,    11,     0,     3,     1,     9,     0,     5,
-       0,     6,     0,     1,    13,    14,    13,     1,     1,     1,
-       1,     1,     1,     1,     1,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     3,     3,     1,     2,     2,
-       1,     2,     2,     2,     1,     2,     0,     1,     0,     2,
-       0,     3,     1,     3,     1,     3,     1,     1,     1,     0,
-       2,     0,     2,     1,     0,     1,     3,     4,     4,     4,
-       3,     3,     6,     6,     3,     2,     0,     3,     1,     1,
-       1,     0,     3,     1,     7,     4,     3,     3,     0,     1,
-       0,     2,     1,     4,     2,     2,     1,     1,     2,     1,
-       1,     2,     2,     3,     1,     1,     1,     2,     2,     1,
+       1,     1,     1,     1,     1,     1,     2,     9,     0,     3,
+       2,     0,     5,     0,     5,     4,     1,     2,     1,     2,
+       2,     0,     7,     1,     2,     0,     5,     1,     2,     1,
+       2,     0,     5,     1,     2,     1,     4,     1,     2,     3,
+       4,     1,     3,     1,     2,     2,     2,     2,     2,     3,
+       1,     1,     1,     1,     0,     1,     2,     2,     2,     0,
+       2,     0,     2,     0,     2,     2,     2,     2,     2,     0,
+       1,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     4,     2,     1,
+       2,     0,     8,     0,     1,     0,     1,     0,     1,     1,
+       2,     1,     1,     4,     0,     1,     0,     2,     0,     2,
+       1,     3,     1,     1,     1,     1,     1,     1,     0,     1,
+       1,     1,     1,     2,     1,     3,     1,     1,     4,     1,
+       1,     1,     1,     1,     1,     1,     0,     1,     3,     5,
+      11,     0,     7,     0,     3,     4,     0,     7,     0,     2,
+       1,     3,     1,     0,     3,     1,     2,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     3,     0,     4,     0,     1,     3
+       1,     1,     1,     1,     1,     1,     1,     2,     2,     3,
+       3,     3,     2,     0,     1,    11,     0,     3,     1,     9,
+       0,     5,     0,     6,     0,     1,    13,    14,    13,     1,
+       1,     1,     1,     1,     1,     1,     1,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     3,     3,     1,
+       2,     2,     1,     2,     2,     2,     1,     2,     0,     1,
+       0,     2,     0,     3,     1,     3,     1,     3,     1,     1,
+       1,     0,     2,     0,     2,     1,     0,     1,     3,     4,
+       4,     4,     3,     3,     6,     6,     3,     2,     0,     3,
+       1,     1,     1,     0,     3,     1,     7,     4,     3,     3,
+       0,     1,     0,     2,     1,     4,     2,     2,     1,     1,
+       2,     1,     1,     2,     2,     3,     1,     1,     1,     2,
+       2,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     3,     0,     4,     0,     1,     3
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -933,441 +940,451 @@ static const unsigned char yyr2[] =
    means the default is an error.  */
 static const unsigned short int yydefact[] =
 {
-       4,     4,     2,     0,     1,     3,     0,    47,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    84,
-     164,     0,     0,     0,     0,     0,     0,    89,    90,     0,
-       0,     0,     0,   326,   316,   319,   320,   324,   325,   329,
-     330,   331,   332,   333,   334,   335,   336,   337,   338,   133,
-       0,   317,     0,     0,     0,    72,    66,     0,   270,     0,
-       0,     0,   339,     5,    31,     9,    10,    38,    29,    30,
-      34,    16,    17,    15,    32,    33,    18,     7,     8,     6,
-       0,    12,    13,    14,    11,    19,    20,    43,    21,    22,
-      23,    24,    25,    26,    27,    28,    40,   312,   162,    39,
-      35,    37,   181,    36,    41,    42,     0,   310,     0,   127,
-     123,     0,   124,   131,   119,   120,   121,   117,   122,   104,
-       0,   270,   133,    95,    96,    97,   105,   106,   107,    91,
-      92,    86,    87,   184,   179,   322,   134,   270,   327,   315,
-     318,   321,   328,   310,     0,    62,     0,     0,    71,     0,
-      85,     0,    49,     0,    93,     0,     0,     0,     0,   270,
-       0,   308,    45,     0,   128,   126,   132,     0,   314,    52,
-      78,     0,    82,     0,     0,   186,   186,   129,   323,   308,
-     270,   310,     0,     0,     0,   274,     0,   272,   284,     0,
-     270,   340,     0,    94,    88,   163,     0,    54,   182,   284,
-       0,     0,     0,   238,     0,   237,   239,   240,   242,   243,
-     257,   260,   264,     0,   241,   244,     0,   311,   309,   306,
-      44,     0,   125,     0,    79,     0,    77,   133,     0,   270,
-     270,     0,   305,     0,     0,     0,    76,     0,    74,    70,
-       0,    68,     0,     0,   271,   133,   133,   133,   133,   133,
-       0,     0,   133,     0,   283,   285,   133,   146,     0,     0,
-       0,   183,   313,     0,     0,    98,   258,   263,   248,   262,
-     247,   249,   250,   252,   253,   261,   245,   265,   246,   259,
-     251,   254,   284,    46,     0,    53,    80,     0,    83,   190,
-     187,   188,   191,   191,   135,   177,     0,    64,     0,   181,
-      73,    75,    67,    69,   276,   277,   278,   275,   273,   270,
-     270,   270,   270,   270,   284,   284,   270,   266,     0,   270,
-     156,   295,    50,   108,   341,    55,   266,     0,   100,   255,
-     256,     0,     0,     0,     0,    57,    59,    81,     0,   232,
-       0,     0,   144,   139,   140,     0,   136,   137,     0,     0,
-      65,   146,   146,   146,   290,   291,     0,     0,   294,   267,
-     342,   286,   307,   157,   159,   160,   158,   147,     0,   148,
-     109,     0,   342,    99,     0,   102,   266,    60,    61,     0,
-      58,   189,     0,   164,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   221,   221,   221,     0,   301,   296,   224,
-     200,   197,   195,   196,   204,   205,   206,   207,   208,   209,
-     210,   211,   203,   202,   201,   198,   199,   232,   193,   213,
-     212,   226,     0,   303,   214,   298,   299,   300,   185,   180,
-     156,   270,     0,   138,     0,    63,   287,   288,   289,   133,
-     133,     0,   268,   150,   151,   152,   153,   154,   155,   156,
-     172,   168,   167,   173,   169,   170,   171,   165,   161,     0,
-       0,     0,   268,   101,     0,   304,   342,    56,   118,   284,
-     110,   111,   112,   113,   114,   115,   116,   216,   215,   222,
-       0,     0,     0,   220,     0,     0,     0,   192,   194,     0,
-     145,   142,   130,     0,   270,   270,   344,     0,   270,   149,
-     156,    51,     0,   270,   103,   268,     0,   217,   218,   219,
-     302,     0,   301,   297,     0,   225,     0,   143,   141,   270,
-     292,   293,   345,     0,   269,   230,   175,     0,    48,   230,
-     270,   342,     0,     0,     0,   343,     0,     0,     0,   166,
-     156,     0,   230,   270,   342,   178,   346,     0,   279,   176,
-     279,     0,   228,   268,   284,     0,   281,   281,   279,     0,
-       0,   270,     0,   280,     0,   236,   234,   281,   284,   279,
-       0,     0,   282,   235,     0,   227,   279,   231,     0,   281,
-     229,   223
+       4,     4,     2,     0,     1,     3,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    83,
+     166,     0,     0,     0,     0,     0,     0,    90,    91,     0,
+       0,     0,     0,   328,   318,   321,   322,   326,   327,   331,
+     332,   333,   334,   335,   336,   337,   338,   339,   340,   135,
+       0,   319,     0,     0,     0,    71,    65,     0,   272,     0,
+       0,     0,   341,     0,     0,     5,    33,     9,    40,    31,
+      32,    36,    15,    16,    14,    34,    35,    17,    18,    19,
+       7,     8,     6,     0,    11,    12,    13,    10,    20,    21,
+      45,    22,    23,    24,    25,    26,    27,    28,    29,    30,
+      42,   314,   164,    41,    37,    39,   183,    38,    43,    44,
+       0,   312,    46,   129,   125,     0,   126,   133,   120,   121,
+     122,   123,   118,   124,   105,     0,   272,   135,    96,    97,
+      98,   106,   107,   108,    92,    93,    87,    88,   186,   181,
+     324,   136,   272,   329,   317,   320,   323,   330,   312,     0,
+      61,     0,     0,    70,     0,    84,     0,    48,     0,    85,
+      86,    94,     0,     0,     0,     0,   272,     0,   310,   130,
+     128,   134,     0,   316,    51,    77,     0,    81,     0,     0,
+     188,   188,   131,   325,   310,   272,   312,     0,     0,     0,
+     276,     0,   274,   286,     0,   272,   342,     0,    95,    89,
+     165,     0,    53,   184,   286,     0,     0,     0,   240,     0,
+     239,   241,   242,   244,   245,   259,   262,   266,     0,   243,
+     246,     0,   313,   311,   308,   127,     0,    78,     0,    76,
+     135,     0,   272,   272,     0,   307,     0,     0,     0,    75,
+       0,    73,    69,     0,    67,     0,     0,   273,   135,   135,
+     135,   135,   135,     0,     0,   135,     0,   285,   287,   135,
+     148,     0,     0,     0,   185,   315,     0,     0,    99,   260,
+     265,   250,   264,   249,   251,   252,   254,   255,   263,   247,
+     267,   248,   261,   253,   256,   286,     0,    52,    79,     0,
+      82,   192,   189,   190,   193,   193,   137,   179,     0,    63,
+       0,   183,    72,    74,    66,    68,   279,   280,   278,   277,
+     275,   272,   272,   272,   272,   272,   286,   286,   272,   268,
+       0,   272,   158,   297,    49,   109,   343,    54,   268,     0,
+     101,   257,   258,     0,     0,     0,     0,    56,    58,    80,
+       0,   234,     0,     0,   146,   141,   142,     0,   138,   139,
+       0,     0,    64,   148,   148,   148,   292,   293,     0,     0,
+     296,   269,   344,   288,   309,   159,   161,   162,   160,   149,
+       0,   150,   110,     0,   344,   100,     0,   103,   268,    59,
+      60,     0,    57,   191,     0,   166,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   223,   223,   223,     0,   303,
+     298,   226,   202,   199,   197,   198,   206,   207,   208,   209,
+     210,   211,   212,   213,   205,   204,   203,   200,   201,   234,
+     195,   215,   214,   228,     0,   305,   216,   300,   301,   302,
+     187,   182,   158,   272,     0,   140,     0,    62,   289,   290,
+     291,   135,   135,     0,   270,   152,   153,   154,   155,   156,
+     157,   158,   174,   170,   169,   175,   171,   172,   173,   167,
+     163,     0,     0,     0,   270,   102,     0,   306,   344,    55,
+     119,   286,   111,   112,   113,   114,   115,   116,   117,   218,
+     217,   224,     0,     0,     0,   222,     0,     0,     0,   194,
+     196,     0,   147,   144,   132,     0,   272,   272,   346,     0,
+     272,   151,   158,    50,     0,   272,   104,   270,     0,   219,
+     220,   221,   304,     0,   303,   299,     0,   227,     0,   145,
+     143,   272,   294,   295,   347,     0,   271,   232,   177,     0,
+      47,   232,   272,   344,     0,     0,     0,   345,     0,     0,
+       0,   168,   158,     0,   232,   272,   344,   180,   348,     0,
+     281,   178,   281,     0,   230,   270,   286,     0,   283,   283,
+     281,     0,     0,   272,     0,   282,     0,   238,   236,   283,
+     286,   281,     0,     0,   284,   237,     0,   229,   281,   233,
+       0,   283,   231,   225
 };
 
 /* YYDEFGOTO[NTERM-NUM]. */
 static const short int yydefgoto[] =
 {
-      -1,     1,     2,     3,    63,    64,    65,   163,    66,    67,
-     190,   461,    68,   223,    69,   263,   285,   334,   335,    70,
-     182,   298,    71,   147,   240,   241,    72,    73,   146,   237,
-     238,    74,   172,   173,    75,    76,    77,    78,    79,    80,
-     131,   194,    81,    82,    83,   328,   375,   465,    84,    85,
-      86,    87,   371,   405,   406,   407,   408,   409,   410,   411,
-      88,   412,    89,    90,    91,    92,    93,    94,    95,   110,
-     111,    96,   231,   167,   137,   345,   346,   347,   518,   431,
-     321,   367,   449,   368,   369,    97,    98,   458,   527,    99,
-     100,   176,   101,   158,   299,   103,   175,   229,   290,   291,
-     340,   417,   418,   480,   419,   420,   486,   421,   560,   538,
-     422,   104,   216,   360,   498,   150,   186,   187,   307,   556,
-     565,   253,   254,   255,   424,   485,   425,   426,   484,   105,
-     256,   257,   219,   161,   107,   192,   442,   523
+      -1,     1,     2,     3,    65,    66,    67,    68,   195,   463,
+      69,   226,    70,   266,   287,   336,   337,    71,   187,   300,
+      72,   152,   243,   244,    73,    74,   151,   240,   241,    75,
+     177,   178,    76,    77,    78,    79,    80,    81,    82,    83,
+     136,   199,    84,    85,    86,   330,   377,   467,    87,    88,
+      89,    90,   373,   407,   408,   409,   410,   411,   412,   413,
+      91,   414,    92,    93,    94,    95,    96,    97,    98,    99,
+     114,   115,   100,   234,   172,   142,   347,   348,   349,   520,
+     433,   323,   369,   451,   370,   371,   101,   102,   460,   529,
+     103,   104,   181,   105,   165,   301,   107,   180,   232,   292,
+     293,   342,   419,   420,   482,   421,   422,   488,   423,   562,
+     540,   424,   108,   221,   362,   500,   155,   191,   192,   309,
+     558,   567,   256,   257,   258,   426,   487,   427,   428,   486,
+     109,   259,   260,   224,   168,   111,   197,   444,   525
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -443
+#define YYPACT_NINF -494
 static const short int yypact[] =
 {
-    -443,    63,  -443,   520,  -443,  -443,   -39,  -443,    66,    66,
-      68,    66,    66,    66,    66,    66,    66,   863,    23,  -443,
-    -443,    80,    86,   113,    66,    66,    66,  -443,  -443,   109,
-     109,   124,   124,  -443,  -443,  -443,    92,  -443,  -443,  -443,
-    -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,   139,
-     103,   188,   863,   439,   143,  -443,  -443,   148,    69,   439,
-     124,    59,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,
-    -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,
-     109,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,
-    -443,  -443,  -443,  -443,  -443,  -443,  -443,   -32,  -443,  -443,
-    -443,  -443,   170,  -443,  -443,  -443,    32,  -443,   169,  -443,
-    -443,    87,  -443,   209,  -443,  -443,  -443,  -443,  -443,  -443,
-     124,    69,     4,  -443,  -443,  -443,  -443,  -443,  -443,  -443,
-    -443,  -443,  -443,   137,    -1,  -443,  -443,    69,  -443,  -443,
-    -443,   178,  -443,  -443,     5,  -443,   144,   153,  -443,   234,
-    -443,   159,   -25,   439,   182,   124,   439,   863,   216,   -49,
-     160,    28,  -443,    67,  -443,  -443,  -443,    66,   137,  -443,
-     156,   247,   207,   181,   172,   166,   166,  -443,  -443,    28,
-      69,  -443,   185,   268,   272,   184,    26,  -443,   158,   124,
-      69,  -443,   -42,  -443,  -443,  -443,   -35,  -443,  -443,   158,
-     211,   189,   206,   212,   213,   214,   215,   217,   220,   221,
-    -443,   -52,   -26,   205,   222,   223,   233,  -443,  -443,  -443,
-    -443,   317,  -443,   232,  -443,    12,  -443,   139,   124,    69,
-      69,   235,  -443,   236,     3,   787,  -443,     8,  -443,  -443,
-      16,  -443,    19,   234,  -443,   139,   139,   139,   139,   139,
-     237,   239,   139,   241,   242,  -443,   139,   238,   -12,   245,
-     439,  -443,  -443,   232,   246,   342,  -443,  -443,  -443,  -443,
-    -443,  -443,  -443,  -443,  -443,  -443,   243,  -443,   249,  -443,
-    -443,  -443,   158,  -443,   141,  -443,  -443,   332,  -443,   137,
-     248,  -443,   250,   250,   229,  -443,   251,  -443,   728,  -443,
-    -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,    69,
-      69,    69,    69,    69,   158,   158,    69,   283,   158,    69,
-      45,  -443,  -443,   318,  -443,  -443,   283,    66,   354,  -443,
-    -443,   258,    66,    66,    18,  -443,  -443,  -443,   124,   669,
-     256,   257,   255,  -443,  -443,   260,   229,  -443,   265,   261,
-    -443,   238,   238,   238,  -443,  -443,   266,   278,  -443,  -443,
-     289,  -443,  -443,  -443,  -443,  -443,  -443,    81,   381,  -443,
-    -443,   290,   289,  -443,    66,   380,   283,  -443,  -443,   282,
-    -443,  -443,    66,   288,    66,    66,    66,    66,    66,    66,
-      66,    66,    66,   343,   343,   343,   273,   279,  -443,  -443,
-    -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,
-    -443,  -443,  -443,  -443,  -443,  -443,  -443,   606,  -443,  -443,
-    -443,  -443,   280,  -443,  -443,  -443,  -443,  -443,  -443,  -443,
-      45,    69,   287,  -443,   439,  -443,  -443,  -443,  -443,   139,
-     139,   295,   291,  -443,  -443,  -443,  -443,  -443,  -443,    45,
-    -443,  -443,  -443,  -443,  -443,  -443,  -443,   -27,  -443,   296,
-      66,   293,   291,  -443,    66,  -443,   289,  -443,  -443,   158,
-    -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,
-     284,   285,   286,  -443,   840,   244,   387,  -443,  -443,   389,
-    -443,   305,  -443,   102,    69,    69,   124,   328,    69,  -443,
-      75,  -443,   304,    69,  -443,   291,   310,  -443,  -443,  -443,
-    -443,    33,  -443,  -443,   288,  -443,   312,  -443,  -443,    69,
-    -443,  -443,   137,   122,  -443,   297,    81,   140,  -443,   297,
-      69,   289,   313,   316,   309,  -443,   124,   439,   314,  -443,
-      45,   315,   297,    69,   289,  -443,   137,   321,   390,    81,
-     390,   320,   308,   291,   158,    66,   402,   402,   390,   323,
-     346,    69,   327,  -443,    66,  -443,  -443,   402,   158,   390,
-     347,   334,  -443,  -443,   353,  -443,   390,  -443,   336,   402,
-    -443,  -443
+    -494,   140,  -494,   522,  -494,  -494,    40,   115,   115,   148,
+     115,   115,   115,   115,   115,   115,   115,   912,    88,  -494,
+    -494,   185,   192,   193,   115,   115,   115,  -494,  -494,    84,
+      84,   181,   181,  -494,  -494,  -494,   150,  -494,  -494,  -494,
+    -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,   196,
+     159,   134,   912,   441,   202,  -494,  -494,   203,   109,   441,
+     181,   106,  -494,    84,    84,  -494,  -494,  -494,  -494,  -494,
+    -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,
+    -494,  -494,  -494,    84,  -494,  -494,  -494,  -494,  -494,  -494,
+    -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,
+    -494,   -21,  -494,  -494,  -494,  -494,   211,  -494,  -494,  -494,
+      32,  -494,  -494,  -494,  -494,    66,  -494,   210,  -494,  -494,
+    -494,  -494,  -494,  -494,  -494,   181,   109,     7,  -494,  -494,
+    -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,   160,     1,
+    -494,  -494,   109,  -494,  -494,  -494,   178,  -494,  -494,    17,
+    -494,   130,   147,  -494,   236,  -494,   149,   -13,   441,  -494,
+    -494,   177,   181,   441,   912,   216,   -46,   320,    63,  -494,
+    -494,  -494,   115,   160,  -494,   151,   243,   191,   156,   155,
+     146,   146,  -494,  -494,    63,   109,  -494,   167,   253,   254,
+     162,    79,  -494,   784,   181,   109,  -494,    27,  -494,  -494,
+    -494,    39,  -494,  -494,   784,   170,   169,   168,   174,   175,
+     176,   179,   182,   207,   209,  -494,    43,   -11,   173,   215,
+     218,   172,  -494,  -494,  -494,  -494,   186,  -494,     9,  -494,
+     196,   181,   109,   109,   189,  -494,   222,     5,   731,  -494,
+       8,  -494,  -494,    18,  -494,    20,   236,  -494,   196,   196,
+     196,   196,   196,   190,   224,   196,   214,   171,  -494,   196,
+     220,   -16,   229,   441,  -494,  -494,   186,   226,   331,  -494,
+    -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,   225,
+    -494,   227,  -494,  -494,  -494,   784,   135,  -494,  -494,   319,
+    -494,   160,   231,  -494,   239,   239,   180,  -494,   232,  -494,
+     184,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,
+    -494,   109,   109,   109,   109,   109,   784,   784,   109,   271,
+     784,   109,    31,  -494,  -494,   307,  -494,  -494,   271,   115,
+     342,  -494,  -494,   241,   115,   115,    25,  -494,  -494,  -494,
+     181,   672,   244,   245,   240,  -494,  -494,   248,   180,  -494,
+     249,   251,  -494,   220,   220,   220,  -494,  -494,   246,   250,
+    -494,  -494,   260,  -494,  -494,  -494,  -494,  -494,  -494,    68,
+     837,  -494,  -494,   261,   260,  -494,   115,   355,   271,  -494,
+    -494,   257,  -494,  -494,   115,   259,   115,   115,   115,   115,
+     115,   115,   115,   115,   115,   314,   314,   314,   263,   252,
+    -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,
+    -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,   609,
+    -494,  -494,  -494,  -494,   267,  -494,  -494,  -494,  -494,  -494,
+    -494,  -494,    31,   109,   262,  -494,   441,  -494,  -494,  -494,
+    -494,   196,   196,   264,   255,  -494,  -494,  -494,  -494,  -494,
+    -494,    31,  -494,  -494,  -494,  -494,  -494,  -494,  -494,   -29,
+    -494,   265,   115,   281,   255,  -494,   115,  -494,   260,  -494,
+    -494,   784,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,
+    -494,  -494,   266,   268,   269,  -494,   889,   247,   350,  -494,
+    -494,   369,  -494,   280,  -494,    34,   109,   109,   181,   312,
+     109,  -494,    62,  -494,   289,   109,  -494,   255,   290,  -494,
+    -494,  -494,  -494,    33,  -494,  -494,   259,  -494,   292,  -494,
+    -494,   109,  -494,  -494,   160,    49,  -494,   275,    68,    85,
+    -494,   275,   109,   260,   293,   294,   297,  -494,   181,   441,
+     298,  -494,    31,   299,   275,   109,   260,  -494,   160,   300,
+     376,    68,   376,   302,   287,   255,   784,   115,   388,   388,
+     376,   304,   306,   109,   305,  -494,   115,  -494,  -494,   388,
+     784,   376,   309,   295,  -494,  -494,   308,  -494,   376,  -494,
+     296,   388,  -494,  -494
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const short int yypgoto[] =
 {
-    -443,  -443,   461,  -443,  -443,  -199,  -443,  -443,  -443,  -310,
-    -443,  -443,  -443,  -443,  -443,  -443,   200,  -443,   130,  -306,
-    -443,  -443,  -443,  -443,  -443,   225,  -443,  -443,  -443,  -443,
-     231,  -270,  -443,  -443,  -262,  -443,  -443,  -443,  -443,  -443,
-       9,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,
-    -443,  -264,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,
-    -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,  -443,    -9,
-    -443,  -304,  -443,  -443,  -108,  -443,  -443,   123,  -443,  -443,
-     -98,  -442,  -443,  -443,  -366,   -23,   324,  -443,  -443,  -293,
-    -291,  -443,  -443,  -443,   467,  -147,  -443,   302,  -443,   133,
-     179,  -443,    64,  -135,  -443,  -443,  -443,    -6,  -443,  -437,
-    -443,  -317,  -443,  -286,  -431,  -109,  -443,   267,  -443,  -398,
-    -395,  -180,  -443,   168,  -443,  -443,     6,  -443,  -443,  -316,
-      -2,  -443,   311,   -99,    -7,  -143,  -354,  -443
+    -494,  -494,   422,  -494,  -494,  -192,  -494,  -309,  -494,  -494,
+    -494,  -494,  -494,  -494,   158,  -494,    89,  -308,  -494,  -494,
+    -494,  -494,  -494,   183,  -494,  -494,  -494,  -494,   187,  -270,
+    -494,  -494,  -268,  -494,  -494,  -494,  -494,  -494,  -494,  -494,
+     -15,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,
+    -494,  -262,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,
+    -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,  -494,
+      -8,  -494,  -306,  -494,  -494,  -113,  -494,  -494,    80,  -494,
+    -494,  -132,  -446,  -494,  -494,  -362,   -22,   284,  -494,  -494,
+    -304,  -291,  -494,  -494,  -494,   426,  -146,  -494,   270,  -494,
+     110,   154,  -494,    36,  -242,  -494,  -494,  -494,   -36,  -494,
+    -462,  -494,  -320,  -494,  -292,  -430,  -101,  -494,   213,  -494,
+    -469,  -493,  -193,  -494,   133,  -494,  -494,   -31,  -494,  -494,
+    -319,    -2,  -494,   273,   -96,    -5,  -150,  -354,  -494
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    positive, shift that token.  If negative, reduce the rule which
    number is the opposite.  If zero, do what YYDEFACT says.
    If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -315
+#define YYTABLE_NINF -317
 static const short int yytable[] =
 {
-     112,   106,   114,   115,   116,   117,   118,   119,   133,   134,
-     121,   198,   169,   196,   174,   126,   127,   128,   462,   264,
-     336,  -314,   423,   427,   343,   296,   170,   180,   177,   400,
-     236,   503,   344,   401,   286,   413,   297,   152,   239,   132,
-     372,   304,   155,   305,   179,   143,   414,   155,   415,   155,
-     200,   144,   332,   333,   159,   532,   199,   151,   526,   370,
-      26,   275,   155,     4,   490,   260,   108,   149,   276,   402,
-     336,   233,   260,   155,   530,   404,   343,   403,  -312,   261,
-     189,   259,   234,   499,   344,   109,   262,   277,   156,   154,
-     466,   113,   541,   156,   322,   278,  -314,   168,   549,   350,
-     423,   427,   331,   123,   306,   551,   164,   400,   165,   124,
-     181,   401,   505,   413,  -314,   171,  -314,   300,   217,   288,
-     292,   293,   561,   287,   414,   302,   415,   379,   122,   160,
-     160,   129,   130,   243,   356,   357,   125,   309,   310,   311,
-     312,   313,   244,   217,   316,   218,    20,   402,   319,   135,
-     197,   191,   557,   404,   191,   403,   363,   364,   222,   365,
-     567,   136,   566,   138,   366,   145,   258,   510,   423,   427,
-     148,   575,   573,   220,   221,   332,   333,   543,   579,   153,
-      20,  -174,  -174,    26,   581,   149,   363,   364,   157,   365,
-     553,   162,   416,   443,   366,   444,   445,   446,   447,   448,
-     351,   352,   353,   354,   355,   289,   120,   358,   519,   260,
-     362,   155,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,   535,   536,
-      50,    51,   166,   106,    52,   178,   245,   246,   247,   248,
-     249,   250,   251,   139,   140,   141,   539,   540,   142,    18,
-      19,   342,   183,   436,   437,   438,   185,   252,   324,   481,
-     482,   184,    62,    31,   188,   201,    20,   193,  -134,   224,
-     416,   202,   203,   204,   205,   206,   207,   208,   209,   210,
-     211,   212,   225,   213,   227,   214,   215,   226,   228,   506,
-     236,   493,   120,   235,   239,   266,   106,   242,    33,    34,
+     116,   110,   118,   119,   120,   121,   122,   123,   124,   138,
+     139,   267,   126,   201,   179,   137,   131,   132,   133,   203,
+     464,   425,   429,  -316,   338,   174,   345,   298,   346,   175,
+     239,   288,   402,   403,   505,   415,   374,   416,   157,   185,
+     242,   182,   134,   135,   306,   162,   299,   148,   159,   160,
+     417,   149,   184,   162,   166,   534,   528,   156,   162,   334,
+     335,   162,   112,   372,   204,   205,   568,    26,   161,   543,
+     492,   404,   154,   405,   338,   162,   575,   532,   345,   406,
+     346,  -314,   553,   559,   236,   169,   468,   170,   583,   501,
+     237,   569,   333,   163,   262,   324,   551,   194,  -316,   425,
+     429,   163,   577,   173,   280,   307,   134,   135,   352,   581,
+     402,   403,   281,   415,   507,   416,   302,   290,  -316,   176,
+    -316,   289,   222,   358,   359,   563,   304,   186,   417,   167,
+     167,   294,   295,   381,   113,   311,   312,   313,   314,   315,
+       4,   263,   318,   365,   366,   521,   321,   367,   263,   404,
+     264,   405,   368,   263,   483,   484,   196,   406,   278,   202,
+     537,   196,   265,   538,   225,   279,   512,   425,   429,   334,
+     335,   117,   261,  -176,   365,   366,  -176,    26,   367,   545,
+     222,   445,   223,   368,   446,   447,   448,   449,   450,   144,
+     145,   146,   555,   246,   147,   418,   541,   247,   127,   542,
+      18,    19,   344,    20,    18,    19,    20,   140,   128,   291,
+     353,   354,   355,   356,   357,   129,   130,   360,   141,   143,
+     364,   438,   439,   440,   150,   153,    26,   154,   158,   164,
+     308,    31,    32,   171,   162,   183,   110,   188,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,   512,   289,    50,    51,   373,   267,
-      52,   265,   491,   377,   378,   268,   269,   270,   271,   279,
-     272,   494,   495,   273,   274,   280,   281,   106,   282,   283,
-     284,    59,   314,   294,   315,   457,   295,   317,    62,   318,
-     327,   320,   326,   323,   337,   338,   329,   348,   339,   359,
-      26,   459,   330,   374,   376,   463,   428,   429,   430,   432,
-     434,   435,   439,   468,   562,   470,   471,   472,   473,   474,
-     475,   476,   477,   478,   440,   520,   521,   441,   574,   525,
-     464,   460,   467,   469,   529,   483,   479,   492,  -233,   489,
-     496,   500,   502,    20,   497,   450,   507,   508,   509,   514,
-     534,   516,   517,   524,   528,   106,   531,   533,   199,   545,
-     537,   542,   544,   555,   548,   550,   554,   564,   568,   120,
-     558,   559,   191,   571,   552,    33,    34,    35,    36,    37,
+      45,    46,    47,    48,   189,    49,    50,    51,   190,   193,
+      52,   326,   198,    31,  -136,   227,   228,   229,   230,    20,
+     231,    53,    54,   418,   238,   239,   242,   245,   508,   268,
+     269,    59,   285,   270,    60,   320,   495,    61,    62,   271,
+     272,   273,   351,   286,   274,   125,   296,   275,   110,   282,
+     316,    33,    34,    35,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,   514,   291,    50,
+      51,   375,   276,    52,   277,   319,   379,   380,   496,   497,
+     283,   297,   493,   284,   317,   322,   325,   328,   329,   110,
+     331,   339,   332,   350,    59,   340,   341,   361,   459,    26,
+     376,    62,   378,   430,   431,   432,   434,   441,   443,   436,
+     437,   442,   462,   564,   466,   461,   469,   481,   465,   471,
+     499,   494,   516,  -235,   498,   502,   470,   576,   472,   473,
+     474,   475,   476,   477,   478,   479,   480,   485,   491,   504,
+     509,   518,   510,   511,   519,   522,   523,   526,   530,   527,
+     539,   533,   535,   204,   531,   546,   547,   550,   552,   557,
+     556,   560,   561,   566,   570,   571,   573,   110,   578,   580,
+     536,   579,   582,     5,   327,   382,   305,   303,   435,   106,
+     206,   544,   207,   208,   196,   209,   210,   211,   212,   213,
+     214,   215,   216,   217,   554,   218,   200,   219,   220,   343,
+     383,   233,   517,   363,   503,   490,   515,   235,   506,   310,
+       0,     0,   572,    20,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   524,     0,     0,     0,
+       0,     0,     0,     0,   513,   110,     0,     0,     0,   125,
+       0,     0,     0,     0,     0,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,   501,   570,    50,    51,   504,   569,   576,   577,   578,
-     580,    20,     5,   325,   380,   303,   451,   452,   301,   433,
-     102,   381,   341,   522,   453,   454,   455,   456,   230,   195,
-     515,   488,   511,   106,     0,    62,   361,   120,     0,     0,
-     232,   513,     0,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
-     308,    50,    51,   546,     0,    52,     0,     0,     0,     0,
-       0,     0,     0,     6,     7,     8,     9,    10,     0,     0,
-       0,    11,    12,    13,    14,   547,    15,    16,    17,     0,
-      18,    19,    20,    62,     0,     0,   563,     0,     0,     0,
-       0,     0,     0,     0,     0,   572,     0,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,     0,
-       0,     0,     0,     0,    33,    34,    35,    36,    37,    38,
-      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
-       0,    49,    50,    51,     0,     0,    52,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    53,    54,    55,
-      56,    57,    58,     0,     0,     0,     0,    59,     0,     0,
-      60,   382,     0,    61,    62,     0,    18,    19,   383,     0,
-       0,     0,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,   391,   392,     0,     0,     0,     0,     0,    26,     0,
-       0,     0,     0,    31,    32,   393,   394,   395,   396,     0,
-      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,   397,    49,    50,    51,
-       0,     0,    52,   398,   382,     0,     0,     0,     0,    18,
-      19,   383,     0,    53,    54,   384,   385,   386,   387,   388,
-     389,   390,     0,    59,   391,   392,    60,     0,   399,     0,
-      62,    26,     0,     0,     0,   487,    31,    32,   393,   394,
-     395,   396,     0,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,    42,    43,    44,    45,    46,    47,    48,   397,
-      49,    50,    51,     0,     0,    52,   398,     0,    18,    19,
-      20,     0,     0,     0,     0,     0,    53,    54,     0,     0,
-       0,     0,     0,     0,     0,     0,    59,     0,     0,    60,
-      26,   399,     0,    62,     0,    31,    32,     0,     0,     0,
-       0,     0,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,     0,    49,
-      50,    51,     0,     0,    52,     0,     0,    18,    19,    20,
-       0,     0,     0,     0,     0,    53,    54,     0,     0,     0,
-       0,     0,     0,     0,     0,    59,     0,     0,    60,    26,
-       0,    61,    62,     0,    31,    32,     0,   349,     0,     0,
+      48,     0,     0,    50,    51,     0,   548,    52,     0,     0,
+       0,     0,     0,     0,     0,     6,     7,     8,     9,     0,
+       0,     0,    10,    11,    12,    13,    14,   549,    15,    16,
+      17,     0,    18,    19,    20,    62,     0,     0,     0,   565,
+       0,     0,     0,     0,     0,     0,     0,     0,   574,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,     0,     0,     0,     0,     0,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,     0,    49,    50,    51,     0,     0,    52,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    53,
+      54,    55,    56,    57,    58,     0,     0,     0,     0,    59,
+       0,     0,    60,     0,   384,    61,    62,    63,    64,    18,
+      19,   385,     0,     0,     0,   386,   387,   388,   389,   390,
+     391,   392,     0,     0,   393,   394,     0,     0,     0,     0,
+       0,    26,     0,     0,     0,     0,    31,    32,   395,   396,
+     397,   398,     0,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,   399,
+      49,    50,    51,     0,     0,    52,   400,   384,     0,     0,
+       0,     0,    18,    19,   385,     0,    53,    54,   386,   387,
+     388,   389,   390,   391,   392,     0,    59,   393,   394,    60,
+       0,   401,     0,    62,    26,     0,     0,   489,     0,    31,
+      32,   395,   396,   397,   398,     0,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,   399,    49,    50,    51,     0,     0,    52,   400,
+       0,    18,    19,    20,     0,     0,     0,     0,     0,    53,
+      54,     0,     0,     0,     0,     0,     0,     0,     0,    59,
+       0,     0,    60,    26,   401,     0,    62,     0,    31,    32,
+       0,     0,     0,     0,     0,    33,    34,    35,    36,    37,
+      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,     0,    49,    50,    51,     0,    20,    52,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    53,    54,
+       0,     0,     0,     0,     0,     0,     0,     0,    59,     0,
+       0,    60,   125,     0,    61,    62,     0,     0,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,     0,     0,    50,    51,     0,    20,
+      52,   452,   248,   249,   250,   251,   252,   253,   254,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   255,     0,   125,     0,     0,    62,     0,
        0,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,     0,    49,    50,
-      51,     0,    20,    52,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    53,    54,     0,     0,     0,     0,
-       0,     0,     0,     0,    59,    20,     0,    60,   120,     0,
-      61,    62,     0,     0,    33,    34,    35,    36,    37,    38,
-      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
-       0,   120,    50,    51,     0,     0,    52,    33,    34,    35,
-      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
-      46,    47,    48,     0,     0,    50,    51,    59,     0,     0,
-       0,     0,     0,     0,    62,     0,     0,     0,     0,     0,
+      42,    43,    44,    45,    46,    47,    48,     0,     0,    50,
+      51,    20,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   453,   454,     0,     0,     0,     0,     0,     0,
+     455,   456,   457,   458,    20,     0,     0,   125,     0,     0,
+       0,    62,     0,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
+     125,    50,    51,     0,     0,    52,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,     0,     0,    50,    51,    59,     0,     0,     0,
+       0,     0,     0,    62,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    62
+       0,     0,     0,     0,     0,     0,    62
 };
 
 static const short int yycheck[] =
 {
-       9,     3,    11,    12,    13,    14,    15,    16,    31,    32,
-      17,   158,   121,   156,   122,    24,    25,    26,   372,   199,
-     284,    22,   339,   339,   294,    22,    22,    22,   137,   339,
-      22,   462,   294,   339,    22,   339,   235,    60,    22,    30,
-     326,    22,    74,    24,   143,    52,   339,    74,   339,    74,
-     159,    53,    34,    35,    22,    22,   105,    59,   500,   323,
-      42,   113,    74,     0,   430,   107,   105,   116,   120,   339,
-     334,   180,   107,    74,   505,   339,   346,   339,   105,   121,
-     105,   190,   181,   449,   346,    19,   121,   113,   120,    80,
-     376,    23,   529,   120,   106,   121,    97,   120,   540,   298,
-     417,   417,   282,    23,    85,   542,    19,   417,    21,    23,
-     105,   417,   466,   417,   115,   111,   117,   109,   115,   227,
-     229,   230,   553,   111,   417,   109,   417,   109,   105,    97,
-      97,    22,    23,   107,   314,   315,    23,   245,   246,   247,
-     248,   249,   116,   115,   252,   117,    22,   417,   256,    57,
-     157,   153,   550,   417,   156,   417,   111,   112,   167,   114,
-     558,    22,   557,    60,   119,    22,   189,   484,   485,   485,
-      22,   569,   567,   106,   107,    34,    35,   531,   576,   120,
-      22,   106,   107,    42,   579,   116,   111,   112,    18,   114,
-     544,    22,   339,   112,   119,   114,   115,   116,   117,   118,
-     309,   310,   311,   312,   313,   228,    48,   316,   106,   107,
-     319,    74,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    69,   106,   107,
-      72,    73,    23,   235,    76,    57,    78,    79,    80,    81,
-      82,    83,    84,    55,    56,    57,   106,   107,    60,    20,
-      21,    22,   108,   351,   352,   353,    22,    99,   260,   394,
-     395,   108,   104,    47,   105,   105,    22,    85,   112,    22,
-     417,   111,   112,   113,   114,   115,   116,   117,   118,   119,
-     120,   121,    75,   123,   112,   125,   126,   106,   122,   469,
-      22,   434,    48,   108,    22,   106,   298,   113,    54,    55,
+       8,     3,    10,    11,    12,    13,    14,    15,    16,    31,
+      32,   204,    17,   163,   127,    30,    24,    25,    26,   165,
+     374,   341,   341,    22,   286,   126,   296,    22,   296,    22,
+      22,    22,   341,   341,   464,   341,   328,   341,    60,    22,
+      22,   142,    22,    23,    24,    74,   238,    52,    63,    64,
+     341,    53,   148,    74,    22,    22,   502,    59,    74,    34,
+      35,    74,    22,   325,   110,   166,   559,    42,    83,   531,
+     432,   341,   118,   341,   336,    74,   569,   507,   348,   341,
+     348,   110,   544,   552,   185,    19,   378,    21,   581,   451,
+     186,   560,   285,   122,   195,   111,   542,   110,    97,   419,
+     419,   122,   571,   125,   115,    85,    22,    23,   300,   578,
+     419,   419,   123,   419,   468,   419,   108,   230,   117,   112,
+     119,   112,   117,   316,   317,   555,   108,   110,   419,    97,
+      97,   232,   233,   108,    19,   248,   249,   250,   251,   252,
+       0,   114,   255,   112,   113,   111,   259,   116,   114,   419,
+     123,   419,   121,   114,   396,   397,   158,   419,   115,   164,
+     111,   163,   123,   114,   172,   122,   486,   487,   487,    34,
+      35,    23,   194,   111,   112,   113,   114,    42,   116,   533,
+     117,   113,   119,   121,   116,   117,   118,   119,   120,    55,
+      56,    57,   546,   114,    60,   341,   111,   118,   110,   114,
+      20,    21,    22,    22,    20,    21,    22,    57,    23,   231,
+     311,   312,   313,   314,   315,    23,    23,   318,    22,    60,
+     321,   353,   354,   355,    22,    22,    42,   118,   122,    18,
+     245,    47,    48,    23,    74,    57,   238,   107,    54,    55,
       56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
-      66,    67,    68,    69,    70,   338,    72,    73,   327,   113,
-      76,   110,   431,   332,   333,   113,   113,   113,   113,   124,
-     113,   439,   440,   113,   113,   113,   113,   339,   105,    22,
-     108,    97,   105,   108,   105,   368,   110,   106,   104,   107,
-       8,   113,   106,   108,    22,   107,   113,   106,   108,    76,
-      42,   368,   113,     9,   106,   374,   110,   110,   113,   109,
-     105,   110,   106,   382,   554,   384,   385,   386,   387,   388,
-     389,   390,   391,   392,   106,   494,   495,    98,   568,   498,
-      10,   101,   110,   105,   503,   122,    53,   110,   119,   119,
-     105,   105,   109,    22,   113,    24,   122,   122,   122,    22,
-     519,    22,   107,    85,   110,   417,   106,   105,   105,   110,
-     123,   530,   106,    33,   110,   110,   105,    25,   105,    48,
-     110,   123,   434,   106,   543,    54,    55,    56,    57,    58,
+      66,    67,    68,    69,   107,    71,    72,    73,    22,   110,
+      76,   263,    85,    47,   113,    22,    75,   111,   113,    22,
+     124,    87,    88,   419,   107,    22,    22,   115,   471,   109,
+     111,    97,   110,   115,   100,   114,   436,   103,   104,   115,
+     115,   115,   108,   107,   115,    48,   107,   115,   300,   126,
+     110,    54,    55,    56,    57,    58,    59,    60,    61,    62,
+      63,    64,    65,    66,    67,    68,    69,    70,   340,    72,
+      73,   329,   115,    76,   115,   111,   334,   335,   441,   442,
+     115,   109,   433,   115,   110,   115,   107,   111,     7,   341,
+     115,    22,   115,   111,    97,   114,   107,    76,   370,    42,
+       8,   104,   111,   109,   109,   115,   108,   111,    98,   110,
+     109,   111,   101,   556,     9,   370,   109,    53,   376,   110,
+     115,   109,    22,   121,   110,   110,   384,   570,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   124,   121,   108,
+     124,    22,   124,   124,   114,   496,   497,    85,   109,   500,
+     125,   111,   110,   110,   505,   111,   109,   109,   109,    33,
+     110,   109,   125,    25,   110,   109,   111,   419,   109,   111,
+     521,   126,   126,     1,   266,   336,   243,   240,   348,     3,
+     110,   532,   112,   113,   436,   115,   116,   117,   118,   119,
+     120,   121,   122,   123,   545,   125,   162,   127,   128,   295,
+     340,   181,   488,   320,   462,   419,   487,   184,   466,   246,
+      -1,    -1,   563,    22,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   498,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   486,   487,    -1,    -1,    -1,    48,
+      -1,    -1,    -1,    -1,    -1,    54,    55,    56,    57,    58,
       59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
-      69,   460,   561,    72,    73,   464,   110,   110,   124,   106,
-     124,    22,     1,   263,   334,   240,    85,    86,   237,   346,
-       3,   338,   293,   496,    93,    94,    95,    96,   176,   155,
-     486,   417,   484,   485,    -1,   104,   318,    48,    -1,    -1,
-     179,   485,    -1,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    69,    -1,
-     243,    72,    73,   536,    -1,    76,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,     3,     4,     5,     6,     7,    -1,    -1,
-      -1,    11,    12,    13,    14,   537,    16,    17,    18,    -1,
-      20,    21,    22,   104,    -1,    -1,   555,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   564,    -1,    37,    38,    39,
-      40,    41,    42,    43,    44,    45,    46,    47,    48,    -1,
-      -1,    -1,    -1,    -1,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
-      -1,    71,    72,    73,    -1,    -1,    76,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    87,    88,    89,
-      90,    91,    92,    -1,    -1,    -1,    -1,    97,    -1,    -1,
-     100,    15,    -1,   103,   104,    -1,    20,    21,    22,    -1,
-      -1,    -1,    26,    27,    28,    29,    30,    31,    32,    -1,
-      -1,    35,    36,    -1,    -1,    -1,    -1,    -1,    42,    -1,
-      -1,    -1,    -1,    47,    48,    49,    50,    51,    52,    -1,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
-      -1,    -1,    76,    77,    15,    -1,    -1,    -1,    -1,    20,
-      21,    22,    -1,    87,    88,    26,    27,    28,    29,    30,
-      31,    32,    -1,    97,    35,    36,   100,    -1,   102,    -1,
-     104,    42,    -1,    -1,    -1,   109,    47,    48,    49,    50,
+      69,    -1,    -1,    72,    73,    -1,   538,    76,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,    -1,
+      -1,    -1,    10,    11,    12,    13,    14,   539,    16,    17,
+      18,    -1,    20,    21,    22,   104,    -1,    -1,    -1,   557,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   566,    37,
+      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,    -1,    -1,    -1,    -1,    -1,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    -1,    71,    72,    73,    -1,    -1,    76,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    87,
+      88,    89,    90,    91,    92,    -1,    -1,    -1,    -1,    97,
+      -1,    -1,   100,    -1,    15,   103,   104,   105,   106,    20,
+      21,    22,    -1,    -1,    -1,    26,    27,    28,    29,    30,
+      31,    32,    -1,    -1,    35,    36,    -1,    -1,    -1,    -1,
+      -1,    42,    -1,    -1,    -1,    -1,    47,    48,    49,    50,
       51,    52,    -1,    54,    55,    56,    57,    58,    59,    60,
       61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
-      71,    72,    73,    -1,    -1,    76,    77,    -1,    20,    21,
-      22,    -1,    -1,    -1,    -1,    -1,    87,    88,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    97,    -1,    -1,   100,
-      42,   102,    -1,   104,    -1,    47,    48,    -1,    -1,    -1,
-      -1,    -1,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    69,    -1,    71,
-      72,    73,    -1,    -1,    76,    -1,    -1,    20,    21,    22,
-      -1,    -1,    -1,    -1,    -1,    87,    88,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    97,    -1,    -1,   100,    42,
-      -1,   103,   104,    -1,    47,    48,    -1,   109,    -1,    -1,
+      71,    72,    73,    -1,    -1,    76,    77,    15,    -1,    -1,
+      -1,    -1,    20,    21,    22,    -1,    87,    88,    26,    27,
+      28,    29,    30,    31,    32,    -1,    97,    35,    36,   100,
+      -1,   102,    -1,   104,    42,    -1,    -1,   108,    -1,    47,
+      48,    49,    50,    51,    52,    -1,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,    72,    73,    -1,    -1,    76,    77,
+      -1,    20,    21,    22,    -1,    -1,    -1,    -1,    -1,    87,
+      88,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    97,
+      -1,    -1,   100,    42,   102,    -1,   104,    -1,    47,    48,
+      -1,    -1,    -1,    -1,    -1,    54,    55,    56,    57,    58,
+      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
+      69,    -1,    71,    72,    73,    -1,    22,    76,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    87,    88,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    97,    -1,
+      -1,   100,    48,    -1,   103,   104,    -1,    -1,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,    68,    69,    -1,    -1,    72,    73,    -1,    22,
+      76,    24,    78,    79,    80,    81,    82,    83,    84,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    99,    -1,    48,    -1,    -1,   104,    -1,
       -1,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    -1,    71,    72,
-      73,    -1,    22,    76,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    87,    88,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    97,    22,    -1,   100,    48,    -1,
-     103,   104,    -1,    -1,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
-      -1,    48,    72,    73,    -1,    -1,    76,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-      67,    68,    69,    -1,    -1,    72,    73,    97,    -1,    -1,
-      -1,    -1,    -1,    -1,   104,    -1,    -1,    -1,    -1,    -1,
+      63,    64,    65,    66,    67,    68,    69,    -1,    -1,    72,
+      73,    22,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    85,    86,    -1,    -1,    -1,    -1,    -1,    -1,
+      93,    94,    95,    96,    22,    -1,    -1,    48,    -1,    -1,
+      -1,   104,    -1,    54,    55,    56,    57,    58,    59,    60,
+      61,    62,    63,    64,    65,    66,    67,    68,    69,    -1,
+      48,    72,    73,    -1,    -1,    76,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    -1,    -1,    72,    73,    97,    -1,    -1,    -1,
+      -1,    -1,    -1,   104,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   104
+      -1,    -1,    -1,    -1,    -1,    -1,   104
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const unsigned short int yystos[] =
 {
-       0,   128,   129,   130,     0,   129,     3,     4,     5,     6,
-       7,    11,    12,    13,    14,    16,    17,    18,    20,    21,
+       0,   130,   131,   132,     0,   131,     3,     4,     5,     6,
+      10,    11,    12,    13,    14,    16,    17,    18,    20,    21,
       22,    37,    38,    39,    40,    41,    42,    43,    44,    45,
       46,    47,    48,    54,    55,    56,    57,    58,    59,    60,
       61,    62,    63,    64,    65,    66,    67,    68,    69,    71,
       72,    73,    76,    87,    88,    89,    90,    91,    92,    97,
-     100,   103,   104,   131,   132,   133,   135,   136,   139,   141,
-     146,   149,   153,   154,   158,   161,   162,   163,   164,   165,
-     166,   169,   170,   171,   175,   176,   177,   178,   187,   189,
-     190,   191,   192,   193,   194,   195,   198,   212,   213,   216,
-     217,   219,   221,   222,   238,   256,   257,   261,   105,    19,
-     196,   197,   196,    23,   196,   196,   196,   196,   196,   196,
-      48,   261,   105,    23,    23,    23,   196,   196,   196,    22,
-      23,   167,   167,   212,   212,    57,    22,   201,    60,    55,
-      56,    57,    60,   261,   257,    22,   155,   150,    22,   116,
-     242,   257,   212,   120,   167,    74,   120,    18,   220,    22,
-      97,   260,    22,   134,    19,    21,    23,   200,   212,   242,
-      22,   111,   159,   160,   201,   223,   218,   242,    57,   260,
-      22,   105,   147,   108,   108,    22,   243,   244,   105,   105,
-     137,   257,   262,    85,   168,   213,   262,   261,   222,   105,
-     242,   105,   111,   112,   113,   114,   115,   116,   117,   118,
-     119,   120,   121,   123,   125,   126,   239,   115,   117,   259,
-     106,   107,   196,   140,    22,    75,   106,   112,   122,   224,
-     224,   199,   259,   242,   260,   108,    22,   156,   157,    22,
-     151,   152,   113,   107,   116,    78,    79,    80,    81,    82,
-      83,    84,    99,   248,   249,   250,   257,   258,   212,   242,
-     107,   121,   121,   142,   248,   110,   106,   113,   113,   113,
-     113,   113,   113,   113,   113,   113,   120,   113,   121,   124,
-     113,   113,   105,    22,   108,   143,    22,   111,   201,   212,
-     225,   226,   242,   242,   108,   110,    22,   132,   148,   221,
-     109,   157,   109,   152,    22,    24,    85,   245,   244,   201,
-     201,   201,   201,   201,   105,   105,   201,   106,   107,   201,
-     113,   207,   106,   108,   257,   143,   106,     8,   172,   113,
-     113,   248,    34,    35,   144,   145,   178,    22,   107,   108,
-     227,   227,    22,   158,   161,   202,   203,   204,   106,   109,
-     132,   242,   242,   242,   242,   242,   248,   248,   242,    76,
-     240,   250,   242,   111,   112,   114,   119,   208,   210,   211,
-     178,   179,   240,   196,     9,   173,   106,   196,   196,   109,
-     145,   226,    15,    22,    26,    27,    28,    29,    30,    31,
-      32,    35,    36,    49,    50,    51,    52,    70,    77,   102,
-     136,   146,   158,   161,   178,   180,   181,   182,   183,   184,
-     185,   186,   188,   198,   216,   217,   222,   228,   229,   231,
-     232,   234,   237,   238,   251,   253,   254,   256,   110,   110,
-     113,   206,   109,   204,   105,   110,   207,   207,   207,   106,
-     106,    98,   263,   112,   114,   115,   116,   117,   118,   209,
-      24,    85,    86,    93,    94,    95,    96,   212,   214,   261,
-     101,   138,   263,   196,    10,   174,   240,   110,   196,   105,
-     196,   196,   196,   196,   196,   196,   196,   196,   196,    53,
-     230,   230,   230,   122,   255,   252,   233,   109,   229,   119,
-     211,   242,   110,   262,   201,   201,   105,   113,   241,   211,
-     105,   196,   109,   241,   196,   263,   248,   122,   122,   122,
-     238,   257,    70,   253,    22,   234,    22,   107,   205,   106,
-     242,   242,   212,   264,    85,   242,   208,   215,   110,   242,
-     241,   106,    22,   105,   242,   106,   107,   123,   236,   106,
-     107,   236,   242,   263,   106,   110,   212,   257,   110,   208,
-     110,   236,   242,   263,   105,    33,   246,   246,   110,   123,
-     235,   241,   248,   196,    25,   247,   247,   246,   105,   110,
-     242,   106,   196,   247,   248,   246,   110,   124,   106,   246,
-     124,   247
+     100,   103,   104,   105,   106,   133,   134,   135,   136,   139,
+     141,   146,   149,   153,   154,   158,   161,   162,   163,   164,
+     165,   166,   167,   168,   171,   172,   173,   177,   178,   179,
+     180,   189,   191,   192,   193,   194,   195,   196,   197,   198,
+     201,   215,   216,   219,   220,   222,   224,   225,   241,   259,
+     260,   264,    22,    19,   199,   200,   199,    23,   199,   199,
+     199,   199,   199,   199,   199,    48,   264,   110,    23,    23,
+      23,   199,   199,   199,    22,    23,   169,   169,   215,   215,
+      57,    22,   204,    60,    55,    56,    57,    60,   264,   260,
+      22,   155,   150,    22,   118,   245,   260,   215,   122,   169,
+     169,   169,    74,   122,    18,   223,    22,    97,   263,    19,
+      21,    23,   203,   215,   245,    22,   112,   159,   160,   204,
+     226,   221,   245,    57,   263,    22,   110,   147,   107,   107,
+      22,   246,   247,   110,   110,   137,   260,   265,    85,   170,
+     216,   265,   264,   225,   110,   245,   110,   112,   113,   115,
+     116,   117,   118,   119,   120,   121,   122,   123,   125,   127,
+     128,   242,   117,   119,   262,   199,   140,    22,    75,   111,
+     113,   124,   227,   227,   202,   262,   245,   263,   107,    22,
+     156,   157,    22,   151,   152,   115,   114,   118,    78,    79,
+      80,    81,    82,    83,    84,    99,   251,   252,   253,   260,
+     261,   215,   245,   114,   123,   123,   142,   251,   109,   111,
+     115,   115,   115,   115,   115,   115,   115,   115,   115,   122,
+     115,   123,   126,   115,   115,   110,   107,   143,    22,   112,
+     204,   215,   228,   229,   245,   245,   107,   109,    22,   134,
+     148,   224,   108,   157,   108,   152,    24,    85,   169,   248,
+     247,   204,   204,   204,   204,   204,   110,   110,   204,   111,
+     114,   204,   115,   210,   111,   107,   260,   143,   111,     7,
+     174,   115,   115,   251,    34,    35,   144,   145,   180,    22,
+     114,   107,   230,   230,    22,   158,   161,   205,   206,   207,
+     111,   108,   134,   245,   245,   245,   245,   245,   251,   251,
+     245,    76,   243,   253,   245,   112,   113,   116,   121,   211,
+     213,   214,   180,   181,   243,   199,     8,   175,   111,   199,
+     199,   108,   145,   229,    15,    22,    26,    27,    28,    29,
+      30,    31,    32,    35,    36,    49,    50,    51,    52,    70,
+      77,   102,   136,   146,   158,   161,   180,   182,   183,   184,
+     185,   186,   187,   188,   190,   201,   219,   220,   225,   231,
+     232,   234,   235,   237,   240,   241,   254,   256,   257,   259,
+     109,   109,   115,   209,   108,   207,   110,   109,   210,   210,
+     210,   111,   111,    98,   266,   113,   116,   117,   118,   119,
+     120,   212,    24,    85,    86,    93,    94,    95,    96,   215,
+     217,   264,   101,   138,   266,   199,     9,   176,   243,   109,
+     199,   110,   199,   199,   199,   199,   199,   199,   199,   199,
+     199,    53,   233,   233,   233,   124,   258,   255,   236,   108,
+     232,   121,   214,   245,   109,   265,   204,   204,   110,   115,
+     244,   214,   110,   199,   108,   244,   199,   266,   251,   124,
+     124,   124,   241,   260,    70,   256,    22,   237,    22,   114,
+     208,   111,   245,   245,   215,   267,    85,   245,   211,   218,
+     109,   245,   244,   111,    22,   110,   245,   111,   114,   125,
+     239,   111,   114,   239,   245,   266,   111,   109,   215,   260,
+     109,   211,   109,   239,   245,   266,   110,    33,   249,   249,
+     109,   125,   238,   244,   251,   199,    25,   250,   250,   249,
+     110,   109,   245,   111,   199,   250,   251,   249,   109,   126,
+     111,   249,   126,   250
 };
 
 #if ! defined (YYSIZE_T) &amp;&amp; defined (__SIZE_TYPE__)
@@ -1979,7 +1996,7 @@ yyreduce:
   switch (yyn)
     {
         case 4:
-#line 314 &quot;parser.y&quot;
+#line 317 &quot;parser.y&quot;
     {
             /*
              * We don't do these in parserEOF() because the parser is reading
@@ -1999,32 +2016,32 @@ yyreduce:
     }
     break;
 
-  case 19:
-#line 346 &quot;parser.y&quot;
+  case 20:
+#line 350 &quot;parser.y&quot;
     {
             if (notSkipping())
                 appendCodeBlock(&amp;currentSpec-&gt;exphdrcode, yyvsp[0].codeb);
         }
     break;
 
-  case 20:
-#line 350 &quot;parser.y&quot;
+  case 21:
+#line 354 &quot;parser.y&quot;
     {
             if (notSkipping())
                 appendCodeBlock(&amp;currentModule-&gt;hdrcode, yyvsp[0].codeb);
         }
     break;
 
-  case 21:
-#line 354 &quot;parser.y&quot;
+  case 22:
+#line 358 &quot;parser.y&quot;
     {
             if (notSkipping())
                 appendCodeBlock(&amp;currentModule-&gt;cppcode, yyvsp[0].codeb);
         }
     break;
 
-  case 43:
-#line 381 &quot;parser.y&quot;
+  case 45:
+#line 386 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -2038,33 +2055,15 @@ yyreduce:
         }
     break;
 
-  case 45:
-#line 397 &quot;parser.y&quot;
-    {
-            appendString(&amp;currentSpec-&gt;options, yyvsp[0].text);
-        }
-    break;
-
   case 46:
-#line 400 &quot;parser.y&quot;
+#line 399 &quot;parser.y&quot;
     {
-            appendString(&amp;currentSpec-&gt;options, yyvsp[0].text);
+            appendString(&amp;currentSpec-&gt;plugins, yyvsp[0].text);
         }
     break;
 
   case 47:
-#line 405 &quot;parser.y&quot;
-    {
-            if (notSkipping())
-            {
-                yywarning(&quot;%SIPNoEmitters is deprecated, please use %SIPOptions instead&quot;);
-                appendString(&amp;currentSpec-&gt;options, &quot;QtNoEmitters&quot;);
-            }
-        }
-    break;
-
-  case 48:
-#line 414 &quot;parser.y&quot;
+#line 404 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -2100,16 +2099,16 @@ yyreduce:
         }
     break;
 
-  case 49:
-#line 449 &quot;parser.y&quot;
+  case 48:
+#line 439 &quot;parser.y&quot;
     {
             yyval.exceptionbase.bibase = NULL;
             yyval.exceptionbase.base = NULL;
         }
     break;
 
-  case 50:
-#line 453 &quot;parser.y&quot;
+  case 49:
+#line 443 &quot;parser.y&quot;
     {
             exceptionDef *xd;
 
@@ -2118,7 +2117,7 @@ yyreduce:
 
             /* See if it is a defined exception. */
             for (xd = currentSpec-&gt;exceptions; xd != NULL; xd = xd-&gt;next)
-                if (sameScopedName(xd-&gt;iff-&gt;fqcname, yyvsp[-1].scpvalp))
+                if (compareScopedNames(xd-&gt;iff-&gt;fqcname, yyvsp[-1].scpvalp) == 0)
                 {
                     yyval.exceptionbase.base = xd;
                     break;
@@ -2184,23 +2183,23 @@ yyreduce:
         }
     break;
 
-  case 51:
-#line 527 &quot;parser.y&quot;
+  case 50:
+#line 517 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
-  case 52:
-#line 532 &quot;parser.y&quot;
+  case 51:
+#line 522 &quot;parser.y&quot;
     {
             if (notSkipping())
                 currentMappedType = newMappedType(currentSpec, &amp;yyvsp[-1].memArg, &amp;yyvsp[0].optflags);
         }
     break;
 
-  case 54:
-#line 538 &quot;parser.y&quot;
+  case 53:
+#line 528 &quot;parser.y&quot;
     {
             int a;
 
@@ -2226,7 +2225,7 @@ yyreduce:
 
                 /* Check a template hasn't already been provided. */
                 for (mtt = currentSpec-&gt;mappedtypetemplates; mtt != NULL; mtt = mtt-&gt;next)
-                    if (sameScopedName(mtt-&gt;mt-&gt;type.u.td-&gt;fqname, yyvsp[0].memArg.u.td-&gt;fqname) &amp;&amp; sameTemplateSignature(&amp;mtt-&gt;mt-&gt;type.u.td-&gt;types, &amp;yyvsp[0].memArg.u.td-&gt;types, TRUE))
+                    if (compareScopedNames(mtt-&gt;mt-&gt;type.u.td-&gt;fqname, yyvsp[0].memArg.u.td-&gt;fqname) == 0 &amp;&amp; sameTemplateSignature(&amp;mtt-&gt;mt-&gt;type.u.td-&gt;types, &amp;yyvsp[0].memArg.u.td-&gt;types, TRUE))
                         yyerror(&quot;%MappedType template for this type has already been defined&quot;);
 
                 yyvsp[0].memArg.nrderefs = 0;
@@ -2235,7 +2234,7 @@ yyreduce:
                 mtt = sipMalloc(sizeof (mappedTypeTmplDef));
 
                 mtt-&gt;sig = yyvsp[-2].signature;
-                mtt-&gt;mt = allocMappedType(&amp;yyvsp[0].memArg);
+                mtt-&gt;mt = allocMappedType(currentSpec, &amp;yyvsp[0].memArg);
                 mtt-&gt;next = currentSpec-&gt;mappedtypetemplates;
 
                 currentSpec-&gt;mappedtypetemplates = mtt;
@@ -2250,8 +2249,8 @@ yyreduce:
         }
     break;
 
-  case 56:
-#line 587 &quot;parser.y&quot;
+  case 55:
+#line 577 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -2266,16 +2265,16 @@ yyreduce:
         }
     break;
 
-  case 59:
-#line 605 &quot;parser.y&quot;
+  case 58:
+#line 595 &quot;parser.y&quot;
     {
             if (notSkipping())
                 appendCodeBlock(&amp;currentMappedType-&gt;iff-&gt;hdrcode, yyvsp[0].codeb);
         }
     break;
 
-  case 60:
-#line 609 &quot;parser.y&quot;
+  case 59:
+#line 599 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -2287,8 +2286,8 @@ yyreduce:
         }
     break;
 
-  case 61:
-#line 618 &quot;parser.y&quot;
+  case 60:
+#line 608 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -2300,8 +2299,8 @@ yyreduce:
         }
     break;
 
-  case 62:
-#line 629 &quot;parser.y&quot;
+  case 61:
+#line 619 &quot;parser.y&quot;
     {
             if (currentSpec -&gt; genc)
                 yyerror(&quot;namespace definition not allowed in a C module&quot;);
@@ -2320,8 +2319,8 @@ yyreduce:
         }
     break;
 
-  case 63:
-#line 644 &quot;parser.y&quot;
+  case 62:
+#line 634 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -2329,17 +2328,8 @@ yyreduce:
                 {
                     classDef *ns = currentScope();
 
-                    if (!isUsedName(ns-&gt;iff-&gt;name))
-                    {
-                        varDef *vd;
-
-                        for (vd = currentSpec-&gt;vars; vd != NULL; vd = vd-&gt;next)
-                            if (vd-&gt;ecd == ns)
-                            {
-                                setIsUsedName(ns-&gt;iff-&gt;name);
-                                break;
-                            }
-                    }
+                    setIsUsedName(ns-&gt;iff-&gt;name);
+                    setIsUsedName(ns-&gt;pyname);
                 }
 
                 popScope();
@@ -2347,8 +2337,8 @@ yyreduce:
         }
     break;
 
-  case 66:
-#line 673 &quot;parser.y&quot;
+  case 65:
+#line 654 &quot;parser.y&quot;
     {
             qualDef *qd;
 
@@ -2358,8 +2348,8 @@ yyreduce:
         }
     break;
 
-  case 67:
-#line 680 &quot;parser.y&quot;
+  case 66:
+#line 661 &quot;parser.y&quot;
     {
             qualDef *qd;
             int nrneeded;
@@ -2380,29 +2370,29 @@ yyreduce:
         }
     break;
 
-  case 70:
-#line 704 &quot;parser.y&quot;
+  case 69:
+#line 685 &quot;parser.y&quot;
     {
             newQualifier(currentModule,-1,-1,yyvsp[0].text,platform_qualifier);
         }
     break;
 
-  case 71:
-#line 709 &quot;parser.y&quot;
+  case 70:
+#line 690 &quot;parser.y&quot;
     {
             newQualifier(currentModule,-1,-1,yyvsp[0].text,feature_qualifier);
         }
     break;
 
-  case 72:
-#line 714 &quot;parser.y&quot;
+  case 71:
+#line 695 &quot;parser.y&quot;
     {
             currentTimelineOrder = 0;
         }
     break;
 
-  case 73:
-#line 717 &quot;parser.y&quot;
+  case 72:
+#line 698 &quot;parser.y&quot;
     {
             qualDef *qd;
             int nrneeded;
@@ -2425,15 +2415,15 @@ yyreduce:
         }
     break;
 
-  case 76:
-#line 743 &quot;parser.y&quot;
+  case 75:
+#line 724 &quot;parser.y&quot;
     {
             newQualifier(currentModule,currentModule -&gt; nrtimelines,currentTimelineOrder++,yyvsp[0].text,time_qualifier);
         }
     break;
 
-  case 77:
-#line 748 &quot;parser.y&quot;
+  case 76:
+#line 729 &quot;parser.y&quot;
     {
             if (skipStackPtr &gt;= MAX_NESTED_IF)
                 yyerror(&quot;Internal error: increase the value of MAX_NESTED_IF&quot;);
@@ -2447,51 +2437,51 @@ yyreduce:
         }
     break;
 
-  case 78:
-#line 761 &quot;parser.y&quot;
+  case 77:
+#line 742 &quot;parser.y&quot;
     {
             yyval.boolean = platOrFeature(yyvsp[0].text,FALSE);
         }
     break;
 
-  case 79:
-#line 764 &quot;parser.y&quot;
+  case 78:
+#line 745 &quot;parser.y&quot;
     {
             yyval.boolean = platOrFeature(yyvsp[0].text,TRUE);
         }
     break;
 
-  case 80:
-#line 767 &quot;parser.y&quot;
+  case 79:
+#line 748 &quot;parser.y&quot;
     {
             yyval.boolean = (platOrFeature(yyvsp[0].text,FALSE) || yyvsp[-2].boolean);
         }
     break;
 
-  case 81:
-#line 770 &quot;parser.y&quot;
+  case 80:
+#line 751 &quot;parser.y&quot;
     {
             yyval.boolean = (platOrFeature(yyvsp[0].text,TRUE) || yyvsp[-3].boolean);
         }
     break;
 
-  case 83:
-#line 776 &quot;parser.y&quot;
+  case 82:
+#line 757 &quot;parser.y&quot;
     {
             yyval.boolean = timePeriod(yyvsp[-2].text,yyvsp[0].text);
         }
     break;
 
-  case 84:
-#line 781 &quot;parser.y&quot;
+  case 83:
+#line 762 &quot;parser.y&quot;
     {
             if (skipStackPtr-- &lt;= 0)
                 yyerror(&quot;Too many %End directives&quot;);
         }
     break;
 
-  case 85:
-#line 787 &quot;parser.y&quot;
+  case 84:
+#line 768 &quot;parser.y&quot;
     {
             optFlag *of;
 
@@ -2519,8 +2509,34 @@ yyreduce:
         }
     break;
 
+  case 85:
+#line 795 &quot;parser.y&quot;
+    {
+            if (notSkipping())
+            {
+                if (currentModule-&gt;defmetatype != NULL)
+                    yyerror(&quot;%DefaultMetatype has already been defined for this module&quot;);
+
+                currentModule-&gt;defmetatype = cacheName(currentSpec, yyvsp[0].text);
+            }
+        }
+    break;
+
   case 86:
-#line 814 &quot;parser.y&quot;
+#line 806 &quot;parser.y&quot;
+    {
+            if (notSkipping())
+            {
+                if (currentModule-&gt;defsupertype != NULL)
+                    yyerror(&quot;%DefaultSupertype has already been defined for this module&quot;);
+
+                currentModule-&gt;defsupertype = cacheName(currentSpec, yyvsp[0].text);
+            }
+        }
+    break;
+
+  case 87:
+#line 817 &quot;parser.y&quot;
     {
             /* Make sure this is the first mention of a module. */
             if (currentSpec-&gt;module != currentModule)
@@ -2529,13 +2545,13 @@ yyreduce:
             if (currentModule-&gt;fullname != NULL)
                 yyerror(&quot;%ConsolidatedModule must appear before any %Module or %CModule directive&quot;);
 
-            setModuleName(currentModule, yyvsp[0].text);
+            setModuleName(currentSpec, currentModule, yyvsp[0].text);
             setIsConsolidated(currentModule);
         }
     break;
 
-  case 87:
-#line 827 &quot;parser.y&quot;
+  case 88:
+#line 830 &quot;parser.y&quot;
     {
             /* Make sure this is the first mention of a module. */
             if (currentSpec-&gt;module != currentModule)
@@ -2544,20 +2560,20 @@ yyreduce:
             if (currentModule-&gt;fullname != NULL)
                 yyerror(&quot;%CompositeModule must appear before any %Module or %CModule directive&quot;);
 
-            setModuleName(currentModule, yyvsp[0].text);
+            setModuleName(currentSpec, currentModule, yyvsp[0].text);
             setIsComposite(currentModule);
         }
     break;
 
-  case 88:
-#line 840 &quot;parser.y&quot;
+  case 89:
+#line 843 &quot;parser.y&quot;
     {
             /* Check the module hasn't already been defined. */
 
             moduleDef *mod;
 
             for (mod = currentSpec-&gt;modules; mod != NULL; mod = mod-&gt;next)
-                if (mod-&gt;fullname != NULL &amp;&amp; strcmp(mod-&gt;fullname, yyvsp[-1].text) == 0)
+                if (mod-&gt;fullname != NULL &amp;&amp; strcmp(mod-&gt;fullname-&gt;text, yyvsp[-1].text) == 0)
                     yyerror(&quot;Module is already defined&quot;);
 
             /*
@@ -2574,7 +2590,7 @@ yyreduce:
                 currentModule = mod;
             }
 
-            setModuleName(currentModule, yyvsp[-1].text);
+            setModuleName(currentSpec, currentModule, yyvsp[-1].text);
             currentModule-&gt;version = yyvsp[0].number;
 
             if (currentSpec-&gt;genc &lt; 0)
@@ -2584,232 +2600,240 @@ yyreduce:
         }
     break;
 
-  case 89:
-#line 873 &quot;parser.y&quot;
+  case 90:
+#line 876 &quot;parser.y&quot;
     {
             yyval.boolean = FALSE;
         }
     break;
 
-  case 90:
-#line 876 &quot;parser.y&quot;
+  case 91:
+#line 879 &quot;parser.y&quot;
     {
             yyval.boolean = TRUE;
         }
     break;
 
-  case 92:
-#line 882 &quot;parser.y&quot;
+  case 93:
+#line 885 &quot;parser.y&quot;
     {
             /*
-             * The grammar design is a bit broken and this is the
-             * easiest way to allow periods in module names.
+             * The grammar design is a bit broken and this is the easiest way
+             * to allow periods in names.
              */
 
             char *cp;
 
             for (cp = yyvsp[0].text; *cp != '\0'; ++cp)
                 if (*cp != '.' &amp;&amp; *cp != '_' &amp;&amp; !isalnum(*cp))
-                    yyerror(&quot;Invalid character in module name&quot;);
+                    yyerror(&quot;Invalid character in name&quot;);
 
             yyval.text = yyvsp[0].text;
         }
     break;
 
-  case 93:
-#line 898 &quot;parser.y&quot;
+  case 94:
+#line 901 &quot;parser.y&quot;
     {
             yyval.number = -1;
         }
     break;
 
-  case 95:
-#line 904 &quot;parser.y&quot;
-    {
-            parseFile(NULL, yyvsp[0].text, NULL, FALSE);
-        }
-    break;
-
   case 96:
-#line 909 &quot;parser.y&quot;
+#line 907 &quot;parser.y&quot;
     {
-            parseFile(NULL, yyvsp[0].text, NULL, TRUE);
+            parseFile(NULL, yyvsp[0].text, NULL, FALSE);
         }
     break;
 
   case 97:
-#line 914 &quot;parser.y&quot;
+#line 912 &quot;parser.y&quot;
     {
-            newImport(yyvsp[0].text);
+            parseFile(NULL, yyvsp[0].text, NULL, TRUE);
         }
     break;
 
   case 98:
-#line 919 &quot;parser.y&quot;
+#line 917 &quot;parser.y&quot;
     {
-            yyval.codeb = NULL;
+            newImport(yyvsp[0].text);
         }
     break;
 
   case 99:
 #line 922 &quot;parser.y&quot;
     {
-            yyval.codeb = yyvsp[0].codeb;
+            yyval.codeb = NULL;
         }
     break;
 
   case 100:
-#line 927 &quot;parser.y&quot;
+#line 925 &quot;parser.y&quot;
     {
-            yyval.codeb = NULL;
+            yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
   case 101:
 #line 930 &quot;parser.y&quot;
     {
-            yyval.codeb = yyvsp[0].codeb;
+            yyval.codeb = NULL;
         }
     break;
 
   case 102:
-#line 935 &quot;parser.y&quot;
+#line 933 &quot;parser.y&quot;
     {
-            yyval.codeb = NULL;
+            yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
   case 103:
 #line 938 &quot;parser.y&quot;
     {
-            yyval.codeb = yyvsp[0].codeb;
+            yyval.codeb = NULL;
         }
     break;
 
   case 104:
-#line 943 &quot;parser.y&quot;
+#line 941 &quot;parser.y&quot;
     {
-            appendCodeBlock(&amp;currentModule-&gt;copying, yyvsp[0].codeb);
+            yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
   case 105:
-#line 948 &quot;parser.y&quot;
+#line 946 &quot;parser.y&quot;
     {
-            yyval.codeb = yyvsp[0].codeb;
+            appendCodeBlock(&amp;currentModule-&gt;copying, yyvsp[0].codeb);
         }
     break;
 
   case 106:
-#line 953 &quot;parser.y&quot;
+#line 951 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
   case 107:
-#line 958 &quot;parser.y&quot;
+#line 956 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
   case 108:
-#line 963 &quot;parser.y&quot;
+#line 961 &quot;parser.y&quot;
     {
-            yyval.codeb = NULL;
+            yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
-  case 110:
-#line 969 &quot;parser.y&quot;
+  case 109:
+#line 966 &quot;parser.y&quot;
     {
-            yyval.codeb = yyvsp[0].codeb;
+            yyval.codeb = NULL;
         }
     break;
 
   case 111:
-#line 974 &quot;parser.y&quot;
+#line 972 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
   case 112:
-#line 979 &quot;parser.y&quot;
+#line 977 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
   case 113:
-#line 984 &quot;parser.y&quot;
+#line 982 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
   case 114:
-#line 989 &quot;parser.y&quot;
+#line 987 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
   case 115:
-#line 994 &quot;parser.y&quot;
+#line 992 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
   case 116:
-#line 999 &quot;parser.y&quot;
+#line 997 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
   case 117:
-#line 1004 &quot;parser.y&quot;
+#line 1002 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
   case 118:
-#line 1009 &quot;parser.y&quot;
+#line 1007 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
   case 119:
-#line 1014 &quot;parser.y&quot;
+#line 1012 &quot;parser.y&quot;
+    {
+            yyval.codeb = yyvsp[0].codeb;
+        }
+    break;
+
+  case 120:
+#line 1017 &quot;parser.y&quot;
     {
             if (notSkipping())
                 appendCodeBlock(&amp;currentModule-&gt;preinitcode, yyvsp[0].codeb);
         }
     break;
 
-  case 120:
-#line 1020 &quot;parser.y&quot;
+  case 121:
+#line 1023 &quot;parser.y&quot;
+    {
+            if (notSkipping())
+                appendCodeBlock(&amp;currentModule-&gt;initcode, yyvsp[0].codeb);
+        }
+    break;
+
+  case 122:
+#line 1029 &quot;parser.y&quot;
     {
             if (notSkipping())
                 appendCodeBlock(&amp;currentModule-&gt;postinitcode, yyvsp[0].codeb);
         }
     break;
 
-  case 121:
-#line 1026 &quot;parser.y&quot;
+  case 123:
+#line 1035 &quot;parser.y&quot;
     {
             if (notSkipping())
                 appendCodeBlock(&amp;currentModule-&gt;unitcode, yyvsp[0].codeb);
         }
     break;
 
-  case 122:
-#line 1032 &quot;parser.y&quot;
+  case 124:
+#line 1041 &quot;parser.y&quot;
     {
             /*
              * This is a no-op and is retained for compatibility
@@ -2819,31 +2843,31 @@ yyreduce:
         }
     break;
 
-  case 123:
-#line 1041 &quot;parser.y&quot;
+  case 125:
+#line 1050 &quot;parser.y&quot;
     {
             if (inMainModule())
                 appendCodeBlock(&amp;currentSpec -&gt; docs,yyvsp[0].codeb);
         }
     break;
 
-  case 124:
-#line 1047 &quot;parser.y&quot;
+  case 126:
+#line 1056 &quot;parser.y&quot;
     {
             appendCodeBlock(&amp;currentSpec -&gt; docs,yyvsp[0].codeb);
         }
     break;
 
-  case 125:
-#line 1052 &quot;parser.y&quot;
+  case 127:
+#line 1061 &quot;parser.y&quot;
     {
             if (inMainModule())
                 yywarning(&quot;%Makefile is ignored, please use the -b flag instead&quot;);
         }
     break;
 
-  case 128:
-#line 1062 &quot;parser.y&quot;
+  case 130:
+#line 1071 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[-1].codeb;
 
@@ -2855,8 +2879,8 @@ yyreduce:
         }
     break;
 
-  case 129:
-#line 1073 &quot;parser.y&quot;
+  case 131:
+#line 1082 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -2868,36 +2892,36 @@ yyreduce:
         }
     break;
 
-  case 131:
-#line 1084 &quot;parser.y&quot;
+  case 133:
+#line 1093 &quot;parser.y&quot;
     {
             yyval.text = NULL;
         }
     break;
 
-  case 132:
-#line 1087 &quot;parser.y&quot;
+  case 134:
+#line 1096 &quot;parser.y&quot;
     {
             yyval.text = yyvsp[0].text;
         }
     break;
 
-  case 133:
-#line 1092 &quot;parser.y&quot;
+  case 135:
+#line 1101 &quot;parser.y&quot;
     {
             yyval.text = NULL;
         }
     break;
 
-  case 134:
-#line 1095 &quot;parser.y&quot;
+  case 136:
+#line 1104 &quot;parser.y&quot;
     {
             yyval.text = yyvsp[0].text;
         }
     break;
 
-  case 141:
-#line 1110 &quot;parser.y&quot;
+  case 143:
+#line 1119 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -2925,22 +2949,22 @@ yyreduce:
         }
     break;
 
-  case 146:
-#line 1145 &quot;parser.y&quot;
+  case 148:
+#line 1154 &quot;parser.y&quot;
     {
             yyval.valp = NULL;
         }
     break;
 
-  case 147:
-#line 1148 &quot;parser.y&quot;
+  case 149:
+#line 1157 &quot;parser.y&quot;
     {
             yyval.valp = yyvsp[0].valp;
         }
     break;
 
-  case 149:
-#line 1154 &quot;parser.y&quot;
+  case 151:
+#line 1163 &quot;parser.y&quot;
     {
             valueDef *vd;
  
@@ -2959,85 +2983,85 @@ yyreduce:
         }
     break;
 
-  case 150:
-#line 1172 &quot;parser.y&quot;
+  case 152:
+#line 1181 &quot;parser.y&quot;
     {
             yyval.qchar = '-';
         }
     break;
 
-  case 151:
-#line 1175 &quot;parser.y&quot;
+  case 153:
+#line 1184 &quot;parser.y&quot;
     {
             yyval.qchar = '+';
         }
     break;
 
-  case 152:
-#line 1178 &quot;parser.y&quot;
+  case 154:
+#line 1187 &quot;parser.y&quot;
     {
             yyval.qchar = '*';
         }
     break;
 
-  case 153:
-#line 1181 &quot;parser.y&quot;
+  case 155:
+#line 1190 &quot;parser.y&quot;
     {
             yyval.qchar = '/';
         }
     break;
 
-  case 154:
-#line 1184 &quot;parser.y&quot;
+  case 156:
+#line 1193 &quot;parser.y&quot;
     {
             yyval.qchar = '&amp;';
         }
     break;
 
-  case 155:
-#line 1187 &quot;parser.y&quot;
+  case 157:
+#line 1196 &quot;parser.y&quot;
     {
             yyval.qchar = '|';
         }
     break;
 
-  case 156:
-#line 1192 &quot;parser.y&quot;
+  case 158:
+#line 1201 &quot;parser.y&quot;
     {
             yyval.qchar = '\0';
         }
     break;
 
-  case 157:
-#line 1195 &quot;parser.y&quot;
+  case 159:
+#line 1204 &quot;parser.y&quot;
     {
             yyval.qchar = '!';
         }
     break;
 
-  case 158:
-#line 1198 &quot;parser.y&quot;
+  case 160:
+#line 1207 &quot;parser.y&quot;
     {
             yyval.qchar = '~';
         }
     break;
 
-  case 159:
-#line 1201 &quot;parser.y&quot;
+  case 161:
+#line 1210 &quot;parser.y&quot;
     {
             yyval.qchar = '-';
         }
     break;
 
-  case 160:
-#line 1204 &quot;parser.y&quot;
+  case 162:
+#line 1213 &quot;parser.y&quot;
     {
             yyval.qchar = '+';
         }
     break;
 
-  case 161:
-#line 1209 &quot;parser.y&quot;
+  case 163:
+#line 1218 &quot;parser.y&quot;
     {
             if (yyvsp[-1].qchar != '\0' &amp;&amp; yyvsp[0].value.vtype == string_value)
                 yyerror(&quot;Invalid unary operator for string&quot;);
@@ -3056,8 +3080,8 @@ yyreduce:
         }
     break;
 
-  case 163:
-#line 1228 &quot;parser.y&quot;
+  case 165:
+#line 1237 &quot;parser.y&quot;
     {
             if (currentSpec -&gt; genc)
                 yyerror(&quot;Scoped names are not allowed in a C module&quot;);
@@ -3066,15 +3090,15 @@ yyreduce:
         }
     break;
 
-  case 164:
-#line 1236 &quot;parser.y&quot;
+  case 166:
+#line 1245 &quot;parser.y&quot;
     {
             yyval.scpvalp = text2scopePart(yyvsp[0].text);
         }
     break;
 
-  case 165:
-#line 1241 &quot;parser.y&quot;
+  case 167:
+#line 1250 &quot;parser.y&quot;
     {
             /*
              * We let the C++ compiler decide if the value is a valid one - no
@@ -3086,8 +3110,8 @@ yyreduce:
         }
     break;
 
-  case 166:
-#line 1250 &quot;parser.y&quot;
+  case 168:
+#line 1259 &quot;parser.y&quot;
     {
             fcallDef *fcd;
 
@@ -3100,64 +3124,64 @@ yyreduce:
         }
     break;
 
-  case 167:
-#line 1260 &quot;parser.y&quot;
+  case 169:
+#line 1269 &quot;parser.y&quot;
     {
             yyval.value.vtype = real_value;
             yyval.value.u.vreal = yyvsp[0].real;
         }
     break;
 
-  case 168:
-#line 1264 &quot;parser.y&quot;
+  case 170:
+#line 1273 &quot;parser.y&quot;
     {
             yyval.value.vtype = numeric_value;
             yyval.value.u.vnum = yyvsp[0].number;
         }
     break;
 
-  case 169:
-#line 1268 &quot;parser.y&quot;
+  case 171:
+#line 1277 &quot;parser.y&quot;
     {
             yyval.value.vtype = numeric_value;
             yyval.value.u.vnum = 1;
         }
     break;
 
-  case 170:
-#line 1272 &quot;parser.y&quot;
+  case 172:
+#line 1281 &quot;parser.y&quot;
     {
             yyval.value.vtype = numeric_value;
             yyval.value.u.vnum = 0;
         }
     break;
 
-  case 171:
-#line 1276 &quot;parser.y&quot;
+  case 173:
+#line 1285 &quot;parser.y&quot;
     {
             yyval.value.vtype = numeric_value;
             yyval.value.u.vnum = 0;
         }
     break;
 
-  case 172:
-#line 1280 &quot;parser.y&quot;
+  case 174:
+#line 1289 &quot;parser.y&quot;
     {
             yyval.value.vtype = string_value;
             yyval.value.u.vstr = yyvsp[0].text;
         }
     break;
 
-  case 173:
-#line 1284 &quot;parser.y&quot;
+  case 175:
+#line 1293 &quot;parser.y&quot;
     {
             yyval.value.vtype = qchar_value;
             yyval.value.u.vqchar = yyvsp[0].qchar;
         }
     break;
 
-  case 174:
-#line 1290 &quot;parser.y&quot;
+  case 176:
+#line 1299 &quot;parser.y&quot;
     {
             /* No values. */
 
@@ -3165,8 +3189,8 @@ yyreduce:
         }
     break;
 
-  case 175:
-#line 1295 &quot;parser.y&quot;
+  case 177:
+#line 1304 &quot;parser.y&quot;
     {
             /* The single or first expression. */
 
@@ -3175,8 +3199,8 @@ yyreduce:
         }
     break;
 
-  case 176:
-#line 1301 &quot;parser.y&quot;
+  case 178:
+#line 1310 &quot;parser.y&quot;
     {
             /* Check that it wasn't ...(,expression...). */
 
@@ -3195,16 +3219,16 @@ yyreduce:
         }
     break;
 
-  case 177:
-#line 1319 &quot;parser.y&quot;
+  case 179:
+#line 1328 &quot;parser.y&quot;
     {
             if (notSkipping())
                 newTypedef(currentSpec, currentModule, yyvsp[-2].text, &amp;yyvsp[-3].memArg, &amp;yyvsp[-1].optflags);
         }
     break;
 
-  case 178:
-#line 1323 &quot;parser.y&quot;
+  case 180:
+#line 1332 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3228,8 +3252,8 @@ yyreduce:
         }
     break;
 
-  case 179:
-#line 1346 &quot;parser.y&quot;
+  case 181:
+#line 1355 &quot;parser.y&quot;
     {
             if (currentSpec -&gt; genc &amp;&amp; yyvsp[0].scpvalp-&gt;next != NULL)
                 yyerror(&quot;Namespaces not allowed in a C module&quot;);
@@ -3242,8 +3266,8 @@ yyreduce:
         }
     break;
 
-  case 180:
-#line 1355 &quot;parser.y&quot;
+  case 182:
+#line 1364 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3255,13 +3279,13 @@ yyreduce:
         }
     break;
 
-  case 181:
-#line 1366 &quot;parser.y&quot;
+  case 183:
+#line 1375 &quot;parser.y&quot;
     {currentIsTemplate = TRUE;}
     break;
 
-  case 182:
-#line 1366 &quot;parser.y&quot;
+  case 184:
+#line 1375 &quot;parser.y&quot;
     {
             if (currentSpec-&gt;genc)
                 yyerror(&quot;Class templates not allowed in a C module&quot;);
@@ -3289,15 +3313,15 @@ yyreduce:
         }
     break;
 
-  case 183:
-#line 1393 &quot;parser.y&quot;
+  case 185:
+#line 1402 &quot;parser.y&quot;
     {
             yyval.signature = yyvsp[-1].signature;
         }
     break;
 
-  case 184:
-#line 1398 &quot;parser.y&quot;
+  case 186:
+#line 1407 &quot;parser.y&quot;
     {
             if (currentSpec -&gt; genc)
                 yyerror(&quot;Class definition not allowed in a C module&quot;);
@@ -3310,16 +3334,16 @@ yyreduce:
         }
     break;
 
-  case 185:
-#line 1407 &quot;parser.y&quot;
+  case 187:
+#line 1416 &quot;parser.y&quot;
     {
             if (notSkipping())
                 yyval.klass = completeClass(yyvsp[-5].scpvalp, &amp;yyvsp[-2].optflags, yyvsp[-1].boolean);
         }
     break;
 
-  case 190:
-#line 1421 &quot;parser.y&quot;
+  case 192:
+#line 1430 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3359,38 +3383,38 @@ yyreduce:
         }
     break;
 
-  case 191:
-#line 1460 &quot;parser.y&quot;
+  case 193:
+#line 1469 &quot;parser.y&quot;
     {
             yyval.boolean = FALSE;
         }
     break;
 
-  case 192:
-#line 1463 &quot;parser.y&quot;
+  case 194:
+#line 1472 &quot;parser.y&quot;
     {
             yyval.boolean = TRUE;
         }
     break;
 
-  case 203:
-#line 1480 &quot;parser.y&quot;
+  case 205:
+#line 1489 &quot;parser.y&quot;
     {
             if (notSkipping())
                 appendCodeBlock(&amp;currentScope()-&gt;cppcode, yyvsp[0].codeb);
         }
     break;
 
-  case 204:
-#line 1484 &quot;parser.y&quot;
+  case 206:
+#line 1493 &quot;parser.y&quot;
     {
             if (notSkipping())
                 appendCodeBlock(&amp;currentScope()-&gt;iff-&gt;hdrcode, yyvsp[0].codeb);
         }
     break;
 
-  case 205:
-#line 1488 &quot;parser.y&quot;
+  case 207:
+#line 1497 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3404,8 +3428,8 @@ yyreduce:
         }
     break;
 
-  case 206:
-#line 1499 &quot;parser.y&quot;
+  case 208:
+#line 1508 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3419,8 +3443,8 @@ yyreduce:
         }
     break;
 
-  case 207:
-#line 1510 &quot;parser.y&quot;
+  case 209:
+#line 1519 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3434,8 +3458,8 @@ yyreduce:
         }
     break;
 
-  case 208:
-#line 1521 &quot;parser.y&quot;
+  case 210:
+#line 1530 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3449,8 +3473,8 @@ yyreduce:
         }
     break;
 
-  case 209:
-#line 1532 &quot;parser.y&quot;
+  case 211:
+#line 1541 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3464,8 +3488,8 @@ yyreduce:
         }
     break;
 
-  case 210:
-#line 1543 &quot;parser.y&quot;
+  case 212:
+#line 1552 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3479,8 +3503,8 @@ yyreduce:
         }
     break;
 
-  case 211:
-#line 1554 &quot;parser.y&quot;
+  case 213:
+#line 1563 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3494,8 +3518,8 @@ yyreduce:
         }
     break;
 
-  case 215:
-#line 1568 &quot;parser.y&quot;
+  case 217:
+#line 1577 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3509,8 +3533,8 @@ yyreduce:
         }
     break;
 
-  case 216:
-#line 1579 &quot;parser.y&quot;
+  case 218:
+#line 1588 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3524,8 +3548,8 @@ yyreduce:
         }
     break;
 
-  case 217:
-#line 1590 &quot;parser.y&quot;
+  case 219:
+#line 1599 &quot;parser.y&quot;
     {
             if (currentSpec -&gt; genc)
                 yyerror(&quot;public section not allowed in a C module&quot;);
@@ -3535,8 +3559,8 @@ yyreduce:
         }
     break;
 
-  case 218:
-#line 1597 &quot;parser.y&quot;
+  case 220:
+#line 1606 &quot;parser.y&quot;
     {
             if (currentSpec -&gt; genc)
                 yyerror(&quot;protected section not allowed in a C module&quot;);
@@ -3546,8 +3570,8 @@ yyreduce:
         }
     break;
 
-  case 219:
-#line 1604 &quot;parser.y&quot;
+  case 221:
+#line 1613 &quot;parser.y&quot;
     {
             if (currentSpec -&gt; genc)
                 yyerror(&quot;private section not allowed in a C module&quot;);
@@ -3557,8 +3581,8 @@ yyreduce:
         }
     break;
 
-  case 220:
-#line 1611 &quot;parser.y&quot;
+  case 222:
+#line 1620 &quot;parser.y&quot;
     {
             if (currentSpec -&gt; genc)
                 yyerror(&quot;signals section not allowed in a C module&quot;);
@@ -3568,22 +3592,22 @@ yyreduce:
         }
     break;
 
-  case 221:
-#line 1620 &quot;parser.y&quot;
+  case 223:
+#line 1629 &quot;parser.y&quot;
     {
             yyval.number = 0;
         }
     break;
 
-  case 222:
-#line 1623 &quot;parser.y&quot;
+  case 224:
+#line 1632 &quot;parser.y&quot;
     {
             yyval.number = SECT_IS_SLOT;
         }
     break;
 
-  case 223:
-#line 1628 &quot;parser.y&quot;
+  case 225:
+#line 1637 &quot;parser.y&quot;
     {
             /* Note that we allow non-virtual dtors in C modules. */
 
@@ -3633,13 +3657,13 @@ yyreduce:
         }
     break;
 
-  case 224:
-#line 1677 &quot;parser.y&quot;
+  case 226:
+#line 1686 &quot;parser.y&quot;
     {currentCtorIsExplicit = TRUE;}
     break;
 
-  case 227:
-#line 1681 &quot;parser.y&quot;
+  case 229:
+#line 1690 &quot;parser.y&quot;
     {
             /* Note that we allow ctors in C modules. */
 
@@ -3666,15 +3690,15 @@ yyreduce:
         }
     break;
 
-  case 228:
-#line 1707 &quot;parser.y&quot;
+  case 230:
+#line 1716 &quot;parser.y&quot;
     {
             yyval.optsignature = NULL;
         }
     break;
 
-  case 229:
-#line 1710 &quot;parser.y&quot;
+  case 231:
+#line 1719 &quot;parser.y&quot;
     {
             yyval.optsignature = sipMalloc(sizeof (signatureDef));
 
@@ -3682,15 +3706,15 @@ yyreduce:
         }
     break;
 
-  case 230:
-#line 1717 &quot;parser.y&quot;
+  case 232:
+#line 1726 &quot;parser.y&quot;
     {
             yyval.optsignature = NULL;
         }
     break;
 
-  case 231:
-#line 1720 &quot;parser.y&quot;
+  case 233:
+#line 1729 &quot;parser.y&quot;
     {
             yyval.optsignature = sipMalloc(sizeof (signatureDef));
 
@@ -3699,22 +3723,22 @@ yyreduce:
         }
     break;
 
-  case 232:
-#line 1728 &quot;parser.y&quot;
+  case 234:
+#line 1737 &quot;parser.y&quot;
     {
             yyval.number = FALSE;
         }
     break;
 
-  case 233:
-#line 1731 &quot;parser.y&quot;
+  case 235:
+#line 1740 &quot;parser.y&quot;
     {
             yyval.number = TRUE;
         }
     break;
 
-  case 234:
-#line 1736 &quot;parser.y&quot;
+  case 236:
+#line 1745 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3734,8 +3758,8 @@ yyreduce:
         }
     break;
 
-  case 235:
-#line 1753 &quot;parser.y&quot;
+  case 237:
+#line 1762 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3763,8 +3787,8 @@ yyreduce:
         }
     break;
 
-  case 236:
-#line 1778 &quot;parser.y&quot;
+  case 238:
+#line 1787 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -3825,7 +3849,7 @@ yyreduce:
 
                     /* Check it doesn't already exist. */
                     for (al = scope-&gt;casts; al != NULL; al = al-&gt;next)
-                        if (sameScopedName(yyvsp[-11].memArg.u.snd, al-&gt;arg.u.snd))
+                        if (compareScopedNames(yyvsp[-11].memArg.u.snd, al-&gt;arg.u.snd) == 0)
                             yyerror(&quot;This operator cast has already been specified in this class&quot;);
 
                     al = sipMalloc(sizeof (argList));
@@ -3841,174 +3865,174 @@ yyreduce:
         }
     break;
 
-  case 237:
-#line 1854 &quot;parser.y&quot;
+  case 239:
+#line 1863 &quot;parser.y&quot;
     {yyval.text = &quot;__add__&quot;;}
     break;
 
-  case 238:
-#line 1855 &quot;parser.y&quot;
+  case 240:
+#line 1864 &quot;parser.y&quot;
     {yyval.text = &quot;__sub__&quot;;}
     break;
 
-  case 239:
-#line 1856 &quot;parser.y&quot;
+  case 241:
+#line 1865 &quot;parser.y&quot;
     {yyval.text = &quot;__mul__&quot;;}
     break;
 
-  case 240:
-#line 1857 &quot;parser.y&quot;
+  case 242:
+#line 1866 &quot;parser.y&quot;
     {yyval.text = &quot;__div__&quot;;}
     break;
 
-  case 241:
-#line 1858 &quot;parser.y&quot;
+  case 243:
+#line 1867 &quot;parser.y&quot;
     {yyval.text = &quot;__mod__&quot;;}
     break;
 
-  case 242:
-#line 1859 &quot;parser.y&quot;
+  case 244:
+#line 1868 &quot;parser.y&quot;
     {yyval.text = &quot;__and__&quot;;}
     break;
 
-  case 243:
-#line 1860 &quot;parser.y&quot;
+  case 245:
+#line 1869 &quot;parser.y&quot;
     {yyval.text = &quot;__or__&quot;;}
     break;
 
-  case 244:
-#line 1861 &quot;parser.y&quot;
+  case 246:
+#line 1870 &quot;parser.y&quot;
     {yyval.text = &quot;__xor__&quot;;}
     break;
 
-  case 245:
-#line 1862 &quot;parser.y&quot;
+  case 247:
+#line 1871 &quot;parser.y&quot;
     {yyval.text = &quot;__lshift__&quot;;}
     break;
 
-  case 246:
-#line 1863 &quot;parser.y&quot;
+  case 248:
+#line 1872 &quot;parser.y&quot;
     {yyval.text = &quot;__rshift__&quot;;}
     break;
 
-  case 247:
-#line 1864 &quot;parser.y&quot;
+  case 249:
+#line 1873 &quot;parser.y&quot;
     {yyval.text = &quot;__iadd__&quot;;}
     break;
 
-  case 248:
-#line 1865 &quot;parser.y&quot;
+  case 250:
+#line 1874 &quot;parser.y&quot;
     {yyval.text = &quot;__isub__&quot;;}
     break;
 
-  case 249:
-#line 1866 &quot;parser.y&quot;
+  case 251:
+#line 1875 &quot;parser.y&quot;
     {yyval.text = &quot;__imul__&quot;;}
     break;
 
-  case 250:
-#line 1867 &quot;parser.y&quot;
+  case 252:
+#line 1876 &quot;parser.y&quot;
     {yyval.text = &quot;__idiv__&quot;;}
     break;
 
-  case 251:
-#line 1868 &quot;parser.y&quot;
+  case 253:
+#line 1877 &quot;parser.y&quot;
     {yyval.text = &quot;__imod__&quot;;}
     break;
 
-  case 252:
-#line 1869 &quot;parser.y&quot;
+  case 254:
+#line 1878 &quot;parser.y&quot;
     {yyval.text = &quot;__iand__&quot;;}
     break;
 
-  case 253:
-#line 1870 &quot;parser.y&quot;
+  case 255:
+#line 1879 &quot;parser.y&quot;
     {yyval.text = &quot;__ior__&quot;;}
     break;
 
-  case 254:
-#line 1871 &quot;parser.y&quot;
+  case 256:
+#line 1880 &quot;parser.y&quot;
     {yyval.text = &quot;__ixor__&quot;;}
     break;
 
-  case 255:
-#line 1872 &quot;parser.y&quot;
+  case 257:
+#line 1881 &quot;parser.y&quot;
     {yyval.text = &quot;__ilshift__&quot;;}
     break;
 
-  case 256:
-#line 1873 &quot;parser.y&quot;
+  case 258:
+#line 1882 &quot;parser.y&quot;
     {yyval.text = &quot;__irshift__&quot;;}
     break;
 
-  case 257:
-#line 1874 &quot;parser.y&quot;
+  case 259:
+#line 1883 &quot;parser.y&quot;
     {yyval.text = &quot;__invert__&quot;;}
     break;
 
-  case 258:
-#line 1875 &quot;parser.y&quot;
+  case 260:
+#line 1884 &quot;parser.y&quot;
     {yyval.text = &quot;__call__&quot;;}
     break;
 
-  case 259:
-#line 1876 &quot;parser.y&quot;
+  case 261:
+#line 1885 &quot;parser.y&quot;
     {yyval.text = &quot;__getitem__&quot;;}
     break;
 
-  case 260:
-#line 1877 &quot;parser.y&quot;
+  case 262:
+#line 1886 &quot;parser.y&quot;
     {yyval.text = &quot;__lt__&quot;;}
     break;
 
-  case 261:
-#line 1878 &quot;parser.y&quot;
+  case 263:
+#line 1887 &quot;parser.y&quot;
     {yyval.text = &quot;__le__&quot;;}
     break;
 
-  case 262:
-#line 1879 &quot;parser.y&quot;
+  case 264:
+#line 1888 &quot;parser.y&quot;
     {yyval.text = &quot;__eq__&quot;;}
     break;
 
-  case 263:
-#line 1880 &quot;parser.y&quot;
+  case 265:
+#line 1889 &quot;parser.y&quot;
     {yyval.text = &quot;__ne__&quot;;}
     break;
 
-  case 264:
-#line 1881 &quot;parser.y&quot;
+  case 266:
+#line 1890 &quot;parser.y&quot;
     {yyval.text = &quot;__gt__&quot;;}
     break;
 
-  case 265:
-#line 1882 &quot;parser.y&quot;
+  case 267:
+#line 1891 &quot;parser.y&quot;
     {yyval.text = &quot;__ge__&quot;;}
     break;
 
-  case 266:
-#line 1885 &quot;parser.y&quot;
+  case 268:
+#line 1894 &quot;parser.y&quot;
     {
             yyval.number = FALSE;
         }
     break;
 
-  case 267:
-#line 1888 &quot;parser.y&quot;
+  case 269:
+#line 1897 &quot;parser.y&quot;
     {
             yyval.number = TRUE;
         }
     break;
 
-  case 268:
-#line 1893 &quot;parser.y&quot;
+  case 270:
+#line 1902 &quot;parser.y&quot;
     {
             yyval.number = 0;
         }
     break;
 
-  case 269:
-#line 1896 &quot;parser.y&quot;
+  case 271:
+#line 1905 &quot;parser.y&quot;
     {
             if (yyvsp[0].number != 0)
                 yyerror(&quot;Abstract virtual function '= 0' expected&quot;);
@@ -4017,30 +4041,30 @@ yyreduce:
         }
     break;
 
-  case 270:
-#line 1904 &quot;parser.y&quot;
+  case 272:
+#line 1913 &quot;parser.y&quot;
     {
             yyval.optflags.nrFlags = 0;
         }
     break;
 
-  case 271:
-#line 1907 &quot;parser.y&quot;
+  case 273:
+#line 1916 &quot;parser.y&quot;
     {
             yyval.optflags = yyvsp[-1].optflags;
         }
     break;
 
-  case 272:
-#line 1913 &quot;parser.y&quot;
+  case 274:
+#line 1922 &quot;parser.y&quot;
     {
             yyval.optflags.flags[0] = yyvsp[0].flag;
             yyval.optflags.nrFlags = 1;
         }
     break;
 
-  case 273:
-#line 1917 &quot;parser.y&quot;
+  case 275:
+#line 1926 &quot;parser.y&quot;
     {
             /* Check there is room. */
 
@@ -4053,76 +4077,76 @@ yyreduce:
         }
     break;
 
-  case 274:
-#line 1929 &quot;parser.y&quot;
+  case 276:
+#line 1938 &quot;parser.y&quot;
     {
             yyval.flag.ftype = bool_flag;
             yyval.flag.fname = yyvsp[0].text;
         }
     break;
 
-  case 275:
-#line 1933 &quot;parser.y&quot;
+  case 277:
+#line 1942 &quot;parser.y&quot;
     {
             yyval.flag = yyvsp[0].flag;
             yyval.flag.fname = yyvsp[-2].text;
         }
     break;
 
-  case 276:
-#line 1939 &quot;parser.y&quot;
+  case 278:
+#line 1948 &quot;parser.y&quot;
     {
-            yyval.flag.ftype = name_flag;
+            yyval.flag.ftype = (strchr(yyvsp[0].text, '.') != NULL) ? dotted_name_flag : name_flag;
             yyval.flag.fvalue.sval = yyvsp[0].text;
         }
     break;
 
-  case 277:
-#line 1943 &quot;parser.y&quot;
+  case 279:
+#line 1952 &quot;parser.y&quot;
     {
             yyval.flag.ftype = string_flag;
             yyval.flag.fvalue.sval = yyvsp[0].text;
         }
     break;
 
-  case 278:
-#line 1947 &quot;parser.y&quot;
+  case 280:
+#line 1956 &quot;parser.y&quot;
     {
             yyval.flag.ftype = integer_flag;
             yyval.flag.fvalue.ival = yyvsp[0].number;
         }
     break;
 
-  case 279:
-#line 1953 &quot;parser.y&quot;
+  case 281:
+#line 1962 &quot;parser.y&quot;
     {
             yyval.codeb = NULL;
         }
     break;
 
-  case 280:
-#line 1956 &quot;parser.y&quot;
+  case 282:
+#line 1965 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
-  case 281:
-#line 1961 &quot;parser.y&quot;
+  case 283:
+#line 1970 &quot;parser.y&quot;
     {
             yyval.codeb = NULL;
         }
     break;
 
-  case 282:
-#line 1964 &quot;parser.y&quot;
+  case 284:
+#line 1973 &quot;parser.y&quot;
     {
             yyval.codeb = yyvsp[0].codeb;
         }
     break;
 
-  case 283:
-#line 1969 &quot;parser.y&quot;
+  case 285:
+#line 1978 &quot;parser.y&quot;
     {
             int a, nrrxcon, nrrxdis, nrslotcon, nrslotdis, nrarray, nrarraysize;
 
@@ -4171,8 +4195,8 @@ yyreduce:
         }
     break;
 
-  case 284:
-#line 2017 &quot;parser.y&quot;
+  case 286:
+#line 2026 &quot;parser.y&quot;
     {
             /* No arguments. */
 
@@ -4180,8 +4204,8 @@ yyreduce:
         }
     break;
 
-  case 285:
-#line 2022 &quot;parser.y&quot;
+  case 287:
+#line 2031 &quot;parser.y&quot;
     {
             /* The single or first argument. */
 
@@ -4190,8 +4214,8 @@ yyreduce:
         }
     break;
 
-  case 286:
-#line 2028 &quot;parser.y&quot;
+  case 288:
+#line 2037 &quot;parser.y&quot;
     {
             /* Check that it wasn't ...(,arg...). */
             if (yyvsp[-2].signature.nrArgs == 0)
@@ -4219,8 +4243,8 @@ yyreduce:
         }
     break;
 
-  case 287:
-#line 2055 &quot;parser.y&quot;
+  case 289:
+#line 2064 &quot;parser.y&quot;
     {
             yyval.memArg.atype = signal_type;
             yyval.memArg.argflags = ARG_IS_CONST;
@@ -4232,8 +4256,8 @@ yyreduce:
         }
     break;
 
-  case 288:
-#line 2064 &quot;parser.y&quot;
+  case 290:
+#line 2073 &quot;parser.y&quot;
     {
             yyval.memArg.atype = slot_type;
             yyval.memArg.argflags = ARG_IS_CONST;
@@ -4245,8 +4269,8 @@ yyreduce:
         }
     break;
 
-  case 289:
-#line 2073 &quot;parser.y&quot;
+  case 291:
+#line 2082 &quot;parser.y&quot;
     {
             yyval.memArg.atype = anyslot_type;
             yyval.memArg.argflags = ARG_IS_CONST;
@@ -4258,8 +4282,8 @@ yyreduce:
         }
     break;
 
-  case 290:
-#line 2082 &quot;parser.y&quot;
+  case 292:
+#line 2091 &quot;parser.y&quot;
     {
             yyval.memArg.atype = rxcon_type;
             yyval.memArg.argflags = 0;
@@ -4273,8 +4297,8 @@ yyreduce:
         }
     break;
 
-  case 291:
-#line 2093 &quot;parser.y&quot;
+  case 293:
+#line 2102 &quot;parser.y&quot;
     {
             yyval.memArg.atype = rxdis_type;
             yyval.memArg.argflags = 0;
@@ -4285,8 +4309,8 @@ yyreduce:
         }
     break;
 
-  case 292:
-#line 2101 &quot;parser.y&quot;
+  case 294:
+#line 2110 &quot;parser.y&quot;
     {
             yyval.memArg.atype = slotcon_type;
             yyval.memArg.argflags = ARG_IS_CONST;
@@ -4304,8 +4328,8 @@ yyreduce:
         }
     break;
 
-  case 293:
-#line 2116 &quot;parser.y&quot;
+  case 295:
+#line 2125 &quot;parser.y&quot;
     {
             yyval.memArg.atype = slotdis_type;
             yyval.memArg.argflags = ARG_IS_CONST;
@@ -4323,8 +4347,8 @@ yyreduce:
         }
     break;
 
-  case 294:
-#line 2131 &quot;parser.y&quot;
+  case 296:
+#line 2140 &quot;parser.y&quot;
     {
             yyval.memArg.atype = qobject_type;
             yyval.memArg.argflags = 0;
@@ -4333,26 +4357,26 @@ yyreduce:
         }
     break;
 
-  case 295:
-#line 2137 &quot;parser.y&quot;
+  case 297:
+#line 2146 &quot;parser.y&quot;
     {
             yyval.memArg = yyvsp[-1].memArg;
             yyval.memArg.defval = yyvsp[0].valp;
         }
     break;
 
-  case 296:
-#line 2143 &quot;parser.y&quot;
+  case 298:
+#line 2152 &quot;parser.y&quot;
     {currentIsStatic = TRUE;}
     break;
 
-  case 301:
-#line 2151 &quot;parser.y&quot;
+  case 303:
+#line 2160 &quot;parser.y&quot;
     {currentOverIsVirt = TRUE;}
     break;
 
-  case 304:
-#line 2155 &quot;parser.y&quot;
+  case 306:
+#line 2164 &quot;parser.y&quot;
     {
             if (notSkipping())
             {
@@ -4386,8 +4410,8 @@ yyreduce:
         }
     break;
 
-  case 305:
-#line 2188 &quot;parser.y&quot;
+  case 307:
+#line 2197 &quot;parser.y&quot;
     {
             yyval.memArg = yyvsp[-2].memArg;
             yyval.memArg.nrderefs += yyvsp[-1].number;
@@ -4396,8 +4420,8 @@ yyreduce:
         }
     break;
 
-  case 306:
-#line 2194 &quot;parser.y&quot;
+  case 308:
+#line 2203 &quot;parser.y&quot;
     {
             yyval.memArg = yyvsp[-2].memArg;
             yyval.memArg.nrderefs += yyvsp[-1].number;
@@ -4406,8 +4430,8 @@ yyreduce:
         }
     break;
 
-  case 307:
-#line 2202 &quot;parser.y&quot;
+  case 309:
+#line 2211 &quot;parser.y&quot;
     {
             yyval.memArg = yyvsp[-2].memArg;
             yyval.memArg.name = yyvsp[-1].text;
@@ -4468,15 +4492,15 @@ yyreduce:
         }
     break;
 
-  case 308:
-#line 2262 &quot;parser.y&quot;
+  case 310:
+#line 2271 &quot;parser.y&quot;
     {
             yyval.number = 0;
         }
     break;
 
-  case 309:
-#line 2265 &quot;parser.y&quot;
+  case 311:
+#line 2274 &quot;parser.y&quot;
     {
             if (currentSpec -&gt; genc)
                 yyerror(&quot;References not allowed in a C module&quot;);
@@ -4485,22 +4509,22 @@ yyreduce:
         }
     break;
 
-  case 310:
-#line 2273 &quot;parser.y&quot;
+  case 312:
+#line 2282 &quot;parser.y&quot;
     {
             yyval.number = 0;
         }
     break;
 
-  case 311:
-#line 2276 &quot;parser.y&quot;
+  case 313:
+#line 2285 &quot;parser.y&quot;
     {
             yyval.number = yyvsp[-1].number + 1;
         }
     break;
 
-  case 312:
-#line 2281 &quot;parser.y&quot;
+  case 314:
+#line 2290 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4514,8 +4538,8 @@ yyreduce:
         }
     break;
 
-  case 313:
-#line 2292 &quot;parser.y&quot;
+  case 315:
+#line 2301 &quot;parser.y&quot;
     {
             templateDef *td;
 
@@ -4532,8 +4556,8 @@ yyreduce:
         }
     break;
 
-  case 314:
-#line 2306 &quot;parser.y&quot;
+  case 316:
+#line 2315 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4553,8 +4577,8 @@ yyreduce:
         }
     break;
 
-  case 315:
-#line 2323 &quot;parser.y&quot;
+  case 317:
+#line 2332 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4564,8 +4588,8 @@ yyreduce:
         }
     break;
 
-  case 316:
-#line 2330 &quot;parser.y&quot;
+  case 318:
+#line 2339 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4575,8 +4599,8 @@ yyreduce:
         }
     break;
 
-  case 317:
-#line 2337 &quot;parser.y&quot;
+  case 319:
+#line 2346 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4586,8 +4610,8 @@ yyreduce:
         }
     break;
 
-  case 318:
-#line 2344 &quot;parser.y&quot;
+  case 320:
+#line 2353 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4597,8 +4621,8 @@ yyreduce:
         }
     break;
 
-  case 319:
-#line 2351 &quot;parser.y&quot;
+  case 321:
+#line 2360 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4608,8 +4632,8 @@ yyreduce:
         }
     break;
 
-  case 320:
-#line 2358 &quot;parser.y&quot;
+  case 322:
+#line 2367 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4619,8 +4643,8 @@ yyreduce:
         }
     break;
 
-  case 321:
-#line 2365 &quot;parser.y&quot;
+  case 323:
+#line 2374 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4630,8 +4654,8 @@ yyreduce:
         }
     break;
 
-  case 322:
-#line 2372 &quot;parser.y&quot;
+  case 324:
+#line 2381 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4641,8 +4665,8 @@ yyreduce:
         }
     break;
 
-  case 323:
-#line 2379 &quot;parser.y&quot;
+  case 325:
+#line 2388 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4652,8 +4676,8 @@ yyreduce:
         }
     break;
 
-  case 324:
-#line 2386 &quot;parser.y&quot;
+  case 326:
+#line 2395 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4663,8 +4687,8 @@ yyreduce:
         }
     break;
 
-  case 325:
-#line 2393 &quot;parser.y&quot;
+  case 327:
+#line 2402 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4674,8 +4698,8 @@ yyreduce:
         }
     break;
 
-  case 326:
-#line 2400 &quot;parser.y&quot;
+  case 328:
+#line 2409 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4685,8 +4709,8 @@ yyreduce:
         }
     break;
 
-  case 327:
-#line 2407 &quot;parser.y&quot;
+  case 329:
+#line 2416 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4696,8 +4720,8 @@ yyreduce:
         }
     break;
 
-  case 328:
-#line 2414 &quot;parser.y&quot;
+  case 330:
+#line 2423 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4707,8 +4731,8 @@ yyreduce:
         }
     break;
 
-  case 329:
-#line 2421 &quot;parser.y&quot;
+  case 331:
+#line 2430 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4718,8 +4742,8 @@ yyreduce:
         }
     break;
 
-  case 330:
-#line 2428 &quot;parser.y&quot;
+  case 332:
+#line 2437 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4729,8 +4753,8 @@ yyreduce:
         }
     break;
 
-  case 331:
-#line 2435 &quot;parser.y&quot;
+  case 333:
+#line 2444 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4740,8 +4764,8 @@ yyreduce:
         }
     break;
 
-  case 332:
-#line 2442 &quot;parser.y&quot;
+  case 334:
+#line 2451 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4751,8 +4775,8 @@ yyreduce:
         }
     break;
 
-  case 333:
-#line 2449 &quot;parser.y&quot;
+  case 335:
+#line 2458 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4762,8 +4786,8 @@ yyreduce:
         }
     break;
 
-  case 334:
-#line 2456 &quot;parser.y&quot;
+  case 336:
+#line 2465 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4773,8 +4797,8 @@ yyreduce:
         }
     break;
 
-  case 335:
-#line 2463 &quot;parser.y&quot;
+  case 337:
+#line 2472 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4784,8 +4808,8 @@ yyreduce:
         }
     break;
 
-  case 336:
-#line 2470 &quot;parser.y&quot;
+  case 338:
+#line 2479 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4795,8 +4819,8 @@ yyreduce:
         }
     break;
 
-  case 337:
-#line 2477 &quot;parser.y&quot;
+  case 339:
+#line 2486 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4806,8 +4830,8 @@ yyreduce:
         }
     break;
 
-  case 338:
-#line 2484 &quot;parser.y&quot;
+  case 340:
+#line 2493 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4817,8 +4841,8 @@ yyreduce:
         }
     break;
 
-  case 339:
-#line 2491 &quot;parser.y&quot;
+  case 341:
+#line 2500 &quot;parser.y&quot;
     {
             yyval.memArg.nrderefs = 0;
             yyval.memArg.argflags = 0;
@@ -4828,8 +4852,8 @@ yyreduce:
         }
     break;
 
-  case 340:
-#line 2500 &quot;parser.y&quot;
+  case 342:
+#line 2509 &quot;parser.y&quot;
     {
             /* The single or first type. */
 
@@ -4838,8 +4862,8 @@ yyreduce:
         }
     break;
 
-  case 341:
-#line 2506 &quot;parser.y&quot;
+  case 343:
+#line 2515 &quot;parser.y&quot;
     {
             /* Check there is nothing after an ellipsis. */
             if (yyvsp[-2].signature.args[yyvsp[-2].signature.nrArgs - 1].atype == ellipsis_type)
@@ -4856,15 +4880,15 @@ yyreduce:
         }
     break;
 
-  case 342:
-#line 2522 &quot;parser.y&quot;
+  case 344:
+#line 2531 &quot;parser.y&quot;
     {
             yyval.throwlist = NULL;
         }
     break;
 
-  case 343:
-#line 2525 &quot;parser.y&quot;
+  case 345:
+#line 2534 &quot;parser.y&quot;
     {
             if (currentSpec-&gt;genc)
                 yyerror(&quot;Exceptions not allowed in a C module&quot;);
@@ -4873,8 +4897,8 @@ yyreduce:
         }
     break;
 
-  case 344:
-#line 2533 &quot;parser.y&quot;
+  case 346:
+#line 2542 &quot;parser.y&quot;
     {
             /* Empty list so use a blank. */
 
@@ -4883,8 +4907,8 @@ yyreduce:
         }
     break;
 
-  case 345:
-#line 2539 &quot;parser.y&quot;
+  case 347:
+#line 2548 &quot;parser.y&quot;
     {
             /* The only or first exception. */
 
@@ -4894,8 +4918,8 @@ yyreduce:
         }
     break;
 
-  case 346:
-#line 2546 &quot;parser.y&quot;
+  case 348:
+#line 2555 &quot;parser.y&quot;
     {
             /* Check that it wasn't ...(,arg...). */
 
@@ -4916,7 +4940,7 @@ yyreduce:
     }
 
 /* Line 1010 of yacc.c.  */
-#line 4920 &quot;parser.c&quot;
+#line 4944 &quot;parser.c&quot;
 *
   yyvsp -= yylen;
   yyssp -= yylen;
@@ -5141,7 +5165,7 @@ yyreturn:
 }
 
 
-#line 2562 &quot;parser.y&quot;
+#line 2571 &quot;parser.y&quot;
 
 
 
@@ -5155,22 +5179,22 @@ void parse(sipSpec *spec, FILE *fp, char *filename, stringList *tsl,
 
     /* Initialise the spec. */
  
-    spec -&gt; modules = NULL;
-    spec -&gt; namecache = NULL;
-    spec -&gt; ifacefiles = NULL;
-    spec -&gt; classes = NULL;
-    spec -&gt; classtemplates = NULL;
-    spec -&gt; exceptions = NULL;
-    spec -&gt; mappedtypes = NULL;
-    spec -&gt; mappedtypetemplates = NULL;
-    spec -&gt; enums = NULL;
-    spec -&gt; vars = NULL;
-    spec -&gt; typedefs = NULL;
-    spec -&gt; exphdrcode = NULL;
-    spec -&gt; docs = NULL;
-    spec -&gt; sigslots = FALSE;
-    spec -&gt; genc = -1;
-    spec -&gt; options = NULL;
+    spec-&gt;modules = NULL;
+    spec-&gt;namecache = NULL;
+    spec-&gt;ifacefiles = NULL;
+    spec-&gt;classes = NULL;
+    spec-&gt;classtemplates = NULL;
+    spec-&gt;exceptions = NULL;
+    spec-&gt;mappedtypes = NULL;
+    spec-&gt;mappedtypetemplates = NULL;
+    spec-&gt;enums = NULL;
+    spec-&gt;vars = NULL;
+    spec-&gt;typedefs = NULL;
+    spec-&gt;exphdrcode = NULL;
+    spec-&gt;docs = NULL;
+    spec-&gt;sigslots = FALSE;
+    spec-&gt;genc = -1;
+    spec-&gt;plugins = NULL;
 
     currentSpec = spec;
     neededQualifiers = tsl;
@@ -5187,7 +5211,7 @@ void parse(sipSpec *spec, FILE *fp, char *filename, stringList *tsl,
     sectionFlags = 0;
 
     newModule(fp, filename);
-    spec -&gt; module = currentModule;
+    spec-&gt;module = currentModule;
 
     yyparse();
 
@@ -5278,38 +5302,10 @@ static moduleDef *allocModule()
     moduleDef *newmod, **tailp;
 
     newmod = sipMalloc(sizeof (moduleDef));
-    newmod-&gt;fullname = NULL;
-    newmod-&gt;name = NULL;
+
     newmod-&gt;version = -1;
-    newmod-&gt;modflags = 0;
     newmod-&gt;qobjclass = -1;
-    newmod-&gt;othfuncs = NULL;
-    newmod-&gt;overs = NULL;
-    newmod-&gt;hdrcode = NULL;
-    newmod-&gt;cppcode = NULL;
-    newmod-&gt;copying = NULL;
-    newmod-&gt;preinitcode = NULL;
-    newmod-&gt;postinitcode = NULL;
-    newmod-&gt;unitcode = NULL;
-    newmod-&gt;file = NULL;
-    newmod-&gt;qualifiers = NULL;
-    newmod-&gt;root.cd = NULL;
-    newmod-&gt;root.child = NULL;
-    newmod-&gt;nrtimelines = 0;
-    newmod-&gt;nrclasses = 0;
-    newmod-&gt;nrexceptions = 0;
-    newmod-&gt;nrmappedtypes = 0;
-    newmod-&gt;nrenums = 0;
-    newmod-&gt;nrtypedefs = 0;
     newmod-&gt;nrvirthandlers = -1;
-    newmod-&gt;virthandlers = NULL;
-    newmod-&gt;license = NULL;
-    newmod-&gt;proxies = NULL;
-    newmod-&gt;container = NULL;
-    newmod-&gt;used = NULL;
-    newmod-&gt;allimports = NULL;
-    newmod-&gt;imports = NULL;
-    newmod-&gt;next = NULL;
 
     /*
      * The consolidated module support needs these to be in order that they
@@ -5352,7 +5348,7 @@ ifaceFileDef *findIfaceFile(sipSpec *pt, moduleDef *mod, scopedNameDef *fqname,
 
     for (iff = pt-&gt;ifacefiles; iff != NULL; iff = iff-&gt;next)
     {
-        if (!sameScopedName(iff-&gt;fqcname, fqname))
+        if (compareScopedNames(iff-&gt;fqcname, fqname) != 0)
             continue;
 
         /*
@@ -5415,7 +5411,7 @@ ifaceFileDef *findIfaceFile(sipSpec *pt, moduleDef *mod, scopedNameDef *fqname,
 
     iff = sipMalloc(sizeof (ifaceFileDef));
 
-    iff-&gt;name = cacheName(pt, scopedNameTail(fqname));
+    iff-&gt;name = cacheName(pt, scopedNameToString(fqname));
     iff-&gt;type = iftype;
     iff-&gt;fqcname = fqname;
     iff-&gt;module = NULL;
@@ -5454,37 +5450,8 @@ static classDef *findClassWithInterface(sipSpec *pt, ifaceFileDef *iff)
     cd = sipMalloc(sizeof (classDef));
 
     cd -&gt; iff = iff;
-    cd -&gt; pyname = classBaseName(cd);
+    cd -&gt; pyname = cacheName(pt, classBaseName(cd));
     cd -&gt; classnr = -1;
-    cd -&gt; classflags = 0;
-    cd -&gt; userflags = 0;
-    cd -&gt; ecd = NULL;
-    cd -&gt; dtorexceptions = NULL;
-    cd -&gt; real = NULL;
-    cd -&gt; node = NULL;
-    cd -&gt; supers = NULL;
-    cd -&gt; mro = NULL;
-    cd -&gt; td = NULL;
-    cd -&gt; ctors = NULL;
-    cd -&gt; defctor = NULL;
-    cd -&gt; dealloccode = NULL;
-    cd -&gt; dtorcode = NULL;
-    cd -&gt; members = NULL;
-    cd -&gt; overs = NULL;
-    cd -&gt; casts = NULL;
-    cd -&gt; vmembers = NULL;
-    cd -&gt; visible = NULL;
-    cd -&gt; cppcode = NULL;
-    cd -&gt; convtosubcode = NULL;
-    cd -&gt; subbase = NULL;
-    cd -&gt; convtocode = NULL;
-    cd -&gt; travcode = NULL;
-    cd -&gt; clearcode = NULL;
-    cd -&gt; readbufcode = NULL;
-    cd -&gt; writebufcode = NULL;
-    cd -&gt; segcountcode = NULL;
-    cd -&gt; charbufcode = NULL;
-    cd -&gt; picklecode = NULL;
     cd -&gt; next = pt -&gt; classes;
 
     pt -&gt; classes = cd;
@@ -5649,7 +5616,7 @@ static classDef *newClass(sipSpec *pt,ifaceFileType iftype,
             if (ns-&gt;iff-&gt;type != namespace_iface)
                 continue;
 
-            if (!sameScopedName(ns-&gt;iff-&gt;fqcname, fqname))
+            if (compareScopedNames(ns-&gt;iff-&gt;fqcname, fqname) != 0)
                 continue;
 
             cd-&gt;real = ns;
@@ -5672,15 +5639,21 @@ static void finishClass(sipSpec *pt, moduleDef *mod, classDef *cd, optFlags *of)
     /* Get the Python name and see if it is different to the C++ name. */
     pyname = getPythonName(of, classBaseName(cd));
 
-    cd -&gt; pyname = NULL;
+    cd-&gt;pyname = NULL;
     checkAttributes(pt, mod, cd-&gt;ecd, pyname, FALSE);
-    cd-&gt;pyname = pyname;
+    cd-&gt;pyname = cacheName(pt, pyname);
+
+    if ((flg = findOptFlag(of, &quot;Metatype&quot;, dotted_name_flag)) != NULL)
+        cd-&gt;metatype = cacheName(pt, flg-&gt;fvalue.sval);
+
+    if ((flg = findOptFlag(of, &quot;Supertype&quot;, dotted_name_flag)) != NULL)
+        cd-&gt;supertype = cacheName(pt, flg-&gt;fvalue.sval);
 
-    if ((flg = findOptFlag(of, &quot;TypeFlags&quot;, integer_flag)) != NULL)
-        cd-&gt;userflags = flg-&gt;fvalue.ival;
+    if ((flg = findOptFlag(of, &quot;PyQt4Flags&quot;, integer_flag)) != NULL)
+        cd-&gt;pyqt4_flags = flg-&gt;fvalue.ival;
 
-    if (findOptFlag(of, &quot;NoQMetaObject&quot;, bool_flag) != NULL)
-        setNoQMetaObject(cd);
+    if (findOptFlag(of, &quot;PyQt4NoQMetaObject&quot;, bool_flag) != NULL)
+        setPyQt4NoQMetaObject(cd);
 
     if (isOpaque(cd))
     {
@@ -5825,7 +5798,7 @@ static void finishClass(sipSpec *pt, moduleDef *mod, classDef *cd, optFlags *of)
     if (inMainModule())
     {
         setIsUsedName(cd-&gt;iff-&gt;name);
-        setIsClassName(cd-&gt;iff-&gt;name);
+        setIsUsedName(cd-&gt;pyname);
     }
 }
 
@@ -5860,9 +5833,6 @@ static mappedTypeDef *newMappedType(sipSpec *pt, argDef *ad, optFlags *of)
 
     iff = findIfaceFile(pt, currentModule, snd, mappedtype_iface, ad);
 
-    if (inMainModule())
-        setIsUsedName(iff-&gt;name);
-
     /* Check it hasn't already been defined. */
     for (mtd = pt-&gt;mappedtypes; mtd != NULL; mtd = mtd-&gt;next)
         if (mtd-&gt;iff == iff)
@@ -5879,7 +5849,7 @@ static mappedTypeDef *newMappedType(sipSpec *pt, argDef *ad, optFlags *of)
     iff-&gt;module = currentModule;
 
     /* Create a new mapped type. */
-    mtd = allocMappedType(ad);
+    mtd = allocMappedType(pt, ad);
 
     if (findOptFlag(of, &quot;NoRelease&quot;, bool_flag) != NULL)
         setNoRelease(mtd);
@@ -5889,6 +5859,9 @@ static mappedTypeDef *newMappedType(sipSpec *pt, argDef *ad, optFlags *of)
 
     pt-&gt;mappedtypes = mtd;
 
+    if (inMainModule())
+        setIsUsedName(mtd-&gt;cname);
+
     return mtd;
 }
 
@@ -5896,22 +5869,18 @@ static mappedTypeDef *newMappedType(sipSpec *pt, argDef *ad, optFlags *of)
 /*
  * Allocate, intialise and return a mapped type structure.
  */
-mappedTypeDef *allocMappedType(argDef *type)
+mappedTypeDef *allocMappedType(sipSpec *pt, argDef *type)
 {
     mappedTypeDef *mtd;
 
     mtd = sipMalloc(sizeof (mappedTypeDef));
 
-    mtd-&gt;mtflags = 0;
     mtd-&gt;type = *type;
     mtd-&gt;type.argflags = 0;
     mtd-&gt;type.nrderefs = 0;
 
+    mtd-&gt;cname = cacheName(pt, type2string(&amp;mtd-&gt;type));
     mtd-&gt;mappednr = -1;
-    mtd-&gt;iff = NULL;
-    mtd-&gt;convfromcode = NULL;
-    mtd-&gt;convtocode = NULL;
-    mtd-&gt;next = NULL;
 
     return mtd;
 }
@@ -5920,8 +5889,8 @@ mappedTypeDef *allocMappedType(argDef *type)
 /*
  * Create a new enum.
  */
-static enumDef *newEnum(sipSpec *pt,moduleDef *mod,char *name,optFlags *of,
-            int flags)
+static enumDef *newEnum(sipSpec *pt, moduleDef *mod, char *name, optFlags *of,
+        int flags)
 {
     enumDef *ed;
     classDef *escope = currentScope();
@@ -5930,15 +5899,23 @@ static enumDef *newEnum(sipSpec *pt,moduleDef *mod,char *name,optFlags *of,
 
     if (name != NULL)
     {
-        ed-&gt;fqcname = text2scopedName(escope, name);
         ed-&gt;pyname = cacheName(pt, getPythonName(of, name));
-
         checkAttributes(pt, mod, escope, ed-&gt;pyname-&gt;text, FALSE);
+
+        ed-&gt;fqcname = text2scopedName(escope, name);
+        ed-&gt;cname = cacheName(pt, scopedNameToString(ed-&gt;fqcname));
+
+        if (inMainModule())
+        {
+            setIsUsedName(ed-&gt;pyname);
+            setIsUsedName(ed-&gt;cname);
+        }
     }
     else
     {
-        ed-&gt;fqcname = NULL;
         ed-&gt;pyname = NULL;
+        ed-&gt;fqcname = NULL;
+        ed-&gt;cname = NULL;
     }
 
     ed -&gt; enumflags = flags;
@@ -5970,7 +5947,8 @@ void appendTypeStrings(scopedNameDef *ename, signatureDef *patt, signatureDef *s
 
         if (pad-&gt;atype == defined_type)
         {
-            char *nam = NULL;
+            char *nam = NULL, *val;
+            argDef *sad;
 
             /*
              * If the type names are already known then check that this is one
@@ -6002,8 +5980,18 @@ void appendTypeStrings(scopedNameDef *ename, signatureDef *patt, signatureDef *s
             /* Add the name. */
             appendScopedName(names, text2scopePart(nam));
 
-            /* Add the corresponding value. */
-            appendScopedName(values, text2scopePart(getType(ename, &amp;src-&gt;args[a])));
+            /*
+             * Add the corresponding value.  For defined types we don't want 
+             * any indirection or references.
+             */
+            sad = &amp;src-&gt;args[a];
+
+            if (sad-&gt;atype == defined_type)
+                val = scopedNameToString(sad-&gt;u.snd);
+            else
+                val = type2string(sad);
+
+            appendScopedName(values, text2scopePart(val));
         }
         else if (pad-&gt;atype == template_type)
         {
@@ -6018,72 +6006,141 @@ void appendTypeStrings(scopedNameDef *ename, signatureDef *patt, signatureDef *s
 
 
 /*
- * Convert a type to a string.  We impose some limitations because I'm too lazy
- * to handle everything that might be needed one day.
+ * Convert a type to a string on the heap.  The string will use the minimum
+ * whitespace while still remaining valid C++.
  */
-static char *getType(scopedNameDef *ename, argDef *ad)
+static char *type2string(argDef *ad)
 {
-    if (ad-&gt;atype == defined_type)
-        return scopedNameToString(ad-&gt;u.snd);
+    int i, on_heap = FALSE;
+    int nr_derefs = ad-&gt;nrderefs;
+    int is_reference = isReference(ad);
+    char *s;
+
+    /* Use the original type if possible. */
+    if (ad-&gt;original_type != NULL &amp;&amp; !noTypeName(ad-&gt;original_type))
+    {
+        s = scopedNameToString(ad-&gt;original_type-&gt;fqname);
+        on_heap = TRUE;
 
-    /* For the moment only handle non-pointer, non-reference base types. */
-    if (ad-&gt;nrderefs == 0 &amp;&amp; !isReference(ad))
+        nr_derefs -= ad-&gt;original_type-&gt;type.nrderefs;
+
+        if (isReference(&amp;ad-&gt;original_type-&gt;type))
+            is_reference = FALSE;
+    }
+    else
         switch (ad-&gt;atype)
         {
+        case template_type:
+            {
+                templateDef *td = ad-&gt;u.td;
+
+                s = scopedNameToString(td-&gt;fqname);
+                append(&amp;s, &quot;&lt;&quot;);
+
+                for (i = 0; i &lt; td-&gt;types.nrArgs; ++i)
+                {
+                    char *sub_type = type2string(&amp;td-&gt;types.args[i]);
+
+                    if (i &gt; 0)
+                        append(&amp;s, &quot;,&quot;);
+
+                    append(&amp;s, sub_type);
+                    free(sub_type);
+                }
+
+                if (s[strlen(s) - 1] == '&gt;')
+                    append(&amp;s, &quot; &gt;&quot;);
+                else
+                    append(&amp;s, &quot;&gt;&quot;);
+
+                on_heap = TRUE;
+                break;
+            }
+
+        case defined_type:
+            s = scopedNameToString(ad-&gt;u.snd);
+            on_heap = TRUE;
+            break;
+
         case ustring_type:
-            return &quot;unsigned char&quot;;
+            s = &quot;unsigned char&quot;;
+            break;
 
         case string_type:
-            return &quot;char&quot;;
+            s = &quot;char&quot;;
+            break;
 
         case sstring_type:
-            return &quot;signed char&quot;;
+            s = &quot;signed char&quot;;
+            break;
 
         case wstring_type:
-            return &quot;wchar_t&quot;;
+            s = &quot;wchar_t&quot;;
+            break;
 
         case ushort_type:
-            return &quot;unsigned short&quot;;
+            s = &quot;unsigned short&quot;;
+            break;
 
         case short_type:
-            return &quot;short&quot;;
+            s = &quot;short&quot;;
+            break;
 
         case uint_type:
-            return &quot;unsigned int&quot;;
+            s = &quot;unsigned int&quot;;
+            break;
 
         case int_type:
         case cint_type:
-            return &quot;int&quot;;
+            s = &quot;int&quot;;
+            break;
 
         case ulong_type:
-            return &quot;unsigned long&quot;;
+            s = &quot;unsigned long&quot;;
+            break;
 
         case long_type:
-            return &quot;long&quot;;
+            s = &quot;long&quot;;
+            break;
 
         case ulonglong_type:
-            return &quot;unsigned long long&quot;;
+            s = &quot;unsigned long long&quot;;
+            break;
 
         case longlong_type:
-            return &quot;long long&quot;;
+            s = &quot;long long&quot;;
+            break;
 
         case float_type:
         case cfloat_type:
-            return &quot;float&quot;;
+            s = &quot;float&quot;;
+            break;
 
         case double_type:
         case cdouble_type:
-            return &quot;double&quot;;
+            s = &quot;double&quot;;
+            break;
 
         case bool_type:
         case cbool_type:
-            return &quot;bool&quot;;
+            s = &quot;bool&quot;;
+            break;
+
+        default:
+            fatal(&quot;Unsupported type argument to type2string()\n&quot;);
         }
 
-    fatalScopedName(ename);
-    fatal(&quot;: unsupported type argument to template class instantiation\n&quot;);
+    /* Make sure the string is on the heap. */
+    if (!on_heap)
+        s = sipStrdup(s);
 
-    return NULL;
+    while (nr_derefs-- &gt; 0)
+        append(&amp;s, &quot;*&quot;);
+
+    if (is_reference)
+        append(&amp;s, &quot;&amp;&quot;);
+
+    return s;
 }
 
 
@@ -6162,7 +6219,7 @@ static void instantiateClassTemplate(sipSpec *pt, moduleDef *mod,
     *cd = *tcd-&gt;cd;
 
     resetIsTemplateClass(cd);
-    cd-&gt;pyname = scopedNameTail(fqname);
+    cd-&gt;pyname = cacheName(pt, scopedNameTail(fqname));
     cd-&gt;td = td;
 
     /* Handle the interface file. */
@@ -6182,7 +6239,7 @@ static void instantiateClassTemplate(sipSpec *pt, moduleDef *mod,
     if (inMainModule())
     {
         setIsUsedName(cd-&gt;iff-&gt;name);
-        setIsClassName(cd-&gt;iff-&gt;name);
+        setIsUsedName(cd-&gt;pyname);
     }
 
     cd-&gt;ecd = currentScope();
@@ -6394,10 +6451,19 @@ static void instantiateTemplateEnums(sipSpec *pt, classTmplDef *tcd,
             *ed = *ted;
 
             if (ed-&gt;fqcname != NULL)
+            {
                 ed-&gt;fqcname = text2scopedName(cd, scopedNameTail(ed-&gt;fqcname));
+                ed-&gt;cname = cacheName(pt, scopedNameToString(ed-&gt;fqcname));
+            }
+
+            if (inMainModule())
+            {
+                if (ed-&gt;pyname != NULL)
+                    setIsUsedName(ed-&gt;pyname);
 
-            if (ed-&gt;pyname != NULL &amp;&amp; inMainModule())
-                setIsUsedName(ed-&gt;pyname);
+                if (ed-&gt;cname != NULL)
+                    setIsUsedName(ed-&gt;cname);
+            }
 
             ed-&gt;ecd = cd;
             ed-&gt;module = mod;
@@ -6460,8 +6526,7 @@ static void instantiateTemplateVars(sipSpec *pt, classTmplDef *tcd,
             vd-&gt;getcode = templateCode(pt, used, vd-&gt;getcode, type_names, type_values);
             vd-&gt;setcode = templateCode(pt, used, vd-&gt;setcode, type_names, type_values);
 
-            vd-&gt;next = pt-&gt;vars;
-            pt-&gt;vars = vd;
+            addVariable(pt, vd);
         }
 }
 
@@ -6605,10 +6670,7 @@ codeBlock *templateCode(sipSpec *pt, ifaceFileList **used, codeBlock *ocb,
             else
             {
                 static char *gen_names[] = {
-                    &quot;sipForceConvertToTransfer_&quot;,
-                    &quot;sipForceConvertTo_&quot;,
-                    &quot;sipConvertFromTransfer_&quot;,
-                    &quot;sipConvertFrom_&quot;,
+                    &quot;sipType_&quot;,
                     &quot;sipClass_&quot;,
                     &quot;sipEnum_&quot;,
                     &quot;sipException_&quot;,
@@ -6759,7 +6821,7 @@ static int foundInScope(scopedNameDef *fq_name, scopedNameDef *rel_name)
         snd = copyScopedName(classFQCName(scope));
         appendScopedName(&amp;snd, copyScopedName(rel_name));
 
-        found = sameScopedName(fq_name, snd);
+        found = (compareScopedNames(fq_name, snd) == 0);
 
         freeScopedName(snd);
 
@@ -6767,7 +6829,7 @@ static int foundInScope(scopedNameDef *fq_name, scopedNameDef *rel_name)
             return TRUE;
     }
 
-    return sameScopedName(fq_name, rel_name);
+    return compareScopedNames(fq_name, rel_name) == 0;
 }
 
 
@@ -6777,7 +6839,7 @@ static int foundInScope(scopedNameDef *fq_name, scopedNameDef *rel_name)
 static void newTypedef(sipSpec *pt, moduleDef *mod, char *name, argDef *type,
         optFlags *optflgs)
 {
-    typedefDef *td;
+    typedefDef *td, **tdp;
     scopedNameDef *fqname;
     classDef *scope;
 
@@ -6801,14 +6863,24 @@ static void newTypedef(sipSpec *pt, moduleDef *mod, char *name, argDef *type,
             }
     }
 
-    /* Check it doesn't already exist. */
-    for (td = pt-&gt;typedefs; td != NULL; td = td-&gt;next)
-        if (sameScopedName(td-&gt;fqname, fqname))
+    /*
+     * Check it doesn't already exist and find the position in the sorted list
+     * where it should be put.
+     */
+    for (tdp = &amp;pt-&gt;typedefs; *tdp != NULL; tdp = &amp;(*tdp)-&gt;next)
+    {
+        int res = compareScopedNames((*tdp)-&gt;fqname, fqname);
+
+        if (res == 0)
         {
             fatalScopedName(fqname);
             fatal(&quot; already defined\n&quot;);
         }
 
+        if (res &gt; 0)
+            break;
+    }
+
     td = sipMalloc(sizeof (typedefDef));
 
     td-&gt;tdflags = 0;
@@ -6816,14 +6888,14 @@ static void newTypedef(sipSpec *pt, moduleDef *mod, char *name, argDef *type,
     td-&gt;ecd = scope;
     td-&gt;module = mod;
     td-&gt;type = *type;
-    td-&gt;next = pt-&gt;typedefs;
+
+    td-&gt;next = *tdp;
+    *tdp = td;
 
     if (findOptFlag(optflgs, &quot;NoTypeName&quot;, bool_flag) != NULL)
         setNoTypeName(td);
 
     mod-&gt;nrtypedefs++;
-
-    pt-&gt;typedefs = td;
 }
 
 
@@ -6924,12 +6996,11 @@ static void newVar(sipSpec *pt,moduleDef *mod,char *name,int isstatic,
     var -&gt; accessfunc = acode;
     var -&gt; getcode = gcode;
     var -&gt; setcode = scode;
-    var -&gt; next = pt -&gt; vars;
 
     if (isstatic || (escope != NULL &amp;&amp; escope-&gt;iff-&gt;type == namespace_iface))
         setIsStaticVar(var);
 
-    pt -&gt; vars = var;
+    addVariable(pt, var);
 }
 
 
@@ -7016,7 +7087,6 @@ static void newFunction(sipSpec *pt,moduleDef *mod,int sflags,int isstatic,
             signatureDef *cppsig)
 {
     classDef *cd = currentScope();
-    nameDef *pname;
     int factory, xferback, no_arg_parser;
     overDef *od, **odp, **headp;
     optFlag *of;
@@ -7133,7 +7203,7 @@ static void newFunction(sipSpec *pt,moduleDef *mod,int sflags,int isstatic,
 
     if (isvirt)
     {
-        if (isSignal(od) &amp;&amp; !optNoEmitters(pt))
+        if (isSignal(od) &amp;&amp; pluginPyQt3(pt))
             yyerror(&quot;Virtual signals aren't supported&quot;);
 
         setIsVirtual(od);
@@ -7252,26 +7322,32 @@ static const char *getPythonName(optFlags *optflgs, const char *cname)
 
 
 /*
- * Cache a name in a module.
+ * Cache a name in a module.  Entries in the cache are stored in order of
+ * decreasing length.
  */
 nameDef *cacheName(sipSpec *pt, const char *name)
 {
-    nameDef *nd;
+    nameDef *nd, **ndp = &amp;pt-&gt;namecache;
+    size_t len = strlen(name);
 
-    /* See if it already exists. */
-    for (nd = pt-&gt;namecache; nd != NULL; nd = nd-&gt;next)
-        if (strcmp(nd-&gt;text, name) == 0)
+    /* Skip entries that are too large. */
+    while (*ndp != NULL &amp;&amp; (*ndp)-&gt;len &gt; len)
+        ndp = &amp;(*ndp)-&gt;next;
+
+    /* Check entries that are the right length. */
+    for (nd = *ndp; nd != NULL &amp;&amp; nd-&gt;len == len; nd = nd-&gt;next)
+        if (memcmp(nd-&gt;text, name, len) == 0)
             return nd;
 
     /* Create a new one. */
     nd = sipMalloc(sizeof (nameDef));
 
     nd-&gt;nameflags = 0;
-    nd-&gt;module = currentSpec-&gt;module;
     nd-&gt;text = name;
-    nd-&gt;next = pt-&gt;namecache;
+    nd-&gt;len = len;
+    nd-&gt;next = *ndp;
 
-    pt-&gt;namecache = nd;
+    *ndp = nd;
 
     return nd;
 }
@@ -7284,7 +7360,7 @@ static memberDef *findFunction(sipSpec *pt, moduleDef *mod, classDef *cd,
         const char *pname, int hwcode, int nrargs, int no_arg_parser)
 {
     static struct slot_map {
-        char *name;         /* The slot name. */
+        const char *name;   /* The slot name. */
         slotType type;      /* The corresponding type. */
         int needs_hwcode;   /* Set if handwritten code is required. */
         int nrargs;         /* Nr. of arguments. */
@@ -7351,6 +7427,7 @@ static memberDef *findFunction(sipSpec *pt, moduleDef *mod, classDef *cd,
                 yyerror(&quot;This Python slot requires %MethodCode&quot;);
 
             if (sm-&gt;nrargs &gt;= 0)
+            {
                 if (cd == NULL)
                 {
                     /* Global operators need one extra argument. */
@@ -7359,6 +7436,7 @@ static memberDef *findFunction(sipSpec *pt, moduleDef *mod, classDef *cd,
                 }
                 else if (sm-&gt;nrargs != nrargs)
                     yyerror(&quot;Incorrect number of arguments to Python slot&quot;);
+            }
 
             st = sm-&gt;type;
 
@@ -7522,7 +7600,7 @@ static void checkAttributes(sipSpec *pt, moduleDef *mod, classDef *pyscope,
         if (cd -&gt; ecd != pyscope || cd -&gt; pyname == NULL)
             continue;
 
-        if (strcmp(cd-&gt;pyname, attr) == 0 &amp;&amp; !isExternal(cd))
+        if (strcmp(cd-&gt;pyname-&gt;text, attr) == 0 &amp;&amp; !isExternal(cd))
             yyerror(&quot;There is already a class or namespace in scope with the same Python name&quot;);
     }
 
@@ -8007,52 +8085,36 @@ static int getDeprecated(optFlags *optflgs)
 
 
 /*
- * Return TRUE if the QtNoEmitters option was specified.
- */
-int optNoEmitters(sipSpec *pt)
-{
-    return optFind(pt, &quot;QtNoEmitters&quot;);
-}
-
-
-/*
- * Return TRUE if the QtRegisterTypes option was specified.
- */
-int optRegisterTypes(sipSpec *pt)
-{
-    return optFind(pt, &quot;QtRegisterTypes&quot;);
-}
-
-
-/*
- * Return TRUE if the Qt4Q_OBJECT option was specified.
+ * Return TRUE if the PyQt3 plugin was specified.
  */
-int optQ_OBJECT4(sipSpec *pt)
+int pluginPyQt3(sipSpec *pt)
 {
-    return optFind(pt, &quot;Qt4Q_OBJECT&quot;);
+    return stringFind(pt-&gt;plugins, &quot;PyQt3&quot;);
 }
 
 
 /*
- * Return TRUE if the AssignmentHelpers option was specified.
+ * Return TRUE if the PyQt4 plugin was specified.
  */
-int optAssignmentHelpers(sipSpec *pt)
+int pluginPyQt4(sipSpec *pt)
 {
-    return optFind(pt, &quot;AssignmentHelpers&quot;);
+    return stringFind(pt-&gt;plugins, &quot;PyQt4&quot;);
 }
 
 
 /*
- * Return TRUE if a particular option was specified with %SIPOptions.
+ * Return TRUE if a list of strings contains a given entry.
  */
-static int optFind(sipSpec *pt, const char *opt)
+static int stringFind(stringList *sl, const char *s)
 {
-    stringList *sl;
-
-    for (sl = pt-&gt;options; sl != NULL; sl = sl-&gt;next)
-        if (strcmp(sl-&gt;s, opt) == 0)
+    while (sl != NULL)
+    {
+        if (strcmp(sl-&gt;s, s) == 0)
             return TRUE;
 
+        sl = sl-&gt;next;
+    }
+
     return FALSE;
 }
 
@@ -8060,9 +8122,12 @@ static int optFind(sipSpec *pt, const char *opt)
 /*
  * Set the name of a module.
  */
-static void setModuleName(moduleDef *mod, const char *fullname)
+static void setModuleName(sipSpec *pt, moduleDef *mod, const char *fullname)
 {
-    mod-&gt;fullname = fullname;
+    mod-&gt;fullname = cacheName(pt, fullname);
+
+    if (inMainModule())
+        setIsUsedName(mod-&gt;fullname);
 
     if ((mod-&gt;name = strrchr(fullname, '.')) != NULL)
         mod-&gt;name++;
@@ -8112,3 +8177,23 @@ static classDef *completeClass(scopedNameDef *snd, optFlags *of, int has_def)
     return cd;
 }
 
+
+/*
+ * Add a variable to the list so that the list remains sorted.
+ */
+static void addVariable(sipSpec *pt, varDef *vd)
+{
+    varDef **at = &amp;pt-&gt;vars;
+
+    while (*at != NULL)
+    {
+        if (strcmp(vd-&gt;pyname-&gt;text, (*at)-&gt;pyname-&gt;text) &lt; 0)
+            break;
+
+        at = &amp;(*at)-&gt;next;
+    }
+
+    vd-&gt;next = *at;
+    *at = vd;
+}
+</diff>
      <filename>sipgen/parser.c</filename>
    </modified>
    <modified>
      <diff>@@ -29,15 +29,15 @@
    /* Put the tokens into the symbol table, so that GDB and other debuggers
       know about them.  */
    enum yytokentype {
-     TK_OPTIONS = 258,
-     TK_NOEMITTERS = 259,
-     TK_DOC = 260,
-     TK_EXPORTEDDOC = 261,
-     TK_MAKEFILE = 262,
-     TK_ACCESSCODE = 263,
-     TK_GETCODE = 264,
-     TK_SETCODE = 265,
-     TK_PREINITCODE = 266,
+     TK_PLUGIN = 258,
+     TK_DOC = 259,
+     TK_EXPORTEDDOC = 260,
+     TK_MAKEFILE = 261,
+     TK_ACCESSCODE = 262,
+     TK_GETCODE = 263,
+     TK_SETCODE = 264,
+     TK_PREINITCODE = 265,
+     TK_INITCODE = 266,
      TK_POSTINITCODE = 267,
      TK_UNITCODE = 268,
      TK_MODCODE = 269,
@@ -130,18 +130,20 @@
      TK_RAISECODE = 356,
      TK_EXPLICIT = 357,
      TK_TEMPLATE = 358,
-     TK_ELLIPSIS = 359
+     TK_ELLIPSIS = 359,
+     TK_DEFMETATYPE = 360,
+     TK_DEFSUPERTYPE = 361
    };
 #endif
-#define TK_OPTIONS 258
-#define TK_NOEMITTERS 259
-#define TK_DOC 260
-#define TK_EXPORTEDDOC 261
-#define TK_MAKEFILE 262
-#define TK_ACCESSCODE 263
-#define TK_GETCODE 264
-#define TK_SETCODE 265
-#define TK_PREINITCODE 266
+#define TK_PLUGIN 258
+#define TK_DOC 259
+#define TK_EXPORTEDDOC 260
+#define TK_MAKEFILE 261
+#define TK_ACCESSCODE 262
+#define TK_GETCODE 263
+#define TK_SETCODE 264
+#define TK_PREINITCODE 265
+#define TK_INITCODE 266
 #define TK_POSTINITCODE 267
 #define TK_UNITCODE 268
 #define TK_MODCODE 269
@@ -235,12 +237,14 @@
 #define TK_EXPLICIT 357
 #define TK_TEMPLATE 358
 #define TK_ELLIPSIS 359
+#define TK_DEFMETATYPE 360
+#define TK_DEFSUPERTYPE 361
 
 
 
 
 #if ! defined (YYSTYPE) &amp;&amp; ! defined (YYSTYPE_IS_DECLARED)
-#line 120 &quot;parser.y&quot;
+#line 121 &quot;parser.y&quot;
 typedef union YYSTYPE {
     char            qchar;
     char            *text;
@@ -262,7 +266,7 @@ typedef union YYSTYPE {
     classDef        *klass;
 } YYSTYPE;
 /* Line 1241 of yacc.c.  */
-#line 266 &quot;parser.h&quot;
+#line 270 &quot;parser.h&quot;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 # define YYSTYPE_IS_TRIVIAL 1</diff>
      <filename>sipgen/parser.h</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 /*
  * The SIP parser.
  *
- * Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+ * Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
  * 
  * This file is part of SIP.
  * 
@@ -94,12 +94,12 @@ static int getDeprecated(optFlags *);
 static void templateSignature(signatureDef *sd, int result, classTmplDef *tcd, templateDef *td, classDef *ncd);
 static void templateType(argDef *ad, classTmplDef *tcd, templateDef *td, classDef *ncd);
 static int search_back(const char *end, const char *start, const char *target);
-static char *getType(scopedNameDef *ename, argDef *ad);
+static char *type2string(argDef *ad);
 static char *scopedNameToString(scopedNameDef *name);
 static void addUsedFromCode(sipSpec *pt, ifaceFileList **used, const char *sname);
 static int sameName(scopedNameDef *snd, const char *sname);
-static int optFind(sipSpec *pt, const char *opt);
-static void setModuleName(moduleDef *mod, const char *fullname);
+static int stringFind(stringList *sl, const char *s);
+static void setModuleName(sipSpec *pt, moduleDef *mod, const char *fullname);
 static int foundInScope(scopedNameDef *fq_name, scopedNameDef *rel_name);
 static void defineClass(scopedNameDef *snd);
 static classDef *completeClass(scopedNameDef *snd, optFlags *of, int has_def);
@@ -115,6 +115,7 @@ static overDef *instantiateTemplateOverloads(sipSpec *pt, overDef *tod,
         templateDef *td, classDef *cd, ifaceFileList **used,
         scopedNameDef *type_names, scopedNameDef *type_values);
 static void resolveAnyTypedef(sipSpec *pt, argDef *ad);
+static void addVariable(sipSpec *pt, varDef *vd);
 %}
 
 %union {
@@ -138,8 +139,7 @@ static void resolveAnyTypedef(sipSpec *pt, argDef *ad);
     classDef        *klass;
 }
 
-%token          TK_OPTIONS
-%token          TK_NOEMITTERS
+%token          TK_PLUGIN
 %token          TK_DOC
 %token          TK_EXPORTEDDOC
 %token          TK_MAKEFILE
@@ -147,6 +147,7 @@ static void resolveAnyTypedef(sipSpec *pt, argDef *ad);
 %token          TK_GETCODE
 %token          TK_SETCODE
 %token          TK_PREINITCODE
+%token          TK_INITCODE
 %token          TK_POSTINITCODE
 %token          TK_UNITCODE
 %token          TK_MODCODE
@@ -240,6 +241,8 @@ static void resolveAnyTypedef(sipSpec *pt, argDef *ad);
 %token          TK_EXPLICIT
 %token          TK_TEMPLATE
 %token          TK_ELLIPSIS
+%token          TK_DEFMETATYPE
+%token          TK_DEFSUPERTYPE
 
 %type &lt;memArg&gt;          argvalue
 %type &lt;memArg&gt;          argtype
@@ -288,7 +291,7 @@ static void resolveAnyTypedef(sipSpec *pt, argDef *ad);
 %type &lt;text&gt;            operatorname
 %type &lt;text&gt;            optfilename
 %type &lt;text&gt;            optname
-%type &lt;text&gt;            modname
+%type &lt;text&gt;            dottedname
 %type &lt;optflags&gt;        optflags
 %type &lt;optflags&gt;        flaglist
 %type &lt;flag&gt;            flag
@@ -333,8 +336,7 @@ statement:  {
 modstatement:   module
     |   consmodule
     |   compmodule
-    |   options
-    |   noemitters
+    |   plugin
     |   copying
     |   include
     |   optinclude
@@ -343,6 +345,8 @@ modstatement:   module
     |   platforms
     |   feature
     |   license
+    |   defmetatype
+    |   defsupertype
     |   exphdrcode {
             if (notSkipping())
                 appendCodeBlock(&amp;currentSpec-&gt;exphdrcode, $1);
@@ -356,6 +360,7 @@ modstatement:   module
                 appendCodeBlock(&amp;currentModule-&gt;cppcode, $1);
         }
     |   preinitcode
+    |   initcode
     |   postinitcode
     |   unitcode
     |   prepycode
@@ -391,23 +396,8 @@ nsstatement:    ifstart
         }
     ;
 
-options:    TK_OPTIONS '(' optionlist ')'
-    ;
-
-optionlist: TK_NAME {
-            appendString(&amp;currentSpec-&gt;options, $1);
-        }
-    |   optionlist ',' TK_NAME {
-            appendString(&amp;currentSpec-&gt;options, $3);
-        }
-    ;
-
-noemitters: TK_NOEMITTERS {
-            if (notSkipping())
-            {
-                yywarning(&quot;%SIPNoEmitters is deprecated, please use %SIPOptions instead&quot;);
-                appendString(&amp;currentSpec-&gt;options, &quot;QtNoEmitters&quot;);
-            }
+plugin:     TK_PLUGIN TK_NAME {
+            appendString(&amp;currentSpec-&gt;plugins, $2);
         }
     ;
 
@@ -458,7 +448,7 @@ baseexception:  {
 
             /* See if it is a defined exception. */
             for (xd = currentSpec-&gt;exceptions; xd != NULL; xd = xd-&gt;next)
-                if (sameScopedName(xd-&gt;iff-&gt;fqcname, $2))
+                if (compareScopedNames(xd-&gt;iff-&gt;fqcname, $2) == 0)
                 {
                     $$.base = xd;
                     break;
@@ -560,7 +550,7 @@ mappedtypetmpl: template TK_MAPPEDTYPE basetype {
 
                 /* Check a template hasn't already been provided. */
                 for (mtt = currentSpec-&gt;mappedtypetemplates; mtt != NULL; mtt = mtt-&gt;next)
-                    if (sameScopedName(mtt-&gt;mt-&gt;type.u.td-&gt;fqname, $3.u.td-&gt;fqname) &amp;&amp; sameTemplateSignature(&amp;mtt-&gt;mt-&gt;type.u.td-&gt;types, &amp;$3.u.td-&gt;types, TRUE))
+                    if (compareScopedNames(mtt-&gt;mt-&gt;type.u.td-&gt;fqname, $3.u.td-&gt;fqname) == 0 &amp;&amp; sameTemplateSignature(&amp;mtt-&gt;mt-&gt;type.u.td-&gt;types, &amp;$3.u.td-&gt;types, TRUE))
                         yyerror(&quot;%MappedType template for this type has already been defined&quot;);
 
                 $3.nrderefs = 0;
@@ -569,7 +559,7 @@ mappedtypetmpl: template TK_MAPPEDTYPE basetype {
                 mtt = sipMalloc(sizeof (mappedTypeTmplDef));
 
                 mtt-&gt;sig = $1;
-                mtt-&gt;mt = allocMappedType(&amp;$3);
+                mtt-&gt;mt = allocMappedType(currentSpec, &amp;$3);
                 mtt-&gt;next = currentSpec-&gt;mappedtypetemplates;
 
                 currentSpec-&gt;mappedtypetemplates = mtt;
@@ -648,17 +638,8 @@ namespace:  TK_NAMESPACE TK_NAME {
                 {
                     classDef *ns = currentScope();
 
-                    if (!isUsedName(ns-&gt;iff-&gt;name))
-                    {
-                        varDef *vd;
-
-                        for (vd = currentSpec-&gt;vars; vd != NULL; vd = vd-&gt;next)
-                            if (vd-&gt;ecd == ns)
-                            {
-                                setIsUsedName(ns-&gt;iff-&gt;name);
-                                break;
-                            }
-                    }
+                    setIsUsedName(ns-&gt;iff-&gt;name);
+                    setIsUsedName(ns-&gt;pyname);
                 }
 
                 popScope();
@@ -811,7 +792,29 @@ license:    TK_LICENSE optflags {
         }
     ;
 
-consmodule: TK_CONSMODULE modname {
+defmetatype:TK_DEFMETATYPE dottedname {
+            if (notSkipping())
+            {
+                if (currentModule-&gt;defmetatype != NULL)
+                    yyerror(&quot;%DefaultMetatype has already been defined for this module&quot;);
+
+                currentModule-&gt;defmetatype = cacheName(currentSpec, $2);
+            }
+        }
+    ;
+
+defsupertype:   TK_DEFSUPERTYPE dottedname {
+            if (notSkipping())
+            {
+                if (currentModule-&gt;defsupertype != NULL)
+                    yyerror(&quot;%DefaultSupertype has already been defined for this module&quot;);
+
+                currentModule-&gt;defsupertype = cacheName(currentSpec, $2);
+            }
+        }
+    ;
+
+consmodule: TK_CONSMODULE dottedname {
             /* Make sure this is the first mention of a module. */
             if (currentSpec-&gt;module != currentModule)
                 yyerror(&quot;A %ConsolidatedModule cannot be %Imported&quot;);
@@ -819,12 +822,12 @@ consmodule: TK_CONSMODULE modname {
             if (currentModule-&gt;fullname != NULL)
                 yyerror(&quot;%ConsolidatedModule must appear before any %Module or %CModule directive&quot;);
 
-            setModuleName(currentModule, $2);
+            setModuleName(currentSpec, currentModule, $2);
             setIsConsolidated(currentModule);
         }
     ;
 
-compmodule: TK_COMPOMODULE modname {
+compmodule: TK_COMPOMODULE dottedname {
             /* Make sure this is the first mention of a module. */
             if (currentSpec-&gt;module != currentModule)
                 yyerror(&quot;A %CompositeModule cannot be %Imported&quot;);
@@ -832,18 +835,18 @@ compmodule: TK_COMPOMODULE modname {
             if (currentModule-&gt;fullname != NULL)
                 yyerror(&quot;%CompositeModule must appear before any %Module or %CModule directive&quot;);
 
-            setModuleName(currentModule, $2);
+            setModuleName(currentSpec, currentModule, $2);
             setIsComposite(currentModule);
         }
     ;
 
-module:     modlang modname optnumber {
+module:     modlang dottedname optnumber {
             /* Check the module hasn't already been defined. */
 
             moduleDef *mod;
 
             for (mod = currentSpec-&gt;modules; mod != NULL; mod = mod-&gt;next)
-                if (mod-&gt;fullname != NULL &amp;&amp; strcmp(mod-&gt;fullname, $2) == 0)
+                if (mod-&gt;fullname != NULL &amp;&amp; strcmp(mod-&gt;fullname-&gt;text, $2) == 0)
                     yyerror(&quot;Module is already defined&quot;);
 
             /*
@@ -860,7 +863,7 @@ module:     modlang modname optnumber {
                 currentModule = mod;
             }
 
-            setModuleName(currentModule, $2);
+            setModuleName(currentSpec, currentModule, $2);
             currentModule-&gt;version = $3;
 
             if (currentSpec-&gt;genc &lt; 0)
@@ -878,18 +881,18 @@ modlang:    TK_MODULE {
         }
     ;
 
-modname:    TK_NAME
+dottedname: TK_NAME
     |   TK_PATHNAME {
             /*
-             * The grammar design is a bit broken and this is the
-             * easiest way to allow periods in module names.
+             * The grammar design is a bit broken and this is the easiest way
+             * to allow periods in names.
              */
 
             char *cp;
 
             for (cp = $1; *cp != '\0'; ++cp)
                 if (*cp != '.' &amp;&amp; *cp != '_' &amp;&amp; !isalnum(*cp))
-                    yyerror(&quot;Invalid character in module name&quot;);
+                    yyerror(&quot;Invalid character in name&quot;);
 
             $$ = $1;
         }
@@ -1017,6 +1020,12 @@ preinitcode:    TK_PREINITCODE codeblock {
         }
     ;
 
+initcode:   TK_INITCODE codeblock {
+            if (notSkipping())
+                appendCodeBlock(&amp;currentModule-&gt;initcode, $2);
+        }
+    ;
+
 postinitcode:   TK_POSTINITCODE codeblock {
             if (notSkipping())
                 appendCodeBlock(&amp;currentModule-&gt;postinitcode, $2);
@@ -1835,7 +1844,7 @@ function:   cpptype TK_NAME '(' arglist ')' optconst optexceptions optabstract o
 
                     /* Check it doesn't already exist. */
                     for (al = scope-&gt;casts; al != NULL; al = al-&gt;next)
-                        if (sameScopedName($2.u.snd, al-&gt;arg.u.snd))
+                        if (compareScopedNames($2.u.snd, al-&gt;arg.u.snd) == 0)
                             yyerror(&quot;This operator cast has already been specified in this class&quot;);
 
                     al = sipMalloc(sizeof (argList));
@@ -1936,8 +1945,8 @@ flag:       TK_NAME {
         }
     ;
 
-flagvalue:  TK_NAME {
-            $$.ftype = name_flag;
+flagvalue:  dottedname {
+            $$.ftype = (strchr($1, '.') != NULL) ? dotted_name_flag : name_flag;
             $$.fvalue.sval = $1;
         }
     |   TK_STRING {
@@ -2572,22 +2581,22 @@ void parse(sipSpec *spec, FILE *fp, char *filename, stringList *tsl,
 
     /* Initialise the spec. */
  
-    spec -&gt; modules = NULL;
-    spec -&gt; namecache = NULL;
-    spec -&gt; ifacefiles = NULL;
-    spec -&gt; classes = NULL;
-    spec -&gt; classtemplates = NULL;
-    spec -&gt; exceptions = NULL;
-    spec -&gt; mappedtypes = NULL;
-    spec -&gt; mappedtypetemplates = NULL;
-    spec -&gt; enums = NULL;
-    spec -&gt; vars = NULL;
-    spec -&gt; typedefs = NULL;
-    spec -&gt; exphdrcode = NULL;
-    spec -&gt; docs = NULL;
-    spec -&gt; sigslots = FALSE;
-    spec -&gt; genc = -1;
-    spec -&gt; options = NULL;
+    spec-&gt;modules = NULL;
+    spec-&gt;namecache = NULL;
+    spec-&gt;ifacefiles = NULL;
+    spec-&gt;classes = NULL;
+    spec-&gt;classtemplates = NULL;
+    spec-&gt;exceptions = NULL;
+    spec-&gt;mappedtypes = NULL;
+    spec-&gt;mappedtypetemplates = NULL;
+    spec-&gt;enums = NULL;
+    spec-&gt;vars = NULL;
+    spec-&gt;typedefs = NULL;
+    spec-&gt;exphdrcode = NULL;
+    spec-&gt;docs = NULL;
+    spec-&gt;sigslots = FALSE;
+    spec-&gt;genc = -1;
+    spec-&gt;plugins = NULL;
 
     currentSpec = spec;
     neededQualifiers = tsl;
@@ -2604,7 +2613,7 @@ void parse(sipSpec *spec, FILE *fp, char *filename, stringList *tsl,
     sectionFlags = 0;
 
     newModule(fp, filename);
-    spec -&gt; module = currentModule;
+    spec-&gt;module = currentModule;
 
     yyparse();
 
@@ -2695,38 +2704,10 @@ static moduleDef *allocModule()
     moduleDef *newmod, **tailp;
 
     newmod = sipMalloc(sizeof (moduleDef));
-    newmod-&gt;fullname = NULL;
-    newmod-&gt;name = NULL;
+
     newmod-&gt;version = -1;
-    newmod-&gt;modflags = 0;
     newmod-&gt;qobjclass = -1;
-    newmod-&gt;othfuncs = NULL;
-    newmod-&gt;overs = NULL;
-    newmod-&gt;hdrcode = NULL;
-    newmod-&gt;cppcode = NULL;
-    newmod-&gt;copying = NULL;
-    newmod-&gt;preinitcode = NULL;
-    newmod-&gt;postinitcode = NULL;
-    newmod-&gt;unitcode = NULL;
-    newmod-&gt;file = NULL;
-    newmod-&gt;qualifiers = NULL;
-    newmod-&gt;root.cd = NULL;
-    newmod-&gt;root.child = NULL;
-    newmod-&gt;nrtimelines = 0;
-    newmod-&gt;nrclasses = 0;
-    newmod-&gt;nrexceptions = 0;
-    newmod-&gt;nrmappedtypes = 0;
-    newmod-&gt;nrenums = 0;
-    newmod-&gt;nrtypedefs = 0;
     newmod-&gt;nrvirthandlers = -1;
-    newmod-&gt;virthandlers = NULL;
-    newmod-&gt;license = NULL;
-    newmod-&gt;proxies = NULL;
-    newmod-&gt;container = NULL;
-    newmod-&gt;used = NULL;
-    newmod-&gt;allimports = NULL;
-    newmod-&gt;imports = NULL;
-    newmod-&gt;next = NULL;
 
     /*
      * The consolidated module support needs these to be in order that they
@@ -2769,7 +2750,7 @@ ifaceFileDef *findIfaceFile(sipSpec *pt, moduleDef *mod, scopedNameDef *fqname,
 
     for (iff = pt-&gt;ifacefiles; iff != NULL; iff = iff-&gt;next)
     {
-        if (!sameScopedName(iff-&gt;fqcname, fqname))
+        if (compareScopedNames(iff-&gt;fqcname, fqname) != 0)
             continue;
 
         /*
@@ -2832,7 +2813,7 @@ ifaceFileDef *findIfaceFile(sipSpec *pt, moduleDef *mod, scopedNameDef *fqname,
 
     iff = sipMalloc(sizeof (ifaceFileDef));
 
-    iff-&gt;name = cacheName(pt, scopedNameTail(fqname));
+    iff-&gt;name = cacheName(pt, scopedNameToString(fqname));
     iff-&gt;type = iftype;
     iff-&gt;fqcname = fqname;
     iff-&gt;module = NULL;
@@ -2871,37 +2852,8 @@ static classDef *findClassWithInterface(sipSpec *pt, ifaceFileDef *iff)
     cd = sipMalloc(sizeof (classDef));
 
     cd -&gt; iff = iff;
-    cd -&gt; pyname = classBaseName(cd);
+    cd -&gt; pyname = cacheName(pt, classBaseName(cd));
     cd -&gt; classnr = -1;
-    cd -&gt; classflags = 0;
-    cd -&gt; userflags = 0;
-    cd -&gt; ecd = NULL;
-    cd -&gt; dtorexceptions = NULL;
-    cd -&gt; real = NULL;
-    cd -&gt; node = NULL;
-    cd -&gt; supers = NULL;
-    cd -&gt; mro = NULL;
-    cd -&gt; td = NULL;
-    cd -&gt; ctors = NULL;
-    cd -&gt; defctor = NULL;
-    cd -&gt; dealloccode = NULL;
-    cd -&gt; dtorcode = NULL;
-    cd -&gt; members = NULL;
-    cd -&gt; overs = NULL;
-    cd -&gt; casts = NULL;
-    cd -&gt; vmembers = NULL;
-    cd -&gt; visible = NULL;
-    cd -&gt; cppcode = NULL;
-    cd -&gt; convtosubcode = NULL;
-    cd -&gt; subbase = NULL;
-    cd -&gt; convtocode = NULL;
-    cd -&gt; travcode = NULL;
-    cd -&gt; clearcode = NULL;
-    cd -&gt; readbufcode = NULL;
-    cd -&gt; writebufcode = NULL;
-    cd -&gt; segcountcode = NULL;
-    cd -&gt; charbufcode = NULL;
-    cd -&gt; picklecode = NULL;
     cd -&gt; next = pt -&gt; classes;
 
     pt -&gt; classes = cd;
@@ -3066,7 +3018,7 @@ static classDef *newClass(sipSpec *pt,ifaceFileType iftype,
             if (ns-&gt;iff-&gt;type != namespace_iface)
                 continue;
 
-            if (!sameScopedName(ns-&gt;iff-&gt;fqcname, fqname))
+            if (compareScopedNames(ns-&gt;iff-&gt;fqcname, fqname) != 0)
                 continue;
 
             cd-&gt;real = ns;
@@ -3089,15 +3041,21 @@ static void finishClass(sipSpec *pt, moduleDef *mod, classDef *cd, optFlags *of)
     /* Get the Python name and see if it is different to the C++ name. */
     pyname = getPythonName(of, classBaseName(cd));
 
-    cd -&gt; pyname = NULL;
+    cd-&gt;pyname = NULL;
     checkAttributes(pt, mod, cd-&gt;ecd, pyname, FALSE);
-    cd-&gt;pyname = pyname;
+    cd-&gt;pyname = cacheName(pt, pyname);
+
+    if ((flg = findOptFlag(of, &quot;Metatype&quot;, dotted_name_flag)) != NULL)
+        cd-&gt;metatype = cacheName(pt, flg-&gt;fvalue.sval);
+
+    if ((flg = findOptFlag(of, &quot;Supertype&quot;, dotted_name_flag)) != NULL)
+        cd-&gt;supertype = cacheName(pt, flg-&gt;fvalue.sval);
 
-    if ((flg = findOptFlag(of, &quot;TypeFlags&quot;, integer_flag)) != NULL)
-        cd-&gt;userflags = flg-&gt;fvalue.ival;
+    if ((flg = findOptFlag(of, &quot;PyQt4Flags&quot;, integer_flag)) != NULL)
+        cd-&gt;pyqt4_flags = flg-&gt;fvalue.ival;
 
-    if (findOptFlag(of, &quot;NoQMetaObject&quot;, bool_flag) != NULL)
-        setNoQMetaObject(cd);
+    if (findOptFlag(of, &quot;PyQt4NoQMetaObject&quot;, bool_flag) != NULL)
+        setPyQt4NoQMetaObject(cd);
 
     if (isOpaque(cd))
     {
@@ -3242,7 +3200,7 @@ static void finishClass(sipSpec *pt, moduleDef *mod, classDef *cd, optFlags *of)
     if (inMainModule())
     {
         setIsUsedName(cd-&gt;iff-&gt;name);
-        setIsClassName(cd-&gt;iff-&gt;name);
+        setIsUsedName(cd-&gt;pyname);
     }
 }
 
@@ -3277,9 +3235,6 @@ static mappedTypeDef *newMappedType(sipSpec *pt, argDef *ad, optFlags *of)
 
     iff = findIfaceFile(pt, currentModule, snd, mappedtype_iface, ad);
 
-    if (inMainModule())
-        setIsUsedName(iff-&gt;name);
-
     /* Check it hasn't already been defined. */
     for (mtd = pt-&gt;mappedtypes; mtd != NULL; mtd = mtd-&gt;next)
         if (mtd-&gt;iff == iff)
@@ -3296,7 +3251,7 @@ static mappedTypeDef *newMappedType(sipSpec *pt, argDef *ad, optFlags *of)
     iff-&gt;module = currentModule;
 
     /* Create a new mapped type. */
-    mtd = allocMappedType(ad);
+    mtd = allocMappedType(pt, ad);
 
     if (findOptFlag(of, &quot;NoRelease&quot;, bool_flag) != NULL)
         setNoRelease(mtd);
@@ -3306,6 +3261,9 @@ static mappedTypeDef *newMappedType(sipSpec *pt, argDef *ad, optFlags *of)
 
     pt-&gt;mappedtypes = mtd;
 
+    if (inMainModule())
+        setIsUsedName(mtd-&gt;cname);
+
     return mtd;
 }
 
@@ -3313,22 +3271,18 @@ static mappedTypeDef *newMappedType(sipSpec *pt, argDef *ad, optFlags *of)
 /*
  * Allocate, intialise and return a mapped type structure.
  */
-mappedTypeDef *allocMappedType(argDef *type)
+mappedTypeDef *allocMappedType(sipSpec *pt, argDef *type)
 {
     mappedTypeDef *mtd;
 
     mtd = sipMalloc(sizeof (mappedTypeDef));
 
-    mtd-&gt;mtflags = 0;
     mtd-&gt;type = *type;
     mtd-&gt;type.argflags = 0;
     mtd-&gt;type.nrderefs = 0;
 
+    mtd-&gt;cname = cacheName(pt, type2string(&amp;mtd-&gt;type));
     mtd-&gt;mappednr = -1;
-    mtd-&gt;iff = NULL;
-    mtd-&gt;convfromcode = NULL;
-    mtd-&gt;convtocode = NULL;
-    mtd-&gt;next = NULL;
 
     return mtd;
 }
@@ -3337,8 +3291,8 @@ mappedTypeDef *allocMappedType(argDef *type)
 /*
  * Create a new enum.
  */
-static enumDef *newEnum(sipSpec *pt,moduleDef *mod,char *name,optFlags *of,
-            int flags)
+static enumDef *newEnum(sipSpec *pt, moduleDef *mod, char *name, optFlags *of,
+        int flags)
 {
     enumDef *ed;
     classDef *escope = currentScope();
@@ -3347,15 +3301,23 @@ static enumDef *newEnum(sipSpec *pt,moduleDef *mod,char *name,optFlags *of,
 
     if (name != NULL)
     {
-        ed-&gt;fqcname = text2scopedName(escope, name);
         ed-&gt;pyname = cacheName(pt, getPythonName(of, name));
-
         checkAttributes(pt, mod, escope, ed-&gt;pyname-&gt;text, FALSE);
+
+        ed-&gt;fqcname = text2scopedName(escope, name);
+        ed-&gt;cname = cacheName(pt, scopedNameToString(ed-&gt;fqcname));
+
+        if (inMainModule())
+        {
+            setIsUsedName(ed-&gt;pyname);
+            setIsUsedName(ed-&gt;cname);
+        }
     }
     else
     {
-        ed-&gt;fqcname = NULL;
         ed-&gt;pyname = NULL;
+        ed-&gt;fqcname = NULL;
+        ed-&gt;cname = NULL;
     }
 
     ed -&gt; enumflags = flags;
@@ -3387,7 +3349,8 @@ void appendTypeStrings(scopedNameDef *ename, signatureDef *patt, signatureDef *s
 
         if (pad-&gt;atype == defined_type)
         {
-            char *nam = NULL;
+            char *nam = NULL, *val;
+            argDef *sad;
 
             /*
              * If the type names are already known then check that this is one
@@ -3419,8 +3382,18 @@ void appendTypeStrings(scopedNameDef *ename, signatureDef *patt, signatureDef *s
             /* Add the name. */
             appendScopedName(names, text2scopePart(nam));
 
-            /* Add the corresponding value. */
-            appendScopedName(values, text2scopePart(getType(ename, &amp;src-&gt;args[a])));
+            /*
+             * Add the corresponding value.  For defined types we don't want 
+             * any indirection or references.
+             */
+            sad = &amp;src-&gt;args[a];
+
+            if (sad-&gt;atype == defined_type)
+                val = scopedNameToString(sad-&gt;u.snd);
+            else
+                val = type2string(sad);
+
+            appendScopedName(values, text2scopePart(val));
         }
         else if (pad-&gt;atype == template_type)
         {
@@ -3435,72 +3408,141 @@ void appendTypeStrings(scopedNameDef *ename, signatureDef *patt, signatureDef *s
 
 
 /*
- * Convert a type to a string.  We impose some limitations because I'm too lazy
- * to handle everything that might be needed one day.
+ * Convert a type to a string on the heap.  The string will use the minimum
+ * whitespace while still remaining valid C++.
  */
-static char *getType(scopedNameDef *ename, argDef *ad)
+static char *type2string(argDef *ad)
 {
-    if (ad-&gt;atype == defined_type)
-        return scopedNameToString(ad-&gt;u.snd);
+    int i, on_heap = FALSE;
+    int nr_derefs = ad-&gt;nrderefs;
+    int is_reference = isReference(ad);
+    char *s;
+
+    /* Use the original type if possible. */
+    if (ad-&gt;original_type != NULL &amp;&amp; !noTypeName(ad-&gt;original_type))
+    {
+        s = scopedNameToString(ad-&gt;original_type-&gt;fqname);
+        on_heap = TRUE;
+
+        nr_derefs -= ad-&gt;original_type-&gt;type.nrderefs;
 
-    /* For the moment only handle non-pointer, non-reference base types. */
-    if (ad-&gt;nrderefs == 0 &amp;&amp; !isReference(ad))
+        if (isReference(&amp;ad-&gt;original_type-&gt;type))
+            is_reference = FALSE;
+    }
+    else
         switch (ad-&gt;atype)
         {
+        case template_type:
+            {
+                templateDef *td = ad-&gt;u.td;
+
+                s = scopedNameToString(td-&gt;fqname);
+                append(&amp;s, &quot;&lt;&quot;);
+
+                for (i = 0; i &lt; td-&gt;types.nrArgs; ++i)
+                {
+                    char *sub_type = type2string(&amp;td-&gt;types.args[i]);
+
+                    if (i &gt; 0)
+                        append(&amp;s, &quot;,&quot;);
+
+                    append(&amp;s, sub_type);
+                    free(sub_type);
+                }
+
+                if (s[strlen(s) - 1] == '&gt;')
+                    append(&amp;s, &quot; &gt;&quot;);
+                else
+                    append(&amp;s, &quot;&gt;&quot;);
+
+                on_heap = TRUE;
+                break;
+            }
+
+        case defined_type:
+            s = scopedNameToString(ad-&gt;u.snd);
+            on_heap = TRUE;
+            break;
+
         case ustring_type:
-            return &quot;unsigned char&quot;;
+            s = &quot;unsigned char&quot;;
+            break;
 
         case string_type:
-            return &quot;char&quot;;
+            s = &quot;char&quot;;
+            break;
 
         case sstring_type:
-            return &quot;signed char&quot;;
+            s = &quot;signed char&quot;;
+            break;
 
         case wstring_type:
-            return &quot;wchar_t&quot;;
+            s = &quot;wchar_t&quot;;
+            break;
 
         case ushort_type:
-            return &quot;unsigned short&quot;;
+            s = &quot;unsigned short&quot;;
+            break;
 
         case short_type:
-            return &quot;short&quot;;
+            s = &quot;short&quot;;
+            break;
 
         case uint_type:
-            return &quot;unsigned int&quot;;
+            s = &quot;unsigned int&quot;;
+            break;
 
         case int_type:
         case cint_type:
-            return &quot;int&quot;;
+            s = &quot;int&quot;;
+            break;
 
         case ulong_type:
-            return &quot;unsigned long&quot;;
+            s = &quot;unsigned long&quot;;
+            break;
 
         case long_type:
-            return &quot;long&quot;;
+            s = &quot;long&quot;;
+            break;
 
         case ulonglong_type:
-            return &quot;unsigned long long&quot;;
+            s = &quot;unsigned long long&quot;;
+            break;
 
         case longlong_type:
-            return &quot;long long&quot;;
+            s = &quot;long long&quot;;
+            break;
 
         case float_type:
         case cfloat_type:
-            return &quot;float&quot;;
+            s = &quot;float&quot;;
+            break;
 
         case double_type:
         case cdouble_type:
-            return &quot;double&quot;;
+            s = &quot;double&quot;;
+            break;
 
         case bool_type:
         case cbool_type:
-            return &quot;bool&quot;;
+            s = &quot;bool&quot;;
+            break;
+
+        default:
+            fatal(&quot;Unsupported type argument to type2string()\n&quot;);
         }
 
-    fatalScopedName(ename);
-    fatal(&quot;: unsupported type argument to template class instantiation\n&quot;);
+    /* Make sure the string is on the heap. */
+    if (!on_heap)
+        s = sipStrdup(s);
 
-    return NULL;
+    while (nr_derefs-- &gt; 0)
+        append(&amp;s, &quot;*&quot;);
+
+    if (is_reference)
+        append(&amp;s, &quot;&amp;&quot;);
+
+    return s;
 }
 
 
@@ -3579,7 +3621,7 @@ static void instantiateClassTemplate(sipSpec *pt, moduleDef *mod,
     *cd = *tcd-&gt;cd;
 
     resetIsTemplateClass(cd);
-    cd-&gt;pyname = scopedNameTail(fqname);
+    cd-&gt;pyname = cacheName(pt, scopedNameTail(fqname));
     cd-&gt;td = td;
 
     /* Handle the interface file. */
@@ -3599,7 +3641,7 @@ static void instantiateClassTemplate(sipSpec *pt, moduleDef *mod,
     if (inMainModule())
     {
         setIsUsedName(cd-&gt;iff-&gt;name);
-        setIsClassName(cd-&gt;iff-&gt;name);
+        setIsUsedName(cd-&gt;pyname);
     }
 
     cd-&gt;ecd = currentScope();
@@ -3811,10 +3853,19 @@ static void instantiateTemplateEnums(sipSpec *pt, classTmplDef *tcd,
             *ed = *ted;
 
             if (ed-&gt;fqcname != NULL)
+            {
                 ed-&gt;fqcname = text2scopedName(cd, scopedNameTail(ed-&gt;fqcname));
+                ed-&gt;cname = cacheName(pt, scopedNameToString(ed-&gt;fqcname));
+            }
 
-            if (ed-&gt;pyname != NULL &amp;&amp; inMainModule())
-                setIsUsedName(ed-&gt;pyname);
+            if (inMainModule())
+            {
+                if (ed-&gt;pyname != NULL)
+                    setIsUsedName(ed-&gt;pyname);
+
+                if (ed-&gt;cname != NULL)
+                    setIsUsedName(ed-&gt;cname);
+            }
 
             ed-&gt;ecd = cd;
             ed-&gt;module = mod;
@@ -3877,8 +3928,7 @@ static void instantiateTemplateVars(sipSpec *pt, classTmplDef *tcd,
             vd-&gt;getcode = templateCode(pt, used, vd-&gt;getcode, type_names, type_values);
             vd-&gt;setcode = templateCode(pt, used, vd-&gt;setcode, type_names, type_values);
 
-            vd-&gt;next = pt-&gt;vars;
-            pt-&gt;vars = vd;
+            addVariable(pt, vd);
         }
 }
 
@@ -4022,10 +4072,7 @@ codeBlock *templateCode(sipSpec *pt, ifaceFileList **used, codeBlock *ocb,
             else
             {
                 static char *gen_names[] = {
-                    &quot;sipForceConvertToTransfer_&quot;,
-                    &quot;sipForceConvertTo_&quot;,
-                    &quot;sipConvertFromTransfer_&quot;,
-                    &quot;sipConvertFrom_&quot;,
+                    &quot;sipType_&quot;,
                     &quot;sipClass_&quot;,
                     &quot;sipEnum_&quot;,
                     &quot;sipException_&quot;,
@@ -4176,7 +4223,7 @@ static int foundInScope(scopedNameDef *fq_name, scopedNameDef *rel_name)
         snd = copyScopedName(classFQCName(scope));
         appendScopedName(&amp;snd, copyScopedName(rel_name));
 
-        found = sameScopedName(fq_name, snd);
+        found = (compareScopedNames(fq_name, snd) == 0);
 
         freeScopedName(snd);
 
@@ -4184,7 +4231,7 @@ static int foundInScope(scopedNameDef *fq_name, scopedNameDef *rel_name)
             return TRUE;
     }
 
-    return sameScopedName(fq_name, rel_name);
+    return compareScopedNames(fq_name, rel_name) == 0;
 }
 
 
@@ -4194,7 +4241,7 @@ static int foundInScope(scopedNameDef *fq_name, scopedNameDef *rel_name)
 static void newTypedef(sipSpec *pt, moduleDef *mod, char *name, argDef *type,
         optFlags *optflgs)
 {
-    typedefDef *td;
+    typedefDef *td, **tdp;
     scopedNameDef *fqname;
     classDef *scope;
 
@@ -4218,14 +4265,24 @@ static void newTypedef(sipSpec *pt, moduleDef *mod, char *name, argDef *type,
             }
     }
 
-    /* Check it doesn't already exist. */
-    for (td = pt-&gt;typedefs; td != NULL; td = td-&gt;next)
-        if (sameScopedName(td-&gt;fqname, fqname))
+    /*
+     * Check it doesn't already exist and find the position in the sorted list
+     * where it should be put.
+     */
+    for (tdp = &amp;pt-&gt;typedefs; *tdp != NULL; tdp = &amp;(*tdp)-&gt;next)
+    {
+        int res = compareScopedNames((*tdp)-&gt;fqname, fqname);
+
+        if (res == 0)
         {
             fatalScopedName(fqname);
             fatal(&quot; already defined\n&quot;);
         }
 
+        if (res &gt; 0)
+            break;
+    }
+
     td = sipMalloc(sizeof (typedefDef));
 
     td-&gt;tdflags = 0;
@@ -4233,14 +4290,14 @@ static void newTypedef(sipSpec *pt, moduleDef *mod, char *name, argDef *type,
     td-&gt;ecd = scope;
     td-&gt;module = mod;
     td-&gt;type = *type;
-    td-&gt;next = pt-&gt;typedefs;
+
+    td-&gt;next = *tdp;
+    *tdp = td;
 
     if (findOptFlag(optflgs, &quot;NoTypeName&quot;, bool_flag) != NULL)
         setNoTypeName(td);
 
     mod-&gt;nrtypedefs++;
-
-    pt-&gt;typedefs = td;
 }
 
 
@@ -4341,12 +4398,11 @@ static void newVar(sipSpec *pt,moduleDef *mod,char *name,int isstatic,
     var -&gt; accessfunc = acode;
     var -&gt; getcode = gcode;
     var -&gt; setcode = scode;
-    var -&gt; next = pt -&gt; vars;
 
     if (isstatic || (escope != NULL &amp;&amp; escope-&gt;iff-&gt;type == namespace_iface))
         setIsStaticVar(var);
 
-    pt -&gt; vars = var;
+    addVariable(pt, var);
 }
 
 
@@ -4433,7 +4489,6 @@ static void newFunction(sipSpec *pt,moduleDef *mod,int sflags,int isstatic,
             signatureDef *cppsig)
 {
     classDef *cd = currentScope();
-    nameDef *pname;
     int factory, xferback, no_arg_parser;
     overDef *od, **odp, **headp;
     optFlag *of;
@@ -4550,7 +4605,7 @@ static void newFunction(sipSpec *pt,moduleDef *mod,int sflags,int isstatic,
 
     if (isvirt)
     {
-        if (isSignal(od) &amp;&amp; !optNoEmitters(pt))
+        if (isSignal(od) &amp;&amp; pluginPyQt3(pt))
             yyerror(&quot;Virtual signals aren't supported&quot;);
 
         setIsVirtual(od);
@@ -4669,26 +4724,32 @@ static const char *getPythonName(optFlags *optflgs, const char *cname)
 
 
 /*
- * Cache a name in a module.
+ * Cache a name in a module.  Entries in the cache are stored in order of
+ * decreasing length.
  */
 nameDef *cacheName(sipSpec *pt, const char *name)
 {
-    nameDef *nd;
+    nameDef *nd, **ndp = &amp;pt-&gt;namecache;
+    size_t len = strlen(name);
 
-    /* See if it already exists. */
-    for (nd = pt-&gt;namecache; nd != NULL; nd = nd-&gt;next)
-        if (strcmp(nd-&gt;text, name) == 0)
+    /* Skip entries that are too large. */
+    while (*ndp != NULL &amp;&amp; (*ndp)-&gt;len &gt; len)
+        ndp = &amp;(*ndp)-&gt;next;
+
+    /* Check entries that are the right length. */
+    for (nd = *ndp; nd != NULL &amp;&amp; nd-&gt;len == len; nd = nd-&gt;next)
+        if (memcmp(nd-&gt;text, name, len) == 0)
             return nd;
 
     /* Create a new one. */
     nd = sipMalloc(sizeof (nameDef));
 
     nd-&gt;nameflags = 0;
-    nd-&gt;module = currentSpec-&gt;module;
     nd-&gt;text = name;
-    nd-&gt;next = pt-&gt;namecache;
+    nd-&gt;len = len;
+    nd-&gt;next = *ndp;
 
-    pt-&gt;namecache = nd;
+    *ndp = nd;
 
     return nd;
 }
@@ -4701,7 +4762,7 @@ static memberDef *findFunction(sipSpec *pt, moduleDef *mod, classDef *cd,
         const char *pname, int hwcode, int nrargs, int no_arg_parser)
 {
     static struct slot_map {
-        char *name;         /* The slot name. */
+        const char *name;   /* The slot name. */
         slotType type;      /* The corresponding type. */
         int needs_hwcode;   /* Set if handwritten code is required. */
         int nrargs;         /* Nr. of arguments. */
@@ -4768,6 +4829,7 @@ static memberDef *findFunction(sipSpec *pt, moduleDef *mod, classDef *cd,
                 yyerror(&quot;This Python slot requires %MethodCode&quot;);
 
             if (sm-&gt;nrargs &gt;= 0)
+            {
                 if (cd == NULL)
                 {
                     /* Global operators need one extra argument. */
@@ -4776,6 +4838,7 @@ static memberDef *findFunction(sipSpec *pt, moduleDef *mod, classDef *cd,
                 }
                 else if (sm-&gt;nrargs != nrargs)
                     yyerror(&quot;Incorrect number of arguments to Python slot&quot;);
+            }
 
             st = sm-&gt;type;
 
@@ -4939,7 +5002,7 @@ static void checkAttributes(sipSpec *pt, moduleDef *mod, classDef *pyscope,
         if (cd -&gt; ecd != pyscope || cd -&gt; pyname == NULL)
             continue;
 
-        if (strcmp(cd-&gt;pyname, attr) == 0 &amp;&amp; !isExternal(cd))
+        if (strcmp(cd-&gt;pyname-&gt;text, attr) == 0 &amp;&amp; !isExternal(cd))
             yyerror(&quot;There is already a class or namespace in scope with the same Python name&quot;);
     }
 
@@ -5424,52 +5487,36 @@ static int getDeprecated(optFlags *optflgs)
 
 
 /*
- * Return TRUE if the QtNoEmitters option was specified.
- */
-int optNoEmitters(sipSpec *pt)
-{
-    return optFind(pt, &quot;QtNoEmitters&quot;);
-}
-
-
-/*
- * Return TRUE if the QtRegisterTypes option was specified.
+ * Return TRUE if the PyQt3 plugin was specified.
  */
-int optRegisterTypes(sipSpec *pt)
+int pluginPyQt3(sipSpec *pt)
 {
-    return optFind(pt, &quot;QtRegisterTypes&quot;);
+    return stringFind(pt-&gt;plugins, &quot;PyQt3&quot;);
 }
 
 
 /*
- * Return TRUE if the Qt4Q_OBJECT option was specified.
+ * Return TRUE if the PyQt4 plugin was specified.
  */
-int optQ_OBJECT4(sipSpec *pt)
+int pluginPyQt4(sipSpec *pt)
 {
-    return optFind(pt, &quot;Qt4Q_OBJECT&quot;);
+    return stringFind(pt-&gt;plugins, &quot;PyQt4&quot;);
 }
 
 
 /*
- * Return TRUE if the AssignmentHelpers option was specified.
+ * Return TRUE if a list of strings contains a given entry.
  */
-int optAssignmentHelpers(sipSpec *pt)
+static int stringFind(stringList *sl, const char *s)
 {
-    return optFind(pt, &quot;AssignmentHelpers&quot;);
-}
-
-
-/*
- * Return TRUE if a particular option was specified with %SIPOptions.
- */
-static int optFind(sipSpec *pt, const char *opt)
-{
-    stringList *sl;
-
-    for (sl = pt-&gt;options; sl != NULL; sl = sl-&gt;next)
-        if (strcmp(sl-&gt;s, opt) == 0)
+    while (sl != NULL)
+    {
+        if (strcmp(sl-&gt;s, s) == 0)
             return TRUE;
 
+        sl = sl-&gt;next;
+    }
+
     return FALSE;
 }
 
@@ -5477,9 +5524,12 @@ static int optFind(sipSpec *pt, const char *opt)
 /*
  * Set the name of a module.
  */
-static void setModuleName(moduleDef *mod, const char *fullname)
+static void setModuleName(sipSpec *pt, moduleDef *mod, const char *fullname)
 {
-    mod-&gt;fullname = fullname;
+    mod-&gt;fullname = cacheName(pt, fullname);
+
+    if (inMainModule())
+        setIsUsedName(mod-&gt;fullname);
 
     if ((mod-&gt;name = strrchr(fullname, '.')) != NULL)
         mod-&gt;name++;
@@ -5528,3 +5578,23 @@ static classDef *completeClass(scopedNameDef *snd, optFlags *of, int has_def)
 
     return cd;
 }
+
+
+/*
+ * Add a variable to the list so that the list remains sorted.
+ */
+static void addVariable(sipSpec *pt, varDef *vd)
+{
+    varDef **at = &amp;pt-&gt;vars;
+
+    while (*at != NULL)
+    {
+        if (strcmp(vd-&gt;pyname-&gt;text, (*at)-&gt;pyname-&gt;text) &lt; 0)
+            break;
+
+        at = &amp;(*at)-&gt;next;
+    }
+
+    vd-&gt;next = *at;
+    *at = vd;
+}</diff>
      <filename>sipgen/parser.y</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 /*
  * The main header file for SIP.
  *
- * Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+ * Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
  * 
  * This file is part of SIP.
  * 
@@ -39,7 +39,7 @@
 
 /* For convenience. */
 
-#define classBaseName(cd)   ((cd)-&gt;iff-&gt;name-&gt;text)
+#define classBaseName(cd)   scopedNameTail((cd)-&gt;iff-&gt;fqcname)
 #define classFQCName(cd)    ((cd)-&gt;iff-&gt;fqcname)
 
 
@@ -85,11 +85,10 @@
 #define CLASS_NO_DEFAULT_CTORS  0x00200000  /* Don't create default ctors. */
 #define CLASS_QOBJECT_SUB   0x00400000  /* It is derived from QObject. */
 #define CLASS_DTOR_HOLD_GIL 0x00800000  /* The dtor holds the GIL. */
-#define CLASS_QT_META_TYPE  0x01000000  /* Register as a Qt meta type. */
+#define CLASS_ASSIGN_HELPER 0x01000000  /* Generate an assignment helper. */
 #define CLASS_NO_QMETAOBJECT    0x02000000  /* It has no QMetaObject. */
-#define CLASS_CAN_ASSIGN    0x04000000  /* It has an assignment operator. */
-#define CLASS_IS_TEMPLATE   0x08000000  /* It is a template class. */
-#define CLASS_IS_DEPRECATED 0x10000000  /* It is deprecated. */
+#define CLASS_IS_TEMPLATE   0x04000000  /* It is a template class. */
+#define CLASS_IS_DEPRECATED 0x08000000  /* It is deprecated. */
 
 #define hasSigSlots(cd)     ((cd)-&gt;classflags &amp; CLASS_HAS_SIGSLOTS)
 #define setHasSigSlots(cd)  ((cd)-&gt;classflags |= CLASS_HAS_SIGSLOTS)
@@ -125,12 +124,10 @@
 #define setIsQObjectSubClass(cd)    ((cd)-&gt;classflags |= CLASS_QOBJECT_SUB)
 #define isHoldGILDtor(c)    ((cd)-&gt;classflags &amp; CLASS_DTOR_HOLD_GIL)
 #define setIsHoldGILDtor(c) ((cd)-&gt;classflags |= CLASS_DTOR_HOLD_GIL)
-#define registerQtMetaType(c)   ((cd)-&gt;classflags &amp; CLASS_QT_META_TYPE)
-#define setRegisterQtMetaType(c)    ((cd)-&gt;classflags |= CLASS_QT_META_TYPE)
-#define noQMetaObject(c)    ((cd)-&gt;classflags &amp; CLASS_NO_QMETAOBJECT)
-#define setNoQMetaObject(c) ((cd)-&gt;classflags |= CLASS_NO_QMETAOBJECT)
-#define canAssign(c)        ((cd)-&gt;classflags &amp; CLASS_CAN_ASSIGN)
-#define setCanAssign(c)     ((cd)-&gt;classflags |= CLASS_CAN_ASSIGN)
+#define assignmentHelper(c) ((cd)-&gt;classflags &amp; CLASS_ASSIGN_HELPER)
+#define setAssignmentHelper(c)      ((cd)-&gt;classflags |= CLASS_ASSIGN_HELPER)
+#define noPyQt4QMetaObject(c)       ((cd)-&gt;classflags &amp; CLASS_NO_QMETAOBJECT)
+#define setPyQt4NoQMetaObject(c)    ((cd)-&gt;classflags |= CLASS_NO_QMETAOBJECT)
 #define isTemplateClass(cd) ((cd)-&gt;classflags &amp; CLASS_IS_TEMPLATE)
 #define setIsTemplateClass(cd)  ((cd)-&gt;classflags |= CLASS_IS_TEMPLATE)
 #define resetIsTemplateClass(cd)    ((cd)-&gt;classflags &amp;= ~CLASS_IS_TEMPLATE)
@@ -307,7 +304,7 @@
 #define ARG_RESULT_SIZE     0x2000  /* It defines the result size. */
 
 #define isReference(a)      ((a)-&gt;argflags &amp; ARG_IS_REF)
-#define setIsReference(a)   ((a)-&gt; argflags |= ARG_IS_REF)
+#define setIsReference(a)   ((a)-&gt;argflags |= ARG_IS_REF)
 #define resetIsReference(a) ((a)-&gt;argflags &amp;= ~ARG_IS_REF)
 #define isConstArg(a)       ((a)-&gt;argflags &amp; ARG_IS_CONST)
 #define setIsConstArg(a)    ((a)-&gt;argflags |= ARG_IS_CONST)
@@ -341,14 +338,13 @@
 /* Handle name flags. */
 
 #define NAME_IS_USED        0x01    /* It is used in the main module. */
-#define NAME_IS_CLASS       0x02    /* It is the name of a class. */
+#define NAME_IS_SUBSTR      0x02    /* It is a substring of another. */
 
 #define isUsedName(n)       ((n)-&gt;nameflags &amp; NAME_IS_USED)
 #define setIsUsedName(n)    ((n)-&gt;nameflags |= NAME_IS_USED)
 #define resetIsUsedName(n)  ((n)-&gt;nameflags &amp;= ~NAME_IS_USED)
-#define isClassName(n)      ((n)-&gt;nameflags &amp; NAME_IS_CLASS)
-#define setIsClassName(n)   ((n)-&gt;nameflags |= NAME_IS_CLASS)
-#define resetIsClassName(n) ((n)-&gt;nameflags &amp;= ~NAME_IS_CLASS)
+#define isSubstring(n)      ((n)-&gt;nameflags &amp; NAME_IS_SUBSTR)
+#define setIsSubstring(n)   ((n)-&gt;nameflags |= NAME_IS_SUBSTR)
 
 
 /* Handle virtual handler flags. */
@@ -554,26 +550,13 @@ typedef struct _scopedNameDef {
 
 typedef struct _nameDef {
     int nameflags;                      /* The name flags. */
-    struct _moduleDef *module;          /* The main module. */
     const char *text;                   /* The text of the name. */
+    size_t len;                         /* The length of the name. */
+    size_t offset;                      /* The offset in the string pool. */
     struct _nameDef *next;              /* Next in the list. */
 } nameDef;
 
 
-/*
- * A node in the tree of classes used to determine the order in which the
- * classes need to be created.
- */
-
-typedef struct _nodeDef {
-    int ordered;                        /* Set if in order. */
-    struct _classDef *cd;               /* The class. */
-    struct _nodeDef *parent;            /* The parent. */
-    struct _nodeDef *child;             /* The first child. */
-    struct _nodeDef *next;              /* The next sibling. */
-} nodeDef;
-
-
 /* A literal code block. */
 
 typedef struct _codeBlock {
@@ -584,52 +567,6 @@ typedef struct _codeBlock {
 } codeBlock;
 
 
-/* A module definition. */
-
-typedef struct _moduleDef {
-    const char *fullname;               /* The full module name. */
-    const char *name;                   /* The module base name. */
-    int version;                        /* The module version. */
-    int modflags;                       /* The module flags. */
-    int qobjclass;                      /* QObject class, -1 if none. */
-    struct _memberDef *othfuncs;        /* List of other functions. */
-    struct _overDef *overs;             /* Global overloads. */
-    codeBlock *hdrcode;                 /* Header code. */
-    codeBlock *cppcode;                 /* Global C++ code. */
-    codeBlock *copying;                 /* Software license. */
-    codeBlock *preinitcode;             /* Pre-initialisation code. */
-    codeBlock *postinitcode;            /* Post-initialisation code. */
-    codeBlock *unitcode;                /* Compilation unit code. */
-    int parts;                          /* The number of parts generated. */
-    char *file;                         /* The filename. */
-    qualDef *qualifiers;                /* The list of qualifiers. */
-    nodeDef root;                       /* Root of class tree. */
-    int nrtimelines;                    /* The nr. of timelines. */
-    int nrclasses;                      /* The nr. of classes. */
-    int nrexceptions;                   /* The nr. of exceptions. */
-    int nrmappedtypes;                  /* The nr. of mapped types. */
-    int nrenums;                        /* The nr. of named enums. */
-    int nrtypedefs;                     /* The nr. of typedefs. */
-    int nrvirthandlers;                 /* The nr. of virtual handlers. */
-    struct _virtHandlerDef *virthandlers;   /* The virtual handlers. */
-    licenseDef *license;                /* The software license. */
-    struct _classDef *proxies;          /* The list of proxy classes. */
-    struct _moduleDef *container;       /* The container module, if any. */
-    struct _ifaceFileList *used;        /* Interface files used. */
-    struct _moduleListDef *allimports;  /* The list of all imports. */
-    struct _moduleListDef *imports;     /* The list of direct imports. */
-    struct _moduleDef *next;            /* Next in the list. */
-} moduleDef;
-
-
-/* An entry in a linked module list. */
-
-typedef struct _moduleListDef {
-    moduleDef *module;                  /* The module itself. */
-    struct _moduleListDef *next;        /* The next in the list. */
-} moduleListDef;
-
-
 /* The arguments to a throw specifier. */
 
 typedef struct _throwArgs {
@@ -708,6 +645,51 @@ typedef struct _fcallDef {
 } fcallDef;
 
 
+/* A module definition. */
+typedef struct _moduleDef {
+    nameDef *fullname;                  /* The full module name. */
+    const char *name;                   /* The module base name. */
+    int version;                        /* The module version. */
+    int modflags;                       /* The module flags. */
+    int qobjclass;                      /* QObject class, -1 if none. */
+    struct _memberDef *othfuncs;        /* List of other functions. */
+    struct _overDef *overs;             /* Global overloads. */
+    nameDef *defmetatype;               /* The optional default meta-type. */
+    nameDef *defsupertype;              /* The optional default super-type. */
+    codeBlock *hdrcode;                 /* Header code. */
+    codeBlock *cppcode;                 /* Global C++ code. */
+    codeBlock *copying;                 /* Software license. */
+    codeBlock *preinitcode;             /* Pre-initialisation code. */
+    codeBlock *initcode;                /* Initialisation code. */
+    codeBlock *postinitcode;            /* Post-initialisation code. */
+    codeBlock *unitcode;                /* Compilation unit code. */
+    int parts;                          /* The number of parts generated. */
+    char *file;                         /* The filename. */
+    qualDef *qualifiers;                /* The list of qualifiers. */
+    argDef *types;                      /* The array of numbered types. */
+    int nrtypes;                        /* The number of numbered types. */
+    int nrtimelines;                    /* The nr. of timelines. */
+    int nrexceptions;                   /* The nr. of exceptions. */
+    int nrtypedefs;                     /* The nr. of typedefs. */
+    int nrvirthandlers;                 /* The nr. of virtual handlers. */
+    struct _virtHandlerDef *virthandlers;   /* The virtual handlers. */
+    licenseDef *license;                /* The software license. */
+    struct _classDef *proxies;          /* The list of proxy classes. */
+    struct _moduleDef *container;       /* The container module, if any. */
+    struct _ifaceFileList *used;        /* Interface files used. */
+    struct _moduleListDef *allimports;  /* The list of all imports. */
+    struct _moduleListDef *imports;     /* The list of direct imports. */
+    struct _moduleDef *next;            /* Next in the list. */
+} moduleDef;
+
+
+/* An entry in a linked module list. */
+typedef struct _moduleListDef {
+    moduleDef *module;                  /* The module itself. */
+    struct _moduleListDef *next;        /* The next in the list. */
+} moduleListDef;
+
+
 /* An interface file definition. */
 
 typedef struct _ifaceFileDef {
@@ -734,6 +716,7 @@ typedef struct _ifaceFileList {
 typedef struct _mappedTypeDef {
     int mtflags;                        /* The mapped type flags. */
     argDef type;                        /* The type being mapped. */
+    nameDef *cname;                     /* The C/C++ name. */
     int mappednr;                       /* The mapped type number. */
     ifaceFileDef *iff;                  /* The interface file. */
     codeBlock *convfromcode;            /* Convert from C++ code. */
@@ -853,9 +836,11 @@ typedef struct _enumMemberDef {
 
 typedef struct _enumDef {
     int enumflags;                      /* The enum flags. */
-    scopedNameDef *fqcname;             /* The name (may be NULL). */
     nameDef *pyname;                    /* The Python name (may be NULL). */
+    scopedNameDef *fqcname;             /* The C/C++ name (may be NULL). */
+    nameDef *cname;                     /* The C/C++ name (may be NULL). */
     int enumnr;                         /* The enum number. */
+    int enum_idx;                       /* The enum index within the module. */
     struct _classDef *ecd;              /* The enclosing class. */
     moduleDef *module;                  /* The owning module. */
     enumMemberDef *members;             /* The list of members. */
@@ -915,15 +900,16 @@ typedef struct _mroDef {
 
 typedef struct _classDef {
     int classflags;                     /* The class flags. */
-    int userflags;                      /* The user type flags. */
+    int pyqt4_flags;                    /* The PyQt4 specific flags. */
     int classnr;                        /* The class number. */
-    const char *pyname;                 /* The Python name. */
+    nameDef *pyname;                    /* The Python name. */
     ifaceFileDef *iff;                  /* The interface file. */
     struct _classDef *ecd;              /* The enclosing scope. */
     struct _classDef *real;             /* The real class if this is a proxy or extender. */
-    nodeDef *node;                      /* Position in class tree. */
     classList *supers;                  /* The parent classes. */
     mroDef *mro;                        /* The super-class hierarchy. */
+    nameDef *metatype;                  /* The meta-type. */
+    nameDef *supertype;                 /* The super-type. */
     templateDef *td;                    /* The instantiated template. */
     ctorDef *ctors;                     /* The constructors. */
     ctorDef *defctor;                   /* The default ctor. */
@@ -987,7 +973,7 @@ typedef struct {
     codeBlock *docs;                    /* Documentation. */
     int sigslots;                       /* Set if signals or slots are used. */
     int genc;                           /* Set if we are generating C code. */
-    struct _stringList *options;        /* The list of options. */
+    struct _stringList *plugins;        /* The list of plugins. */
 } sipSpec;
 
 
@@ -1024,7 +1010,8 @@ void warning(char *,...);
 void fatal(char *,...);
 void fatalScopedName(scopedNameDef *);
 int setInputFile(FILE *open_fp, parserContext *pc, int optional);
-void *sipMalloc(size_t);
+void *sipMalloc(size_t n);
+void *sipCalloc(size_t nr, size_t n);
 char *sipStrdup(const char *);
 char *concat(const char *, ...);
 void append(char **, const char *);
@@ -1033,7 +1020,7 @@ int excludedFeature(stringList *,qualDef *);
 int sameSignature(signatureDef *,signatureDef *,int);
 int sameTemplateSignature(signatureDef *tmpl_sd, signatureDef *args_sd,
         int deep);
-int sameScopedName(scopedNameDef *,scopedNameDef *);
+int compareScopedNames(scopedNameDef *snd1, scopedNameDef *snd2);
 int sameBaseType(argDef *,argDef *);
 char *scopedNameTail(scopedNameDef *);
 scopedNameDef *text2scopePart(char *);
@@ -1044,7 +1031,6 @@ void appendToClassList(classList **,classDef *);
 void appendCodeBlock(codeBlock **headp, codeBlock *new);
 void prcode(FILE *fp, const char *fmt, ...);
 void prOverloadName(FILE *fp, overDef *od);
-void prScopedPythonName(FILE *fp, classDef *scope, const char *pyname);
 void prOverloadDecl(FILE *fp, classDef *context, overDef *od, int defval);
 void searchTypedefs(sipSpec *pt, scopedNameDef *snd, argDef *ad);
 int isIntReturnSlot(memberDef *md);
@@ -1052,15 +1038,13 @@ int isLongReturnSlot(memberDef *md);
 int isVoidReturnSlot(memberDef *md);
 int isNumberSlot(memberDef *md);
 int isRichCompareSlot(memberDef *md);
-mappedTypeDef *allocMappedType(argDef *type);
+mappedTypeDef *allocMappedType(sipSpec *pt, argDef *type);
 void appendString(stringList **headp, const char *s);
 void appendTypeStrings(scopedNameDef *ename, signatureDef *patt, signatureDef *src, signatureDef *known, scopedNameDef **names, scopedNameDef **values);
 codeBlock *templateCode(sipSpec *pt, ifaceFileList **used, codeBlock *ocb, scopedNameDef *names, scopedNameDef *values);
 ifaceFileDef *findIfaceFile(sipSpec *pt, moduleDef *mod, scopedNameDef *fqname, ifaceFileType iftype, argDef *ad);
-int optNoEmitters(sipSpec *pt);
-int optRegisterTypes(sipSpec *pt);
-int optQ_OBJECT4(sipSpec *pt);
-int optAssignmentHelpers(sipSpec *pt);
+int pluginPyQt3(sipSpec *pt);
+int pluginPyQt4(sipSpec *pt);
 void yywarning(char *);
 nameDef *cacheName(sipSpec *pt, const char *name);
 
@@ -1076,6 +1060,7 @@ typedef enum {
     string_flag,
     name_flag,
     opt_name_flag,
+    dotted_name_flag,
     integer_flag
 } flagType;
 </diff>
      <filename>sipgen/sip.h</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 # This is the build file for the code generator.
 #
-# Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+# Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
 # 
 # This file is part of SIP.
 # </diff>
      <filename>sipgen/sipgen.sbf</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 /*
  * The parse tree transformation module for SIP.
  *
- * Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+ * Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
  * 
  * This file is part of SIP.
  * 
@@ -32,10 +32,8 @@ static void addUniqueModule(moduleDef *mod, moduleDef *imp);
 static void ensureInput(classDef *,overDef *,argDef *);
 static void defaultInput(argDef *);
 static void defaultOutput(argDef *ad);
-static void assignClassNrs(sipSpec *,moduleDef *,nodeDef *);
-static void assignEnumNrs(sipSpec *pt);
-static void positionClass(classDef *);
-static void addNodeToParent(nodeDef *,classDef *);
+static void createSortedNumberedTypesTable(sipSpec *pt, moduleDef *mod);
+static int compareTypes(const void *t1, const void *t2);
 static void addAutoOverload(sipSpec *,classDef *,overDef *);
 static void ifaceFileIsUsed(ifaceFileList **used, argDef *ad);
 static void ifaceFilesAreUsedByOverload(ifaceFileList **used, overDef *od);
@@ -63,7 +61,6 @@ static void fatalNoDefinedType(scopedNameDef *);
 static void getBaseType(sipSpec *,moduleDef *,classDef *,argDef *);
 static void searchScope(sipSpec *,classDef *,scopedNameDef *,argDef *);
 static void searchMappedTypes(sipSpec *,scopedNameDef *,argDef *);
-void searchTypedefs(sipSpec *pt, scopedNameDef *snd, argDef *ad);
 static void searchEnums(sipSpec *,scopedNameDef *,argDef *);
 static void searchClasses(sipSpec *,moduleDef *mod,scopedNameDef *,argDef *);
 static void appendToMRO(mroDef *,mroDef ***,classDef *);
@@ -81,6 +78,7 @@ static void addComplementarySlots(sipSpec *pt, classDef *cd);
 static void addComplementarySlot(sipSpec *pt, classDef *cd, memberDef *md,
         slotType cslot, const char *cslot_name);
 static void resolveInstantiatedClassTemplate(sipSpec *pt, argDef *type);
+static void setStringPoolOffsets(sipSpec *pt);
 
 
 /*
@@ -93,14 +91,13 @@ void transform(sipSpec *pt)
     classDef *cd, *rev, **tail;
     classList *newl;
     overDef *od;
-    mappedTypeDef *mtd;
 
     /*
-     * The class list has the main module's classes at the front and the
-     * ones from the module at the most nested %Import at the end.  This
-     * affects some of the following algorithms, eg. when assigning class
-     * numbers.  We have to have consistency whenever a module is used.  To
-     * achieve this we reverse the order of the classes.
+     * The class list has the main module's classes at the front and the ones
+     * from the module at the most nested %Import at the end.  This affects
+     * some of the following algorithms, eg. when assigning class numbers.  We
+     * have to have consistency whenever a module is used.  To achieve this we
+     * reverse the order of the classes.
      */
     rev = NULL;
     cd = pt -&gt; classes;
@@ -136,6 +133,52 @@ void transform(sipSpec *pt)
         setAllImports(mod);
     }
 
+    /*
+     * Set the default meta-type for the main module if it doesn't have one
+     * explicitly set.
+     */
+    if (pt-&gt;module-&gt;defmetatype == NULL)
+    {
+        moduleListDef *mld;
+
+        for (mld = pt-&gt;module-&gt;allimports; mld != NULL; mld = mld-&gt;next)
+        {
+            if (mld-&gt;module-&gt;defmetatype == NULL)
+                continue;
+
+            if (pt-&gt;module-&gt;defmetatype == NULL)
+                pt-&gt;module-&gt;defmetatype = mld-&gt;module-&gt;defmetatype;
+            else if (pt-&gt;module-&gt;defmetatype != mld-&gt;module-&gt;defmetatype)
+                fatal(&quot;The %s module has imported different default meta-types %s and %s\n&quot;,
+                        pt-&gt;module-&gt;fullname-&gt;text,
+                        pt-&gt;module-&gt;defmetatype-&gt;text,
+                        mld-&gt;module-&gt;defmetatype-&gt;text);
+        }
+    }
+
+    /*
+     * Set the default super-type for the main module if it doesn't have one
+     * explicitly set.
+     */
+    if (pt-&gt;module-&gt;defsupertype == NULL)
+    {
+        moduleListDef *mld;
+
+        for (mld = pt-&gt;module-&gt;allimports; mld != NULL; mld = mld-&gt;next)
+        {
+            if (mld-&gt;module-&gt;defsupertype == NULL)
+                continue;
+
+            if (pt-&gt;module-&gt;defsupertype == NULL)
+                pt-&gt;module-&gt;defsupertype = mld-&gt;module-&gt;defsupertype;
+            else if (pt-&gt;module-&gt;defsupertype != mld-&gt;module-&gt;defsupertype)
+                fatal(&quot;The %s module has imported different default super-types %s and %s\n&quot;,
+                        pt-&gt;module-&gt;fullname-&gt;text,
+                        pt-&gt;module-&gt;defsupertype-&gt;text,
+                        mld-&gt;module-&gt;defsupertype-&gt;text);
+        }
+    }
+
     /* Check each class has been defined. */
     for (cd = pt -&gt; classes; cd != NULL; cd = cd -&gt; next)
         if (cd -&gt; iff -&gt; module == NULL)
@@ -199,22 +242,9 @@ void transform(sipSpec *pt)
             if (!noDefaultCtors(cd) &amp;&amp; !isOpaque(cd) &amp;&amp; cd-&gt;iff-&gt;type != namespace_iface)
                 addDefaultCopyCtor(cd);
 
-    /*
-     * Go through each class and add it to it's defining module's tree of
-     * classes.  The tree reflects the namespace hierarchy.
-     */
-    for (cd = pt-&gt;classes; cd != NULL; cd = cd-&gt;next)
-        addNodeToParent(&amp;cd-&gt;iff-&gt;module-&gt;root, cd);
-
-    for (cd = pt -&gt; classes; cd != NULL; cd = cd -&gt; next)
-        positionClass(cd);
-
-    /* Assign module specific class numbers for all modules. */
+    /* Create the array of numbered types sorted by type name. */
     for (mod = pt-&gt;modules; mod != NULL; mod = mod-&gt;next)
-        assignClassNrs(pt, mod, &amp;mod-&gt;root);
-
-    /* Assign module specific enum numbers for all enums. */
-    assignEnumNrs(pt);
+        createSortedNumberedTypesTable(pt, mod);
 
     /* Add any automatically generated methods. */
     for (cd = pt -&gt; classes; cd != NULL; cd = cd -&gt; next)
@@ -222,10 +252,6 @@ void transform(sipSpec *pt)
             if (isAutoGen(od))
                 addAutoOverload(pt,cd,od);
 
-    /* Allocate mapped types numbers. */
-    for (mtd = pt -&gt; mappedtypes; mtd != NULL; mtd = mtd -&gt; next)
-        mtd -&gt; mappednr = mtd -&gt; iff -&gt; module -&gt; nrmappedtypes++;
-
     /*
      * Move casts and slots around to their correct classes (if in the same
      * module) or create proxies for them (if cross-module).
@@ -282,10 +308,57 @@ void transform(sipSpec *pt)
     }
 
     /* Mark classes that should be registered as Qt meta types. */
-    if (optRegisterTypes(pt))
+    if (pluginPyQt4(pt))
         for (cd = pt-&gt;classes; cd != NULL; cd = cd-&gt;next)
             if (generatingCodeForModule(pt, cd-&gt;iff-&gt;module))
                 registerMetaType(cd);
+
+    setStringPoolOffsets(pt);
+}
+
+
+/*
+ * Set the offset into the string pool for every used name.
+ */
+static void setStringPoolOffsets(sipSpec *pt)
+{
+    nameDef *nd;
+    size_t offset = 0;
+
+    for (nd = pt-&gt;namecache; nd != NULL; nd = nd-&gt;next)
+    {
+        size_t len;
+        nameDef *prev;
+
+        if (!isUsedName(nd))
+            continue;
+
+        /* See if the tail of a previous used name could be used instead. */
+        len = nd-&gt;len;
+
+        for (prev = pt-&gt;namecache; prev-&gt;len &gt; len; prev = prev-&gt;next)
+        {
+            size_t pos;
+
+            if (!isUsedName(prev) || isSubstring(prev))
+                continue;
+
+            pos = prev-&gt;len - len;
+
+            if (memcmp(&amp;prev-&gt;text[pos], nd-&gt;text, len) == 0)
+            {
+                setIsSubstring(nd);
+                nd-&gt;offset = prev-&gt;offset + pos;
+                break;
+            }
+        }
+
+        if (!isSubstring(nd))
+        {
+            nd-&gt;offset = offset;
+            offset += len + 1;
+        }
+    }
 }
 
 
@@ -429,7 +502,7 @@ static void registerMetaType(classDef *cd)
 
     if (pub_def_ctor &amp;&amp; pub_copy_ctor)
     {
-        setRegisterQtMetaType(cd);
+        setAssignmentHelper(cd);
         addToUsedList(&amp;cd-&gt;iff-&gt;module-&gt;used, cd-&gt;iff);
     }
 }
@@ -771,38 +844,13 @@ static classDef *getProxy(moduleDef *mod, classDef *cd)
 
     pcd = sipMalloc(sizeof (classDef));
 
-    pcd-&gt;classflags = 0;
-    pcd-&gt;userflags = 0;
     pcd-&gt;classnr = -1;
     pcd-&gt;pyname = cd-&gt;pyname;
     pcd-&gt;iff = cd-&gt;iff;
     pcd-&gt;ecd = cd-&gt;ecd;
     pcd-&gt;real = cd;
-    pcd-&gt;node = NULL;
     pcd-&gt;supers = cd-&gt;supers;
     pcd-&gt;mro = cd-&gt;mro;
-    pcd-&gt;td = NULL;
-    pcd-&gt;ctors = NULL;
-    pcd-&gt;defctor = NULL;
-    pcd-&gt;dealloccode = NULL;
-    pcd-&gt;dtorcode = NULL;
-    pcd-&gt;dtorexceptions = NULL;
-    pcd-&gt;members = NULL;
-    pcd-&gt;overs = NULL;
-    pcd-&gt;casts = NULL;
-    pcd-&gt;vmembers = NULL;
-    pcd-&gt;visible = NULL;
-    pcd-&gt;cppcode = NULL;
-    pcd-&gt;convtosubcode = NULL;
-    pcd-&gt;subbase = NULL;
-    pcd-&gt;convtocode = NULL;
-    pcd-&gt;travcode = NULL;
-    pcd-&gt;clearcode = NULL;
-    pcd-&gt;readbufcode = NULL;
-    pcd-&gt;writebufcode = NULL;
-    pcd-&gt;segcountcode = NULL;
-    pcd-&gt;charbufcode = NULL;
-    pcd-&gt;picklecode = NULL;
     pcd-&gt;next = mod-&gt;proxies;
 
     mod-&gt;proxies = pcd;
@@ -1000,13 +1048,13 @@ static void addAutoOverload(sipSpec *pt,classDef *autocd,overDef *autood)
 /*
  * Set the complete hierarchy for a class.
  */
-static void setHierarchy(sipSpec *pt,classDef *base,classDef *cd,
-             classList **head)
+static void setHierarchy(sipSpec *pt, classDef *base, classDef *cd,
+        classList **head)
 {
-    mroDef **tailp = &amp;cd -&gt; mro;
+    mroDef **tailp = &amp;cd-&gt;mro;
 
     /* See if it has already been done. */
-    if (cd -&gt; mro != NULL)
+    if (cd-&gt;mro != NULL)
         return;
 
     if (cd-&gt;ecd != NULL)
@@ -1017,30 +1065,28 @@ static void setHierarchy(sipSpec *pt,classDef *base,classDef *cd,
             setIsDeprecatedClass(cd);
     }
 
-    if (cd -&gt; iff -&gt; type == class_iface)
+    if (cd-&gt;iff-&gt;type == class_iface)
     {
         classList *cl;
 
         /* The first thing is itself. */
-        appendToMRO(cd -&gt; mro,&amp;tailp,cd);
+        appendToMRO(cd-&gt;mro, &amp;tailp, cd);
 
         if (cd-&gt;convtosubcode != NULL)
             cd-&gt;subbase = cd;
 
         /* Now do it's superclasses. */
-        for (cl = cd -&gt; supers; cl != NULL; cl = cl -&gt; next)
+        for (cl = cd-&gt;supers; cl != NULL; cl = cl-&gt;next)
         {
             mroDef *mro;
 
-            /*
-             * Make sure the super-class's hierarchy has been done.
-             */
-            setHierarchy(pt,base,cl -&gt; cd,head);
+            /* Make sure the super-class's hierarchy has been done. */
+            setHierarchy(pt, base, cl-&gt;cd, head);
 
             /* Append the super-classes hierarchy. */
-            for (mro = cl -&gt; cd -&gt; mro; mro != NULL; mro = mro -&gt; next)
+            for (mro = cl-&gt;cd-&gt;mro; mro != NULL; mro = mro-&gt;next)
             {
-                appendToMRO(cd -&gt; mro,&amp;tailp,mro -&gt; cd);
+                appendToMRO(cd-&gt;mro, &amp;tailp, mro-&gt;cd);
 
                 if (isDeprecatedClass(mro-&gt;cd))
                     setIsDeprecatedClass(cd);
@@ -1067,6 +1113,29 @@ static void setHierarchy(sipSpec *pt,classDef *base,classDef *cd,
                     cd-&gt;subbase = mro-&gt;cd-&gt;subbase;
             }
         }
+
+        /*
+         * If the class doesn't have an explicit meta-type then inherit from
+         * the module's default.
+         */
+        if (cd-&gt;metatype == NULL &amp;&amp; cd-&gt;supers == NULL)
+            cd-&gt;metatype = cd-&gt;iff-&gt;module-&gt;defmetatype;
+
+        if (cd-&gt;metatype != NULL &amp;&amp; generatingCodeForModule(pt, cd-&gt;iff-&gt;module))
+            setIsUsedName(cd-&gt;metatype);
+
+        /*
+         * If the class doesn't have an explicit super-type then inherit from
+         * the module's default.
+         */
+        if (cd-&gt;supertype == NULL &amp;&amp; cd-&gt;supers == NULL)
+            cd-&gt;supertype = cd-&gt;iff-&gt;module-&gt;defsupertype;
+
+        if (cd-&gt;supertype != NULL &amp;&amp; strcmp(cd-&gt;supertype-&gt;text, &quot;sip.wrapper&quot;) == 0)
+            cd-&gt;supertype = NULL;
+
+        if (cd-&gt;supertype != NULL &amp;&amp; generatingCodeForModule(pt, cd-&gt;iff-&gt;module))
+            setIsUsedName(cd-&gt;supertype);
     }
 
     /*
@@ -1297,10 +1366,6 @@ static void addDefaultCopyCtor(classDef *cd)
  
         *tailp = copyct;
     }
-
-    /* We assume it has an assignment operator if it has a public copy ctor. */
-    if (isPublicCtor(copyct))
-        setCanAssign(cd);
 }
 
 
@@ -1416,7 +1481,7 @@ static void getVisibleMembers(sipSpec *pt, classDef *cd)
                         if (!generatingCodeForModule(pt, cd-&gt;iff-&gt;module))
                             continue;
 
-                        if (isProtected(od) || (isSignal(od) &amp;&amp; !optNoEmitters(pt)))
+                        if (isProtected(od) || (isSignal(od) &amp;&amp; pluginPyQt3(pt)))
                             setIsUsedName(md-&gt;pyname);
                     }
             }
@@ -2262,31 +2327,31 @@ int sameBaseType(argDef *a1, argDef *a2)
          * name.  Hopefully this won't have wider side effects.
          */
         if (a1-&gt;atype == class_type &amp;&amp; a2-&gt;atype == defined_type)
-            return sameScopedName(a1-&gt;u.cd-&gt;iff-&gt;fqcname, a2-&gt;u.snd);
+            return compareScopedNames(a1-&gt;u.cd-&gt;iff-&gt;fqcname, a2-&gt;u.snd) == 0;
 
         if (a1-&gt;atype == defined_type &amp;&amp; a2-&gt;atype == class_type)
-            return sameScopedName(a1-&gt;u.snd, a2-&gt;u.cd-&gt;iff-&gt;fqcname);
+            return compareScopedNames(a1-&gt;u.snd, a2-&gt;u.cd-&gt;iff-&gt;fqcname) == 0;
 
         return FALSE;
     }
 
-    switch (a1 -&gt; atype)
+    switch (a1-&gt;atype)
     {
     case class_type:
-        if (a1 -&gt; u.cd != a2 -&gt; u.cd)
+        if (a1-&gt;u.cd != a2-&gt;u.cd)
             return FALSE;
 
         break;
 
     case enum_type:
-        if (a1 -&gt; u.ed != a2 -&gt; u.ed)
+        if (a1-&gt;u.ed != a2-&gt;u.ed)
             return FALSE;
 
         break;
 
     case slotcon_type:
     case slotdis_type:
-        if (!sameSignature(a1 -&gt; u.sa,a2 -&gt; u.sa,TRUE))
+        if (!sameSignature(a1-&gt;u.sa, a2-&gt;u.sa, TRUE))
             return FALSE;
 
         break;
@@ -2296,41 +2361,40 @@ int sameBaseType(argDef *a1, argDef *a2)
             int a;
             templateDef *td1, *td2;
 
-            td1 = a1 -&gt; u.td;
-            td2 = a2 -&gt; u.td;
+            td1 = a1-&gt;u.td;
+            td2 = a2-&gt;u.td;
 
-            if (!sameScopedName(td1 -&gt; fqname,td2 -&gt; fqname) != 0 ||
-                td1 -&gt; types.nrArgs != td2 -&gt; types.nrArgs)
+            if (compareScopedNames(td1-&gt;fqname, td2-&gt;fqname) != 0 ||
+                td1-&gt;types.nrArgs != td2-&gt;types.nrArgs)
                 return FALSE;
 
-            for (a = 0; a &lt; td1 -&gt; types.nrArgs; ++a)
-                if (!sameBaseType(&amp;td1 -&gt; types.args[a],&amp;td2 -&gt; types.args[a]))
+            for (a = 0; a &lt; td1-&gt;types.nrArgs; ++a)
+                if (!sameBaseType(&amp;td1-&gt;types.args[a], &amp;td2-&gt;types.args[a]))
                     return FALSE;
 
             break;
         }
 
     case struct_type:
-        if (!sameScopedName(a1 -&gt; u.sname,a2 -&gt; u.sname) != 0)
+        if (compareScopedNames(a1-&gt;u.sname, a2-&gt;u.sname) != 0)
             return FALSE;
 
         break;
 
     case defined_type:
-        if (!sameScopedName(a1 -&gt; u.snd,a2 -&gt; u.snd))
+        if (compareScopedNames(a1-&gt;u.snd, a2-&gt;u.snd) != 0)
             return FALSE;
 
         break;
 
     case mapped_type:
-        if (a1 -&gt; u.mtd != a2 -&gt; u.mtd)
+        if (a1-&gt;u.mtd != a2-&gt;u.mtd)
             return FALSE;
 
         break;
     }
 
     /* Must be the same if we've got this far. */
-
     return TRUE;
 }
 
@@ -2381,18 +2445,25 @@ static int nextSignificantArg(signatureDef *sd, int a)
 
 
 /*
- * Return TRUE if two scoped names are the same.
+ * The equivalent of strcmp() for scoped names.
  */
-
-int sameScopedName(scopedNameDef *snd1,scopedNameDef *snd2)
+int compareScopedNames(scopedNameDef *snd1, scopedNameDef *snd2)
 {
-    while (snd1 != NULL &amp;&amp; snd2 != NULL &amp;&amp; strcmp(snd1 -&gt; name,snd2 -&gt; name) == 0)
+    while (snd1 != NULL &amp;&amp; snd2 != NULL)
     {
-        snd1 = snd1 -&gt; next;
-        snd2 = snd2 -&gt; next;
+        int res = strcmp(snd1-&gt;name, snd2-&gt;name);
+
+        if (res != 0)
+            return res;
+
+        snd1 = snd1-&gt;next;
+        snd2 = snd2-&gt;next;
     }
 
-    return (snd1 == NULL &amp;&amp; snd2 == NULL);
+    if (snd1 == NULL)
+        return (snd2 == NULL ? 0 : -1);
+
+    return 1;
 }
 
 
@@ -2562,7 +2633,7 @@ static void getBaseType(sipSpec *pt, moduleDef *mod, classDef *defscope, argDef
             mappedTypeTmplDef *mtt;
 
             for (mtt = pt-&gt;mappedtypetemplates; mtt != NULL; mtt = mtt-&gt;next)
-                if (sameScopedName(type-&gt;u.td-&gt;fqname, mtt-&gt;mt-&gt;type.u.td-&gt;fqname) &amp;&amp; sameTemplateSignature(&amp;mtt-&gt;mt-&gt;type.u.td-&gt;types, &amp;type-&gt;u.td-&gt;types, TRUE))
+                if (compareScopedNames(type-&gt;u.td-&gt;fqname, mtt-&gt;mt-&gt;type.u.td-&gt;fqname) == 0 &amp;&amp; sameTemplateSignature(&amp;mtt-&gt;mt-&gt;type.u.td-&gt;types, &amp;type-&gt;u.td-&gt;types, TRUE))
                 {
                     type-&gt;u.mtd = instantiateMappedTypeTemplate(pt, mod, mtt, type);
                     type-&gt;atype = mapped_type;
@@ -2595,7 +2666,8 @@ static void resolveInstantiatedClassTemplate(sipSpec *pt, argDef *type)
         resolveInstantiatedClassTemplate(pt, &amp;sd-&gt;args[a]);
 
     for (cd = pt-&gt;classes; cd != NULL; cd = cd-&gt;next)
-        if (cd-&gt;td != NULL &amp;&amp; sameScopedName(cd-&gt;td-&gt;fqname, td-&gt;fqname) &amp;&amp;
+        if (cd-&gt;td != NULL &amp;&amp;
+            compareScopedNames(cd-&gt;td-&gt;fqname, td-&gt;fqname) == 0 &amp;&amp;
             sameSignature(&amp;cd-&gt;td-&gt;types, sd, TRUE))
         {
             type-&gt;atype = class_type;
@@ -2617,7 +2689,10 @@ static mappedTypeDef *instantiateMappedTypeTemplate(sipSpec *pt, moduleDef *mod,
     type_names = type_values = NULL;
     appendTypeStrings(type-&gt;u.td-&gt;fqname, &amp;mtt-&gt;mt-&gt;type.u.td-&gt;types, &amp;type-&gt;u.td-&gt;types, &amp;mtt-&gt;sig, &amp;type_names, &amp;type_values);
 
-    mtd = allocMappedType(type);
+    mtd = allocMappedType(pt, type);
+
+    if (generatingCodeForModule(pt, mod))
+        setIsUsedName(mtd-&gt;cname);
 
     mtd-&gt;iff = findIfaceFile(pt, mod, type-&gt;u.td-&gt;fqname, mappedtype_iface, type);
     mtd-&gt;iff-&gt;module = mod;
@@ -2700,17 +2775,17 @@ static void searchMappedTypes(sipSpec *pt,scopedNameDef *snd,argDef *ad)
     /* Patch back to defined types so we can use sameBaseType(). */
     if (snd != NULL)
     {
-        oname = ad -&gt; u.snd;
-        ad -&gt; u.snd = snd;
-        ad -&gt; atype = defined_type;
+        oname = ad-&gt;u.snd;
+        ad-&gt;u.snd = snd;
+        ad-&gt;atype = defined_type;
     }
 
-    for (mtd = pt -&gt; mappedtypes; mtd != NULL; mtd = mtd -&gt; next)
-        if (sameBaseType(ad,&amp;mtd -&gt; type))
+    for (mtd = pt-&gt;mappedtypes; mtd != NULL; mtd = mtd-&gt;next)
+        if (sameBaseType(ad, &amp;mtd-&gt;type))
         {
             /* Copy the type. */
-            ad -&gt; atype = mapped_type;
-            ad -&gt; u.mtd = mtd;
+            ad-&gt;atype = mapped_type;
+            ad-&gt;u.mtd = mtd;
 
             return;
         }
@@ -2718,8 +2793,8 @@ static void searchMappedTypes(sipSpec *pt,scopedNameDef *snd,argDef *ad)
     /* Restore because we didn't find anything. */
     if (snd != NULL)
     {
-        ad -&gt; u.snd = oname;
-        ad -&gt; atype = no_type;
+        ad-&gt;u.snd = oname;
+        ad-&gt;atype = no_type;
     }
 }
 
@@ -2732,10 +2807,12 @@ void searchTypedefs(sipSpec *pt, scopedNameDef *snd, argDef *ad)
     typedefDef *td;
 
     for (td = pt-&gt;typedefs; td != NULL; td = td-&gt;next)
-        if (sameScopedName(td-&gt;fqname, snd))
+    {
+        int res = compareScopedNames(td-&gt;fqname, snd);
+
+        if (res == 0)
         {
             /* Copy the type. */
-
             ad-&gt;atype = td-&gt;type.atype;
             ad-&gt;argflags |= td-&gt;type.argflags;
             ad-&gt;nrderefs += td-&gt;type.nrderefs;
@@ -2746,26 +2823,30 @@ void searchTypedefs(sipSpec *pt, scopedNameDef *snd, argDef *ad)
 
             break;
         }
+
+        /* The list is sorted so stop if we have gone too far. */
+        if (res &gt; 0)
+            break;
+    }
 }
 
 
 /*
  * Search the enums for a name and return the type.
  */
-
-static void searchEnums(sipSpec *pt,scopedNameDef *snd,argDef *ad)
+static void searchEnums(sipSpec *pt, scopedNameDef *snd, argDef *ad)
 {
     enumDef *ed;
 
-    for (ed = pt -&gt; enums; ed != NULL; ed = ed -&gt; next)
+    for (ed = pt-&gt;enums; ed != NULL; ed = ed-&gt;next)
     {
-        if (ed -&gt; fqcname == NULL)
+        if (ed-&gt;fqcname == NULL)
             continue;
 
-        if (sameScopedName(ed -&gt; fqcname,snd))
+        if (compareScopedNames(ed-&gt;fqcname, snd) == 0)
         {
-            ad -&gt; atype = enum_type;
-            ad -&gt; u.ed = ed;
+            ad-&gt;atype = enum_type;
+            ad-&gt;u.ed = ed;
 
             break;
         }
@@ -2776,23 +2857,24 @@ static void searchEnums(sipSpec *pt,scopedNameDef *snd,argDef *ad)
 /*
  * Search the classes for one with a particular name and return it as a type.
  */
-static void searchClasses(sipSpec *pt, moduleDef *mod, scopedNameDef *cname, argDef *ad)
+static void searchClasses(sipSpec *pt, moduleDef *mod, scopedNameDef *cname,
+        argDef *ad)
 {
     classDef *cd;
 
-    for (cd = pt -&gt; classes; cd != NULL; cd = cd -&gt; next)
+    for (cd = pt-&gt;classes; cd != NULL; cd = cd-&gt;next)
     {
         /*
-         * Ignore an external class unless it was declared in the same
-         * context (ie. module) as the name is being used.
+         * Ignore an external class unless it was declared in the same context
+         * (ie. module) as the name is being used.
          */
         if (isExternal(cd) &amp;&amp; cd-&gt;iff-&gt;module != mod)
             continue;
 
-        if (sameScopedName(classFQCName(cd), cname))
+        if (compareScopedNames(classFQCName(cd), cname) == 0)
         {
-            ad -&gt; atype = class_type;
-            ad -&gt; u.cd = cd;
+            ad-&gt;atype = class_type;
+            ad-&gt;u.cd = cd;
 
             break;
         }
@@ -2910,160 +2992,131 @@ static ifaceFileDef *getIfaceFile(argDef *ad)
 
 
 /*
- * Position a class so that it is after all its super-classes.
+ * Create the sorted array of numbered types for a module.
  */
-static void positionClass(classDef *cd)
+static void createSortedNumberedTypesTable(sipSpec *pt, moduleDef *mod)
 {
-    classList *cl;
+    classDef *cd;
+    mappedTypeDef *mtd;
+    enumDef *ed;
+    argDef *ad;
+    int i;
 
-    /* See if it has already been done. */
-    if (cd -&gt; node -&gt; ordered)
-        return;
+    /* Count the how many types there are. */
+    mod-&gt;nrtypes = 0;
 
-    for (cl = cd -&gt; supers; cl != NULL; cl = cl -&gt; next)
+    for (cd = pt-&gt;classes; cd != NULL; cd = cd-&gt;next)
     {
-        nodeDef **ndp, *nd1, *nd2, *rp;
+        if (cd-&gt;iff-&gt;module != mod)
+            continue;
+
+        mod-&gt;nrtypes++;
+    }
 
-        /* Ignore super-classes from different modules. */
-        if (cl -&gt; cd -&gt; iff -&gt; module != cd -&gt; iff -&gt; module)
+    for (mtd = pt-&gt;mappedtypes; mtd != NULL; mtd = mtd-&gt;next)
+    {
+        if (mtd-&gt;iff-&gt;module != mod)
             continue;
 
-        /* Make sure the super-class is positioned. */
-        positionClass(cl -&gt; cd);
+        mod-&gt;nrtypes++;
+    }
 
-        /*
-         * Find ancestors of the two that are siblings (ie. they have a
-         * common parent).
-         */
-        rp = &amp;cd -&gt; iff -&gt; module -&gt; root;
+    for (ed = pt-&gt;enums; ed != NULL; ed = ed-&gt;next)
+    {
+        if (ed-&gt;fqcname == NULL)
+            continue;
 
-        for (nd1 = cd -&gt; node; nd1 != rp; nd1 = nd1 -&gt; parent)
-        {
-            for (nd2 = cl -&gt; cd -&gt; node; nd2 != rp; nd2 = nd2 -&gt; parent)
-                if (nd1 -&gt; parent == nd2 -&gt; parent)
-                    break;
+        if (ed-&gt;ecd != NULL &amp;&amp; isTemplateClass(ed-&gt;ecd))
+            continue;
 
-            if (nd2 != rp)
-                break;
-        }
+        if (ed-&gt;module != mod)
+            continue;
 
-        /*
-         * The first node must appear after the second in the common
-         * parent's list of children.
-         */
-        for (ndp = &amp;nd1 -&gt; parent -&gt; child; *ndp != NULL; ndp = &amp;(*ndp) -&gt; next)
-        {
-            nodeDef *nd = *ndp;
+        mod-&gt;nrtypes++;
+    }
 
-            if (nd == nd2)
-                break;
+    if (mod-&gt;nrtypes == 0)
+        return;
 
-            if (nd == nd1)
-            {
-                /* Remove this one from the list. */
-                *ndp = nd -&gt; next;
+    /* Allocate and populate the table. */
+    ad = mod-&gt;types = sipCalloc(mod-&gt;nrtypes, sizeof (argDef));
 
-                /* Find the super-class ancestor. */
-                while (*ndp != nd2)
-                    ndp = &amp;(*ndp) -&gt; next;
+    for (cd = pt-&gt;classes; cd != NULL; cd = cd-&gt;next)
+    {
+        if (cd-&gt;iff-&gt;module != mod)
+            continue;
 
-                /*
-                 * Put this one back after the super-class
-                 * ancestor.
-                 */
-                nd -&gt; next = (*ndp) -&gt; next;
-                (*ndp) -&gt; next = nd;
+        ad-&gt;atype = class_type;
+        ad-&gt;u.cd = cd;
+        ad-&gt;name = cd-&gt;iff-&gt;name-&gt;text;
 
-                break;
-            }
-        }
+        ++ad;
     }
 
-    cd -&gt; node -&gt; ordered = TRUE;
-}
+    for (mtd = pt-&gt;mappedtypes; mtd != NULL; mtd = mtd-&gt;next)
+    {
+        if (mtd-&gt;iff-&gt;module != mod)
+            continue;
 
+        ad-&gt;atype = mapped_type;
+        ad-&gt;u.mtd = mtd;
+        ad-&gt;name = mtd-&gt;cname-&gt;text;
 
-/*
- * Make sure a class is in the namespace tree.
- */
-static void addNodeToParent(nodeDef *root,classDef *cd)
-{
-    nodeDef *nd, *parent;
+        ++ad;
+    }
 
-    /* Skip classes already in the tree. */
-    if (cd -&gt; node != NULL)
-        return;
+    for (ed = pt-&gt;enums; ed != NULL; ed = ed-&gt;next)
+    {
+        if (ed-&gt;fqcname == NULL)
+            continue;
 
-    /* Add this child to the parent. */
-    nd = sipMalloc(sizeof (nodeDef));
+        if (ed-&gt;ecd != NULL &amp;&amp; isTemplateClass(ed-&gt;ecd))
+            continue;
 
-    nd -&gt; ordered = FALSE;
-    nd -&gt; cd = cd;
-    nd -&gt; child = NULL;
+        if (ed-&gt;module != mod)
+            continue;
 
-    /* Get the address of the parent node. */
-    if (cd -&gt; ecd == NULL)
-        parent = root;
-    else
-    {
-        /* Make sure the parent is in the tree. */
-        addNodeToParent(root,cd -&gt; ecd);
+        ad-&gt;atype = enum_type;
+        ad-&gt;u.ed = ed;
+        ad-&gt;name = ed-&gt;cname-&gt;text;
 
-        parent = cd -&gt; ecd -&gt; node;
+        ++ad;
     }
 
-    nd -&gt; parent = parent;
+    /* Sort the table and assign type numbers. */
+    qsort(mod-&gt;types, mod-&gt;nrtypes, sizeof (argDef), compareTypes);
 
-    /* Insert this at the head of the parent's children. */
-    nd -&gt; next = parent -&gt; child;
-    parent -&gt; child = nd;
-
-    /* Remember where we are in the tree. */
-    cd -&gt; node = nd;
-}
+    for (ad = mod-&gt;types, i = 0; i &lt; mod-&gt;nrtypes; ++i, ++ad)
+    {
+        switch (ad-&gt;atype)
+        {
+        case class_type:
+            ad-&gt;u.cd-&gt;classnr = i;
 
+            /* If we find a class called QObject, assume it's Qt. */
+            if (strcmp(ad-&gt;name, &quot;QObject&quot;) == 0)
+                mod-&gt;qobjclass = i;
 
-/*
- * Assign the module specific class number for a class and all it's children.
- */
-static void assignClassNrs(sipSpec *pt, moduleDef *mod, nodeDef *nd)
-{
-    classDef *cd;
-    nodeDef *cnd;
+            break;
 
-    /* Assign the class if it's not the root. */
-    if ((cd = nd-&gt;cd) != NULL)
-    {
-        cd-&gt;classnr = mod-&gt;nrclasses++;
+        case mapped_type:
+            ad-&gt;u.mtd-&gt;mappednr = i;
+            break;
 
-        /* If we find a class called QObject, assume it's Qt. */
-        if (strcmp(classBaseName(cd), &quot;QObject&quot;) == 0)
-            mod-&gt;qobjclass = cd-&gt;classnr;
+        case enum_type:
+            ad-&gt;u.ed-&gt;enumnr = i;
+            break;
+        }
     }
-
-    /* Assign all it's children. */
-    for (cnd = nd-&gt;child; cnd != NULL; cnd = cnd-&gt;next)
-        assignClassNrs(pt, mod, cnd);
 }
 
 
 /*
- * Assign the module specific enum number for all named enums.
+ * The qsort helper to compare two generated type names.
  */
-static void assignEnumNrs(sipSpec *pt)
+static int compareTypes(const void *t1, const void *t2)
 {
-    enumDef *ed;
-
-    for (ed = pt-&gt;enums; ed != NULL; ed = ed-&gt;next)
-    {
-        if (ed-&gt;fqcname == NULL)
-            continue;
-
-        if (ed-&gt;ecd != NULL &amp;&amp; isTemplateClass(ed-&gt;ecd))
-            continue;
-
-        ed-&gt;enumnr = ed-&gt;module-&gt;nrenums++;
-    }
+    return strcmp(((argDef *)t1)-&gt;name, ((argDef *)t2)-&gt;name);
 }
 
 </diff>
      <filename>sipgen/transform.c</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 // This contains all the C++ code that is needed by the sip module.
 //
-// Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+// Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
 // 
 // This file is part of SIP.
 // </diff>
      <filename>siplib/bool.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
  * This module implements a hash table class for mapping C/C++ addresses to the
  * corresponding wrapped Python object.
  *
- * Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+ * Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
  * 
  * This file is part of SIP.
  * 
@@ -100,13 +100,15 @@ static sipHashEntry *findHashEntry(sipObjectMap *om,void *key)
  * Return the wrapped Python object of a specific type for a C/C++ address or
  * NULL if it wasn't found.
  */
-sipWrapper *sipOMFindObject(sipObjectMap *om, void *key, sipWrapperType *type)
+sipSimpleWrapper *sipOMFindObject(sipObjectMap *om, void *key,
+        const sipTypeDef *td)
 {
     sipHashEntry *he = findHashEntry(om, key);
-    sipWrapper *w;
+    sipSimpleWrapper *sw;
+    PyTypeObject *py_type = sipTypeAsPyTypeObject(td);
 
     /* Go through each wrapped object at this address. */
-    for (w = he-&gt;first; w != NULL; w = w-&gt;next)
+    for (sw = he-&gt;first; sw != NULL; sw = sw-&gt;next)
     {
         /*
          * If the reference count is 0 then it is in the process of being
@@ -115,15 +117,15 @@ sipWrapper *sipOMFindObject(sipObjectMap *om, void *key, sipWrapperType *type)
          * code is being re-entered (and there are guards in place to prevent
          * this).
          */
-        if (w-&gt;ob_refcnt == 0)
+        if (sw-&gt;ob_refcnt == 0)
             continue;
 
         /*
          * If this wrapped object is of the given type, or a sub-type of it,
          * then we assume it is the same C++ object.
          */
-        if (PyObject_TypeCheck(w, (PyTypeObject *)type))
-            return w;
+        if (PyObject_TypeCheck(sw, py_type))
+            return sw;
     }
 
     return NULL;
@@ -133,9 +135,9 @@ sipWrapper *sipOMFindObject(sipObjectMap *om, void *key, sipWrapperType *type)
 /*
  * Add a C/C++ address and the corresponding wrapped Python object to the map.
  */
-void sipOMAddObject(sipObjectMap *om,sipWrapper *val)
+void sipOMAddObject(sipObjectMap *om, sipSimpleWrapper *val)
 {
-    sipHashEntry *he = findHashEntry(om,val -&gt; u.cppPtr);
+    sipHashEntry *he = findHashEntry(om, val-&gt;u.cppPtr);
 
     /*
      * If the bucket is in use then we appear to have several objects at the
@@ -158,42 +160,42 @@ void sipOMAddObject(sipObjectMap *om,sipWrapper *val)
          * pointers as invalid and reuse the entry.  Otherwise we just add this
          * one to the existing list of objects at this address.
          */
-        if (!(val -&gt; flags &amp; SIP_SHARE_MAP))
+        if (!(val-&gt;flags &amp; SIP_SHARE_MAP))
         {
-            sipWrapper *w = he-&gt;first;
+            sipSimpleWrapper *sw = he-&gt;first;
 
             he-&gt;first = NULL;
 
-            while (w != NULL)
+            while (sw != NULL)
             {
-                sipWrapper *next = w-&gt;next;
+                sipSimpleWrapper *next = sw-&gt;next;
 
                 /* We are removing it from the map here. */
-                sipSetNotInMap(w);
-                sip_api_common_dtor(w);
+                sipSetNotInMap(sw);
+                sip_api_common_dtor(sw);
 
-                w = next;
+                sw = next;
             }
         }
 
-        val -&gt; next = he -&gt; first;
-        he -&gt; first = val;
+        val-&gt;next = he-&gt;first;
+        he-&gt;first = val;
 
         return;
     }
 
     /* See if the bucket was unused or stale. */
-    if (he -&gt; key == NULL)
+    if (he-&gt;key == NULL)
     {
-        he -&gt; key = val -&gt; u.cppPtr;
-        om -&gt; unused--;
+        he-&gt;key = val -&gt; u.cppPtr;
+        om-&gt;unused--;
     }
     else
-        om -&gt; stale--;
+        om-&gt;stale--;
 
     /* Add the rest of the new value. */
-    he -&gt; first = val;
-    val -&gt; next = NULL;
+    he-&gt;first = val;
+    val-&gt;next = NULL;
 
     reorganiseMap(om);
 }
@@ -248,15 +250,15 @@ static void reorganiseMap(sipObjectMap *om)
  * Remove a C/C++ object from the table.  Return 0 if it was removed
  * successfully.
  */
-int sipOMRemoveObject(sipObjectMap *om,sipWrapper *val)
+int sipOMRemoveObject(sipObjectMap *om, sipSimpleWrapper *val)
 {
-    sipHashEntry *he = findHashEntry(om,val -&gt; u.cppPtr);
-    sipWrapper **wp;
+    sipHashEntry *he = findHashEntry(om, val-&gt;u.cppPtr);
+    sipSimpleWrapper **swp;
 
-    for (wp = &amp;he -&gt; first; *wp != NULL; wp = &amp;(*wp) -&gt; next)
-        if (*wp == val)
+    for (swp = &amp;he-&gt;first; *swp != NULL; swp = &amp;(*swp)-&gt;next)
+        if (*swp == val)
         {
-            *wp = val -&gt; next;
+            *swp = val-&gt;next;
 
             /*
              * If the bucket is now empty then count it as stale.  Note that we
@@ -266,8 +268,8 @@ int sipOMRemoveObject(sipObjectMap *om,sipWrapper *val)
              * words, searches must be repeatable until we reorganise the
              * table.
              */
-            if (he -&gt; first == NULL)
-                om -&gt; stale++;
+            if (he-&gt;first == NULL)
+                om-&gt;stale++;
 
             return 0;
         }</diff>
      <filename>siplib/objmap.c</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
  * The SIP library code that implements the interface to the optional module
  * supplied Qt support.
  *
- * Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+ * Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
  * 
  * This file is part of SIP.
  * 
@@ -15,6 +15,7 @@
 
 
 #include &lt;Python.h&gt;
+#include &lt;assert.h&gt;
 #include &lt;string.h&gt;
 
 #include &quot;sip.h&quot;
@@ -22,357 +23,16 @@
 
 
 /* This is how Qt &quot;types&quot; signals and slots. */
-#define isQtSlot(s) (*(s) == '1')
+#define isQtSlot(s)     (*(s) == '1')
 #define isQtSignal(s)   (*(s) == '2')
 
 
-static PyObject *py_sender = NULL;  /* The last Python signal sender. */
-
-
-static int isSameSlot(sipSlot *,PyObject *,const char *);
-static int emitQtSig(sipWrapper *,const char *,PyObject *);
-static int emitToSlotList(sipSlotList *rxlist, PyObject *sigargs);
-static int addSlotToPySigList(sipWrapper *,const char *,PyObject *,const char *);
-static void removeSlotFromPySigList(sipWrapper *,const char *,PyObject *,const char *);
 static PyObject *getWeakRef(PyObject *obj);
-static sipPySig *findPySignal(sipWrapper *,const char *);
 static char *sipStrdup(const char *);
-static int saveSlot(sipSlot *sp, PyObject *rxObj, const char *slot);
 static void *createUniversalSlot(sipWrapper *txSelf, const char *sig,
         PyObject *rxObj, const char *slot, const char **member, int flags);
 static void *findSignal(void *txrx, const char **sig);
 static void *newSignal(void *txrx, const char **sig);
-static void freeSlot(sipSlot *slot);
-
-
-/*
- * Return the most recent signal sender.
- */
-PyObject *sip_api_get_sender()
-{
-    PyObject *sender;
-    const void *qt_sender;
-
-    /*
-     * If there is a Qt sender then it is more recent than the last Python
-     * sender, so use it instead.
-     */
-    if ((qt_sender = sipQtSupport-&gt;qt_get_sender()) != NULL)
-        sender = sip_api_convert_from_instance((void *)qt_sender, sipQObjectClass, NULL);
-    else
-    {
-        if ((sender = py_sender) == NULL)
-            sender = Py_None;
-
-        Py_INCREF(sender);
-    }
-
-    return sender;
-}
-
-
-/*
- * Release the resources held by a connection.
- */
-void sip_api_free_connection(sipSlotConnection *conn)
-{
-    freeSlot(&amp;conn-&gt;sc_slot);
-}
-
-
-/*
- * Compare two connections and return TRUE if they are the same.
- */
-int sip_api_same_connection(sipSlotConnection *conn, void *tx, const char *sig,
-                PyObject *rxObj, const char *slot)
-{
-    return (conn-&gt;sc_transmitter == tx &amp;&amp;
-        sipQtSupport-&gt;qt_same_name(conn-&gt;sc_signature-&gt;sg_signature, sig) &amp;&amp;
-        isSameSlot(&amp;conn-&gt;sc_slot, rxObj, slot));
-}
-
-
-/*
- * Parse the signal arguments for a connection.
- */
-sipSignature *sip_api_parse_signature(const char *sig)
-{
-    static sipSignature *psig_list = NULL;
-    sipSignature *psig;
-    const char *sp, *ep;
-
-    /*
-     * First see if it has already been parsed.  Note that both sides of a
-     * connection will probably be parsed twice because the function names will
-     * be different even though the signatures will probably be the same.  We
-     * could be more clever, the most saving is when repeatedly emitting a
-     * signal for which this is sufficient.
-     */
-    for (psig = psig_list; psig != NULL; psig = psig-&gt;sg_next)
-        if (sipQtSupport-&gt;qt_same_name(psig-&gt;sg_signature, sig))
-            return psig;
-
-    /* Create a new one including space for the copy of the signature. */
-    if ((psig = (sipSignature *)sip_api_malloc(sizeof (sipSignature) + strlen(sig) + 1)) == NULL)
-        return NULL;
-
-    psig-&gt;sg_signature = (char *)&amp;psig[1];
-    psig-&gt;sg_nrargs = 0;
-    psig-&gt;sg_args = 0;
-
-    /* Find the start and end of the arguments. */
-    sp = strchr(sig, '(');
-    ep = strrchr(sig, ')');
-
-    /* If the signal isn't well formed we assume Qt will pick it up. */
-    if (sp &amp;&amp; ep &amp;&amp; sp &lt; ep)
-    {
-        /*
-         * Copy the signature arguments while counting them and
-         * removing non-significant spaces.  Each argument is left as a
-         * '\0' terminated string.
-         */
-        char *dp = psig-&gt;sg_signature;
-        int depth = 0, nrcommas = 0, argstart = TRUE;
-
-        for (;;)
-        {
-            char ch = *++sp;
-
-            if (strchr(&quot;,*&amp;)&lt;&gt;&quot;, ch))
-            {
-                /* Backup over any previous trailing space. */
-                if (dp &gt; psig-&gt;sg_signature &amp;&amp; dp[-1] == ' ')
-                    --dp;
-
-                if (sp == ep)
-                {
-                    *dp = '\0';
-                    break;
-                }
-
-                if (ch == ',' &amp;&amp; depth == 0)
-                {
-                    *dp++ = '\0';
-                    ++nrcommas;
-                    argstart = TRUE;
-                }
-                else
-                {
-                    *dp++ = ch;
-
-                    /*
-                     * Make sure commas in template
-                     * arguments are ignored.
-                     */
-                    if (ch == '&lt;')
-                        ++depth;
-                    else if (ch == '&gt;')
-                        --depth;
-                }
-            }
-            else if (ch == ' ')
-            {
-                /* Ignore leading and multiple spaces. */
-                if (!argstart &amp;&amp; dp[-1] != ' ')
-                    *dp++ = ch;
-            }
-            else
-            {
-                *dp++ = ch;
-                argstart = FALSE;
-            }
-        }
-
-        /* Handle the arguments now they are in a normal form. */
-        if (*psig-&gt;sg_signature)
-        {
-            char *arg = psig-&gt;sg_signature;
-            int a;
-
-            /* Allocate the space. */
-            psig-&gt;sg_nrargs = nrcommas + 1;
-
-            if ((psig-&gt;sg_args = (sipSigArg *)sip_api_malloc(sizeof (sipSigArg) * psig-&gt;sg_nrargs)) == NULL)
-            {
-                sip_api_free(psig);
-                return NULL;
-            }
-
-            for (a = 0; a &lt; psig-&gt;sg_nrargs; ++a)
-            {
-                sip_api_parse_type(arg, &amp;psig-&gt;sg_args[a]);
-
-                /* Move to the start of the next argument. */
-                arg += strlen(arg) + 1;
-            }
-        }
-    }
-
-    /* Make a deep copy of the signal. */
-    strcpy(psig-&gt;sg_signature, sig);
-
-    /* Add it to the list so it can be re-used. */
-    psig-&gt;sg_next = psig_list;
-    psig_list = psig;
-
-    return psig;
-}
-
-
-/*
- * Parse a single type.
- */
-void sip_api_parse_type(const char *type, sipSigArg *arg)
-{
-    size_t btlen = 0;
-    int unsup, isref = FALSE, indir = 0;
-    const char *ep;
-    sipSigArgType sat = unknown_sat;
-
-    /* Find the start of the significant part of the type. */
-    if (strncmp(type, &quot;const &quot;, 6) == 0)
-        type += 6;
-
-    /*
-     * Find the length of the base type, the number of indirections and if it
-     * is a reference.
-     */
-     for (ep = type; *ep; ++ep)
-        if (*ep == '&amp;')
-            isref = TRUE;
-        else if (*ep == '*')
-            ++indir;
-        else
-            ++btlen;
-
-    /* Assume that anything other than a base type is unsupported. */
-    unsup = (isref || indir);
-
-    /* Parse the base type. */
-    switch (btlen)
-    {
-    case 3:
-        if (strncmp(type, &quot;int&quot;, 3) == 0)
-            sat = int_sat;
-        break;
-
-    case 4:
-        if (strncmp(type, &quot;bool&quot;, 4) == 0)
-            sat = bool_sat;
-        else if (strncmp(type, &quot;long&quot;, 4) == 0)
-            sat = long_sat;
-        else if (strncmp(type, &quot;char&quot;, 4) == 0)
-        {
-            sat = (indir ? string_sat : char_sat);
-            unsup = (isref || indir &gt; 1);
-        }
-        else if (strncmp(type, &quot;void&quot;, 4) == 0)
-        {
-            sat = void_sat;
-            unsup = (isref || indir != 1);
-        }
-        break;
-
-    case 5:
-        if (strncmp(type, &quot;float&quot;, 5) == 0)
-            sat = float_sat;
-        else if (strncmp(type, &quot;short&quot;, 5) == 0)
-            sat = short_sat;
-        break;
-
-    case 6:
-        if (strncmp(type, &quot;double&quot;, 6) == 0)
-            sat = double_sat;
-        break;
-
-    case 7:
-        if (strncmp(type, &quot;__int64&quot;, 7) == 0)
-            sat = longlong_sat;
-        else if (strncmp(type, &quot;wchar_t&quot;, 7) == 0)
-        {
-            sat = (indir ? wstring_sat : wchar_sat);
-            unsup = (isref || indir &gt; 1);
-        }
-        break;
-
-    case 8:
-        if (strncmp(type, &quot;unsigned&quot;, 8) == 0)
-            sat = uint_sat;
-        else if (strncmp(type, &quot;QVariant&quot;, 8) == 0)
-        {
-            if (indir == 0)
-            {
-                sat = qvariant_sat;
-                unsup = FALSE;
-            }
-            else if (indir == 1)
-            {
-                sat = qvariantp_sat;
-                unsup = FALSE;
-            }
-        }
-        break;
-
-    case 9:
-        if (strncmp(type, &quot;long long&quot;, 9) == 0)
-            sat = longlong_sat;
-        break;
-
-    case 11:
-        if (strncmp(type, &quot;signed char&quot;, 11) == 0)
-        {
-            sat = (indir ? sstring_sat : schar_sat);
-            unsup = (isref || indir &gt; 1);
-        }
-        break;
-
-    case 12:
-        if (strncmp(type, &quot;unsigned int&quot;, 12) == 0)
-            sat = uint_sat;
-        break;
-
-    case 13:
-        if (strncmp(type, &quot;unsigned long&quot;, 13) == 0)
-            sat = ulong_sat;
-        else if (strncmp(type, &quot;unsigned char&quot;, 13) == 0)
-        {
-            sat = (indir ? ustring_sat : uchar_sat);
-            unsup = (isref || indir &gt; 1);
-        }
-        else if (strncmp(type, &quot;PyQt_PyObject&quot;, 13) == 0 &amp;&amp; indir == 0)
-        {
-            sat = pyobject_sat;
-            unsup = FALSE;
-        }
-        break;
-
-    case 14:
-        if (strncmp(type, &quot;unsigned short&quot;, 14) == 0)
-            sat = ushort_sat;
-        break;
-
-    case 16:
-        if (strncmp(type, &quot;unsigned __int64&quot;, 16) == 0)
-            sat = ulonglong_sat;
-        break;
-
-    case 18:
-        if (strncmp(type, &quot;unsigned long long&quot;, 18) == 0)
-            sat = ulonglong_sat;
-        break;
-    }
-
-    if (sat == unknown_sat)
-        sipFindSigArgType(type, btlen, arg, indir);
-    else
-    {
-        if (unsup)
-            sat = unknown_sat;
-
-        arg-&gt;atype = sat;
-    }
-}
 
 
 /*
@@ -380,28 +40,10 @@ void sip_api_parse_type(const char *type, sipSigArg *arg)
  */
 static void *findSignal(void *txrx, const char **sig)
 {
-    sipSignature *psig;
-
-    /*
-     * Handle the trivial case where the Qt implementation doesn't support
-     * universal signals.
-     */
-    if (sipQtSupport-&gt;qt_is_qt_signal == NULL)
-        return txrx;
-
-    /* See if this a shortcircuited Python signal. */
-    if (strchr(*sig, '(') == NULL)
-        return sipQtSupport-&gt;qt_find_universal_signal_shortcut(txrx, *sig, sig);
-
-    /* See if the existing object can be used itself. */
-    if (sipQtSupport-&gt;qt_is_qt_signal(txrx, *sig))
-        return txrx;
-
-    if ((psig = sip_api_parse_signature(*sig)) == NULL)
-        return NULL;
+    if (sipQtSupport-&gt;qt_find_universal_signal != NULL)
+        txrx = sipQtSupport-&gt;qt_find_universal_signal(txrx, sig);
 
-    /* Find an ordinary universal signal. */
-    return sipQtSupport-&gt;qt_find_universal_signal(txrx, psig);
+    return txrx;
 }
 
 
@@ -410,28 +52,12 @@ static void *findSignal(void *txrx, const char **sig)
  */
 static void *newSignal(void *txrx, const char **sig)
 {
-    sipSignature *psig;
+    void *new_txrx = findSignal(txrx, sig);
 
-    /*
-     * Handle the trivial case where the Qt implementation doesn't support
-     * universal signals.
-     */
-    if (sipQtSupport-&gt;qt_is_qt_signal == NULL)
-        return txrx;
-
-    /* See if this a shortcircuited Python signal. */
-    if (strchr(*sig, '(') == NULL)
-        return sipQtSupport-&gt;qt_create_universal_signal_shortcut(txrx, *sig, sig);
-
-    /* See if the existing object can be used itself. */
-    if (sipQtSupport-&gt;qt_is_qt_signal(txrx, *sig))
-        return txrx;
+    if (new_txrx == NULL &amp;&amp; sipQtSupport-&gt;qt_create_universal_signal != NULL)
+        new_txrx = sipQtSupport-&gt;qt_create_universal_signal(txrx, sig);
 
-    if ((psig = sip_api_parse_signature(*sig)) == NULL)
-        return NULL;
-
-    /* Create an ordinary universal signal. */
-    return sipQtSupport-&gt;qt_create_universal_signal(txrx, psig);
+    return new_txrx;
 }
 
 
@@ -440,178 +66,19 @@ static void *newSignal(void *txrx, const char **sig)
  * error.
  */
 static void *createUniversalSlot(sipWrapper *txSelf, const char *sig,
-                 PyObject *rxObj, const char *slot,
-                 const char **member, int flags)
+        PyObject *rxObj, const char *slot, const char **member, int flags)
 {
-    sipSlotConnection conn;
-    void *us;
+    void *us = sipQtSupport-&gt;qt_create_universal_slot(txSelf, sig, rxObj, slot,
+            member, flags);
 
-    /* Initialise the connection. */
-    conn.sc_transmitter = (txSelf ? sipGetAddress(txSelf) : 0);
-
-    /* Save the real slot. */
-    if (saveSlot(&amp;conn.sc_slot, rxObj, slot) &lt; 0)
-        return 0;
-
-    /* Parse the signature and create the universal slot. */
-    if ((conn.sc_signature = sip_api_parse_signature(sig)) == NULL)
-    {
-        sip_api_free_connection(&amp;conn);
-        return 0;
-    }
-
-    /*
-     * Use the new API only if it is needed.  This ensures binary
-     * compatibility.
-     */
-    if (flags)
-        us = sipQtSupport-&gt;qt_create_universal_slot_ex(txSelf, &amp;conn, member,
-                flags);
-    else
-        us = sipQtSupport-&gt;qt_create_universal_slot(txSelf, &amp;conn, member);
-
-    if (us == NULL)
-    {
-        sip_api_free_connection(&amp;conn);
-        return 0;
-    }
-
-    if (txSelf)
-        sipSetPossibleProxy(txSelf);
+    if (us &amp;&amp; txSelf)
+        sipSetPossibleProxy((sipSimpleWrapper *)txSelf);
 
     return us;
 }
 
 
 /*
- * Emit a Python or Qt signal.
- */
-int sip_api_emit_signal(PyObject *self,const char *sig,PyObject *sigargs)
-{
-    sipPySig *ps;
-    void *tx;
-    sipWrapper *w = (sipWrapper *)self;
-
-    /*
-     * Don't do anything if signals are blocked.  Qt signals would be blocked
-     * anyway, but this blocks Python signals as well.
-     */
-    if ((tx = sip_api_get_cpp_ptr(w, sipQObjectClass)) == NULL || sipQtSupport-&gt;qt_signals_blocked(tx))
-        return 0;
-
-    if (isQtSignal(sig))
-    {
-        sipSignature *psig;
-
-        /* Handle Qt implementations that emit using generated code. */
-        if (!sipQtSupport-&gt;qt_emit_signal)
-            return emitQtSig(w, sig, sigargs);
-
-        /* See if the signal is a shortcut. */
-        if (strchr(sig, '(') == NULL)
-            return sipQtSupport-&gt;qt_emit_signal_shortcut(tx, sig, sigargs);
-
-        if ((psig = sip_api_parse_signature(sig)) == NULL)
-            return -1;
-
-        if (psig-&gt;sg_nrargs != PyTuple_GET_SIZE(sigargs))
-            PyErr_Format(PyExc_TypeError, &quot;Signal has %d arguments, but %d given&quot;, psig-&gt;sg_nrargs, PyTuple_GET_SIZE(sigargs));
-
-        return sipQtSupport-&gt;qt_emit_signal(tx, psig, sigargs);
-    }
-
-    if ((ps = findPySignal(w,sig)) != NULL)
-    {
-        int rc;
-
-        /* Forget the last Qt sender and remember this one. */
-        sipQtSupport-&gt;qt_forget_sender();
-        py_sender = self;
-
-        rc = emitToSlotList(ps -&gt; rxlist,sigargs);
-
-        /* Forget this as a sender. */
-        py_sender = NULL;
-
-        return rc;
-    }
-
-    return 0;
-}
-
-
-/*
- * Search the Python signal list for a signal.
- */
-static sipPySig *findPySignal(sipWrapper *w,const char *sig)
-{
-    sipPySig *ps;
-
-    for (ps = w -&gt; pySigList; ps != NULL; ps = ps -&gt; next)
-        if (sipQtSupport-&gt;qt_same_name(ps -&gt; name,sig))
-            return ps;
-
-    return NULL;
-}
-
-
-/*
- * Search a signal table for a signal.  If found, call the emitter function
- * with the signal arguments.  Return 0 if the signal was emitted or &lt;0 if
- * there was an error.
- */
-static int emitQtSig(sipWrapper *w,const char *sig,PyObject *sigargs)
-{
-    sipQtSignal *tab;
-
-    /* Search the table. */
-    for (tab = ((sipWrapperType *)(w -&gt; ob_type)) -&gt; type -&gt; td_emit; tab -&gt; st_name != NULL; ++tab)
-    {
-        const char *sp, *tp;
-        int found;
-
-        /* Compare only the base name. */
-        sp = &amp;sig[1];
-        tp = tab -&gt; st_name;
-
-        found = TRUE;
-
-        while (*sp != '\0' &amp;&amp; *sp != '(' &amp;&amp; *tp != '\0')
-            if (*sp++ != *tp++)
-            {
-                found = FALSE;
-                break;
-            }
-
-        if (found)
-            return (*tab -&gt; st_emitfunc)(w,sigargs);
-    }
-
-    /* It wasn't found if we got this far. */
-    PyErr_Format(PyExc_NameError,&quot;Invalid signal %s&quot;,&amp;sig[1]);
-
-    return -1;
-}
-
-
-/*
- * Send a signal to a single slot (Qt or Python).  This is deprecated.
- */
-int sip_api_emit_to_slot(const sipSlot *slot, PyObject *sigargs)
-{
-    PyObject *obj = sip_api_invoke_slot(slot, sigargs);
-
-    if (obj != NULL)
-    {
-        Py_DECREF(obj);
-        return 0;
-    }
-
-    return -1;
-}
-
-
-/*
  * Invoke a single slot (Qt or Python) and return the result.
  */
 PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs)
@@ -621,10 +88,12 @@ PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs)
     /* Keep some compilers quiet. */
     oxtype = oxvalue = oxtb = NULL;
 
-    /* Fan out Qt signals. */
+    /* Fan out Qt signals.  (Only PyQt3 will do this.) */
     if (slot-&gt;name != NULL &amp;&amp; slot-&gt;name[0] != '\0')
     {
-        if (sip_api_emit_signal(slot-&gt;pyobj, slot-&gt;name, sigargs) &lt; 0)
+        assert(sipQtSupport-&gt;qt_signal_relay);
+
+        if (sipQtSupport-&gt;qt_signal_relay(slot-&gt;pyobj, slot-&gt;name, sigargs) &lt; 0)
             return NULL;
 
         Py_INCREF(Py_None);
@@ -816,124 +285,50 @@ PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs)
 
 
 /*
- * Send a signal to the slots (Qt or Python) in a Python list.
- */
-static int emitToSlotList(sipSlotList *rxlist,PyObject *sigargs)
-{
-    int rc;
-
-    /* Apply the arguments to each slot method. */
-    rc = 0;
-
-    while (rxlist != NULL &amp;&amp; rc &gt;= 0)
-    {
-        sipSlotList *next;
-
-        /*
-         * We get the next in the list before calling the slot in case the list
-         * gets changed by the slot - usually because the slot disconnects
-         * itself.
-         */
-        next = rxlist -&gt; next;
-        rc = sip_api_emit_to_slot(&amp;rxlist -&gt; rx, sigargs);
-        rxlist = next;
-    }
-
-    return rc;
-}
-
-
-/*
- * Add a slot to a transmitter's Python signal list.  The signal is a Python
- * signal, the slot may be either a Qt signal, a Qt slot, a Python signal or a
- * Python slot.
- */
-static int addSlotToPySigList(sipWrapper *txSelf,const char *sig,
-                  PyObject *rxObj,const char *slot)
-{
-    sipPySig *ps;
-    sipSlotList *psrx;
-
-    /* Create a new one if necessary. */
-    if ((ps = findPySignal(txSelf,sig)) == NULL)
-    {
-        if ((ps = (sipPySig *)sip_api_malloc(sizeof (sipPySig))) == NULL)
-            return -1;
-
-        if ((ps -&gt; name = sipStrdup(sig)) == NULL)
-        {
-            sip_api_free(ps);
-            return -1;
-        }
-
-        ps -&gt; rxlist = NULL;
-        ps -&gt; next = txSelf -&gt; pySigList;
-
-        txSelf -&gt; pySigList = ps;
-    }
-
-    /* Create the new receiver. */
-    if ((psrx = (sipSlotList *)sip_api_malloc(sizeof (sipSlotList))) == NULL)
-        return -1;
-
-    if (saveSlot(&amp;psrx-&gt;rx, rxObj, slot) &lt; 0)
-    {
-        sip_api_free(psrx);
-        return -1;
-    }
-
-    psrx -&gt; next = ps -&gt; rxlist;
-    ps -&gt; rxlist = psrx;
-
-    return 0;
-}
-
-
-/*
  * Compare two slots to see if they are the same.
  */
-static int isSameSlot(sipSlot *slot1, PyObject *rxobj2, const char *slot2)
+int sip_api_same_slot(const sipSlot *sp, PyObject *rxObj, const char *slot)
 {
     /* See if they are signals or Qt slots, ie. they have a name. */
-    if (slot2 != NULL)
+    if (slot != NULL)
     {
-        if (slot1-&gt;name == NULL || slot1-&gt;name[0] == '\0')
+        if (sp-&gt;name == NULL || sp-&gt;name[0] == '\0')
             return 0;
 
-        return (sipQtSupport-&gt;qt_same_name(slot1-&gt;name, slot2) &amp;&amp; slot1-&gt;pyobj == rxobj2);
+        return (sipQtSupport-&gt;qt_same_name(sp-&gt;name, slot) &amp;&amp; sp-&gt;pyobj == rxObj);
     }
 
     /* See if they are pure Python methods. */
-    if (PyMethod_Check(rxobj2))
+    if (PyMethod_Check(rxObj))
     {
-        if (slot1-&gt;pyobj != NULL)
+        if (sp-&gt;pyobj != NULL)
             return 0;
 
-        return (slot1-&gt;meth.mfunc == PyMethod_GET_FUNCTION(rxobj2) &amp;&amp;
-                slot1-&gt;meth.mself == PyMethod_GET_SELF(rxobj2) &amp;&amp;
-                slot1-&gt;meth.mclass == PyMethod_GET_CLASS(rxobj2));
+        return (sp-&gt;meth.mfunc == PyMethod_GET_FUNCTION(rxObj) &amp;&amp;
+                sp-&gt;meth.mself == PyMethod_GET_SELF(rxObj) &amp;&amp;
+                sp-&gt;meth.mclass == PyMethod_GET_CLASS(rxObj));
     }
 
     /* See if they are wrapped C++ methods. */
-    if (PyCFunction_Check(rxobj2))
+    if (PyCFunction_Check(rxObj))
     {
-        if (slot1-&gt;name == NULL || slot1-&gt;name[0] != '\0')
+        if (sp-&gt;name == NULL || sp-&gt;name[0] != '\0')
             return 0;
 
-        return (slot1-&gt;pyobj == PyCFunction_GET_SELF(rxobj2) &amp;&amp;
-                strcmp(&amp;slot1-&gt;name[1], ((PyCFunctionObject *)rxobj2)-&gt;m_ml-&gt;ml_name) == 0);
+        return (sp-&gt;pyobj == PyCFunction_GET_SELF(rxObj) &amp;&amp;
+                strcmp(&amp;sp-&gt;name[1], ((PyCFunctionObject *)rxObj)-&gt;m_ml-&gt;ml_name) == 0);
     }
 
     /* The objects must be the same. */
-    return (slot1-&gt;pyobj == rxobj2);
+    return (sp-&gt;pyobj == rxObj);
 }
 
 
 /*
  * Convert a valid Python signal or slot to an existing universal slot.
  */
-void *sipGetRx(sipWrapper *txSelf,const char *sigargs,PyObject *rxObj,
-           const char *slot,const char **memberp)
+void *sipGetRx(sipSimpleWrapper *txSelf, const char *sigargs, PyObject *rxObj,
+           const char *slot, const char **memberp)
 {
     if (slot != NULL)
         if (isQtSlot(slot) || isQtSignal(slot))
@@ -942,7 +337,7 @@ void *sipGetRx(sipWrapper *txSelf,const char *sigargs,PyObject *rxObj,
 
             *memberp = slot;
 
-            if ((rx = sip_api_get_cpp_ptr((sipWrapper *)rxObj, sipQObjectClass)) == NULL)
+            if ((rx = sip_api_get_cpp_ptr((sipSimpleWrapper *)rxObj, sipQObjectType)) == NULL)
                 return NULL;
 
             if (isQtSignal(slot))
@@ -964,11 +359,11 @@ void *sipGetRx(sipWrapper *txSelf,const char *sigargs,PyObject *rxObj,
  * slot) to a Qt receiver.  It is only ever called when the signal is a Qt
  * signal.  Return NULL is there was an error.
  */
-void *sipConvertRxEx(sipWrapper *txSelf,const char *sig,PyObject *rxObj,
-             const char *slot,const char **memberp, int flags)
+void *sip_api_convert_rx(sipWrapper *txSelf, const char *sigargs,
+        PyObject *rxObj, const char *slot, const char **memberp, int flags)
 {
     if (slot == NULL)
-        return createUniversalSlot(txSelf, sig, rxObj, NULL, memberp, flags);
+        return createUniversalSlot(txSelf, sigargs, rxObj, NULL, memberp, flags);
 
     if (isQtSlot(slot) || isQtSignal(slot))
     {
@@ -976,7 +371,7 @@ void *sipConvertRxEx(sipWrapper *txSelf,const char *sig,PyObject *rxObj,
 
         *memberp = slot;
 
-        if ((rx = sip_api_get_cpp_ptr((sipWrapper *)rxObj, sipQObjectClass)) == NULL)
+        if ((rx = sip_api_get_cpp_ptr((sipSimpleWrapper *)rxObj, sipQObjectType)) == NULL)
             return NULL;
 
         if (isQtSignal(slot))
@@ -986,7 +381,7 @@ void *sipConvertRxEx(sipWrapper *txSelf,const char *sig,PyObject *rxObj,
     }
 
     /* The slot is a Python signal so we need a universal slot to catch it. */
-    return createUniversalSlot(txSelf, sig, rxObj, slot, memberp, 0);
+    return createUniversalSlot(txSelf, sigargs, rxObj, slot, memberp, 0);
 }
 
 
@@ -994,11 +389,9 @@ void *sipConvertRxEx(sipWrapper *txSelf,const char *sig,PyObject *rxObj,
  * Connect a Qt signal or a Python signal to a Qt slot, a Qt signal, a Python
  * slot or a Python signal.  This is all possible combinations.
  */
-PyObject *sip_api_connect_rx(PyObject *txObj,const char *sig,PyObject *rxObj,
-                 const char *slot, int type)
+PyObject *sip_api_connect_rx(PyObject *txObj, const char *sig, PyObject *rxObj,
+        const char *slot, int type)
 {
-    sipWrapper *txSelf = (sipWrapper *)txObj;
-
     /* Handle Qt signals. */
     if (isQtSignal(sig))
     {
@@ -1006,7 +399,7 @@ PyObject *sip_api_connect_rx(PyObject *txObj,const char *sig,PyObject *rxObj,
         const char *member, *real_sig;
         int res;
 
-        if ((tx = sip_api_get_cpp_ptr(txSelf, sipQObjectClass)) == NULL)
+        if ((tx = sip_api_get_cpp_ptr((sipSimpleWrapper *)txObj, sipQObjectType)) == NULL)
             return NULL;
 
         real_sig = sig;
@@ -1014,7 +407,7 @@ PyObject *sip_api_connect_rx(PyObject *txObj,const char *sig,PyObject *rxObj,
         if ((tx = newSignal(tx, &amp;real_sig)) == NULL)
             return NULL;
 
-        if ((rx = sipConvertRxEx(txSelf, sig, rxObj, slot, &amp;member, 0)) == NULL)
+        if ((rx = sip_api_convert_rx((sipWrapper *)txObj, sig, rxObj, slot, &amp;member, 0)) == NULL)
             return NULL;
 
         res = sipQtSupport-&gt;qt_connect(tx, real_sig, rx, member, type);
@@ -1022,8 +415,10 @@ PyObject *sip_api_connect_rx(PyObject *txObj,const char *sig,PyObject *rxObj,
         return PyBool_FromLong(res);
     }
 
-    /* Handle Python signals. */
-    if (addSlotToPySigList(txSelf, sig, rxObj, slot) &lt; 0)
+    /* Handle Python signals.  Only PyQt3 will get this far. */
+    assert(sipQtSupport-&gt;qt_connect_py_signal);
+
+    if (sipQtSupport-&gt;qt_connect_py_signal(txObj, sig, rxObj, slot) &lt; 0)
         return NULL;
 
     Py_INCREF(Py_True);
@@ -1037,16 +432,15 @@ PyObject *sip_api_connect_rx(PyObject *txObj,const char *sig,PyObject *rxObj,
 PyObject *sip_api_disconnect_rx(PyObject *txObj,const char *sig,
                 PyObject *rxObj,const char *slot)
 {
-    sipWrapper *txSelf = (sipWrapper *)txObj;
-
     /* Handle Qt signals. */
     if (isQtSignal(sig))
     {
+        sipSimpleWrapper *txSelf = (sipSimpleWrapper *)txObj;
         void *tx, *rx;
         const char *member;
         int res;
 
-        if ((tx = sip_api_get_cpp_ptr(txSelf, sipQObjectClass)) == NULL)
+        if ((tx = sip_api_get_cpp_ptr(txSelf, sipQObjectType)) == NULL)
             return NULL;
 
         if ((rx = sipGetRx(txSelf, sig, rxObj, slot, &amp;member)) == NULL)
@@ -1070,8 +464,10 @@ PyObject *sip_api_disconnect_rx(PyObject *txObj,const char *sig,
         return PyBool_FromLong(res);
     }
 
-    /* Handle Python signals. */
-    removeSlotFromPySigList(txSelf,sig,rxObj,slot);
+    /* Handle Python signals.  Only PyQt3 will get this far. */
+    assert(sipQtSupport-&gt;qt_disconnect_py_signal);
+
+    sipQtSupport-&gt;qt_disconnect_py_signal(txObj, sig, rxObj, slot);
 
     Py_INCREF(Py_True);
     return Py_True;
@@ -1079,36 +475,9 @@ PyObject *sip_api_disconnect_rx(PyObject *txObj,const char *sig,
 
 
 /*
- * Remove a slot from a transmitter's Python signal list.
- */
-static void removeSlotFromPySigList(sipWrapper *txSelf,const char *sig,
-                    PyObject *rxObj,const char *slot)
-{
-    sipPySig *ps;
-
-    if ((ps = findPySignal(txSelf,sig)) != NULL)
-    {
-        sipSlotList **psrxp;
-
-        for (psrxp = &amp;ps -&gt; rxlist; *psrxp != NULL; psrxp = &amp;(*psrxp) -&gt; next)
-        {
-            sipSlotList *psrx = *psrxp;
-
-            if (isSameSlot(&amp;psrx -&gt; rx,rxObj,slot))
-            {
-                *psrxp = psrx -&gt; next;
-                sipFreeSlotList(psrx);
-                break;
-            }
-        }
-    }
-}
-
-
-/*
- * Free a sipSlot structure.
+ * Free the resources of a slot.
  */
-static void freeSlot(sipSlot *slot)
+void sip_api_free_sipslot(sipSlot *slot)
 {
     if (slot-&gt;name != NULL)
         sip_api_free(slot-&gt;name);
@@ -1121,16 +490,6 @@ static void freeSlot(sipSlot *slot)
 
 
 /*
- * Free a sipSlotList structure on the heap.
- */
-void sipFreeSlotList(sipSlotList *rx)
-{
-    freeSlot(&amp;rx-&gt;rx);
-    sip_api_free(rx);
-}
-
-
-/*
  * Implement strdup() using sip_api_malloc().
  */
 static char *sipStrdup(const char *s)
@@ -1149,7 +508,7 @@ static char *sipStrdup(const char *s)
  * Qt signal, then the slot may be a Python signal or a Python slot.  If the
  * signal was a Python signal, then the slot may be anything.
  */
-static int saveSlot(sipSlot *sp, PyObject *rxObj, const char *slot)
+int sip_api_save_slot(sipSlot *sp, PyObject *rxObj, const char *slot)
 {
     sp -&gt; weakSlot = NULL;
 
@@ -1185,7 +544,7 @@ static int saveSlot(sipSlot *sp, PyObject *rxObj, const char *slot)
 
             if (PyCFunction_Check(rxObj) &amp;&amp;
                 (self = PyCFunction_GET_SELF(rxObj)) != NULL &amp;&amp;
-                sip_api_wrapper_check(self))
+                PyObject_TypeCheck(self, (PyTypeObject *)&amp;sipSimpleWrapper_Type))
             {
                 /*
                  * It is a wrapped C++ class method.  We can't keep a copy</diff>
      <filename>siplib/qtlib.c</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 /*
  * The SIP module interface.
  *
- * Copyright (c) 2008 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
+ * Copyright (c) 2009 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;
  * 
  * This file is part of SIP.
  * 
@@ -50,8 +50,8 @@ extern &quot;C&quot; {
 /*
  * Define the SIP version number.
  */
-#define SIP_VERSION         0x040708
-#define SIP_VERSION_STR     &quot;4.7.8-snapshot-20081102&quot;
+#define SIP_VERSION         0x040800
+#define SIP_VERSION_STR     &quot;4.8-snapshot-20090225&quot;
 
 
 /*
@@ -64,7 +64,9 @@ extern &quot;C&quot; {
  *
  * History:
  *
- * 3.8  Added sip_api_register_meta_type() and sip_api_deprecated().
+ * 4.0  Much refactoring.
+ *
+ * 3.8  Added sip_api_register_qt_metatype() and sip_api_deprecated().
  *      Added qt_register_meta_type() to the Qt support API.
  *      The C/C++ names of enums and types are now always defined in the
  *      relevant structures and don't default to the Python name.
@@ -134,8 +136,8 @@ extern &quot;C&quot; {
  *
  * 0.0  Original version.
  */
-#define SIP_API_MAJOR_NR    3
-#define SIP_API_MINOR_NR    8
+#define SIP_API_MAJOR_NR    4
+#define SIP_API_MINOR_NR    0
 
 
 /* Some compatibility stuff to help with handwritten code for SIP v3. */
@@ -180,7 +182,7 @@ typedef int sip_gilstate_t;
 
 
 /*
- * The metatype of a wrapper type.
+ * The meta-type of a wrapper type.
  */
 typedef struct _sipWrapperType {
     /*
@@ -189,26 +191,23 @@ typedef struct _sipWrapperType {
      */
     PyHeapTypeObject super;
 
-    /* The additional type information. */
+    /* The generated type structure. */
     struct _sipTypeDef *type;
 
     /* The list of init extenders. */
     struct _sipInitExtenderDef *iextend;
 
-    /* The optional PyQt defined Q_OBJECT information. */
-    void *qt_qobject;
+    /* Set if the type's dictionary contains all lazy attributes. */
+    int dict_complete;
 } sipWrapperType;
 
 
 /*
- * The type of a C/C++ wrapper object.
+ * The type of a simple C/C++ wrapper object.
  */
-typedef struct _sipWrapper {
+typedef struct _sipSimpleWrapper {
     PyObject_HEAD
 
-    /* For the user to use. */
-    PyObject *user;
-
     union {
         /* C/C++ object pointer. */
         void *cppPtr;
@@ -220,14 +219,23 @@ typedef struct _sipWrapper {
     /* Object flags. */
     int flags;
 
+    /* For the user to use. */
+    PyObject *user;
+
     /* The instance dictionary. */
     PyObject *dict;
 
-    /* Python signal list (complex). */
-    struct _sipPySig *pySigList;
-
     /* Next object at this address. */
-    struct _sipWrapper *next;
+    struct _sipSimpleWrapper *next;
+} sipSimpleWrapper;
+
+
+/*
+ * The type of a C/C++ wrapper object that supports parent/child relationships.
+ */
+typedef struct _sipWrapper {
+    /* The super-type. */
+    sipSimpleWrapper super;
 
     /* First child object. */
     struct _sipWrapper *first_child;
@@ -244,24 +252,41 @@ typedef struct _sipWrapper {
 
 
 /*
+ * The meta-type of an enum type.  (This is exposed only to support the
+ * deprecated sipConvertFromNamedEnum() macro.)
+ */
+typedef struct _sipEnumTypeObject {
+    /*
+     * The super-metatype.  This must be first in the structure so that it can
+     * be cast to a PyTypeObject *.
+     */
+    PyHeapTypeObject super;
+
+    /* The generated type structure. */
+    struct _sipTypeDef *type;
+} sipEnumTypeObject;
+
+
+/*
  * Some convenient function pointers.
  */
-typedef void *(*sipInitFunc)(sipWrapper *, PyObject *, sipWrapper **, int *);
+typedef void *(*sipInitFunc)(sipSimpleWrapper *, PyObject *, sipWrapper **,
+        int *);
 typedef int (*sipTraverseFunc)(void *, visitproc, void *);
 typedef int (*sipClearFunc)(void *);
 typedef SIP_SSIZE_T (*sipBufferFunc)(PyObject *, void *, SIP_SSIZE_T, void **);
 typedef SIP_SSIZE_T (*sipSegCountFunc)(PyObject *, void *, SIP_SSIZE_T *);
-typedef void (*sipDeallocFunc)(sipWrapper *);
-typedef void *(*sipCastFunc)(void *, sipWrapperType *);
-typedef sipWrapperType *(*sipSubClassConvertFunc)(void **);
-typedef void *(*sipForceConvertToFunc)(PyObject *, int *);
+typedef void (*sipDeallocFunc)(sipSimpleWrapper *);
+typedef void *(*sipCastFunc)(void *, const struct _sipTypeDef *);
+typedef const struct _sipTypeDef *(*sipSubClassConvertFunc)(void **);
 typedef int (*sipConvertToFunc)(PyObject *, void **, int *, PyObject *);
 typedef PyObject *(*sipConvertFromFunc)(void *, PyObject *);
 typedef int (*sipVirtHandlerFunc)(void *, PyObject *, ...);
-typedef int (*sipEmitFunc)(sipWrapper *, PyObject *);
 typedef void (*sipReleaseFunc)(void *, int);
 typedef PyObject *(*sipPickleFunc)(void *);
-typedef void (*sipAssignFunc)(void *, const void *);
+typedef int (*sipAttrGetterFunc)(const struct _sipTypeDef *, PyObject *);
+typedef PyObject *(*sipVariableGetterFunc)(void *, PyObject *);
+typedef int (*sipVariableSetterFunc)(void *, PyObject *);
 
 
 /*
@@ -295,32 +320,11 @@ typedef struct _sipEnumMemberDef {
 
 
 /*
- * The information describing a named enum.
- */
-typedef struct _sipEnumDef {
-    /*
-     * The Python name of the enum.  This includes the name of the containing
-     * module which should be removed when SIP_API_MAJOR_NR is moved to 4.
-     */
-    const char *e_name;
-
-    /* The C/C++ name of the enum. */
-    const char *e_cname;
-
-    /* The scoping type. */
-    int e_scope;
-
-    /* The Python slots. */
-    struct _sipPySlotDef *e_pyslots;
-} sipEnumDef;
-
-
-/*
  * The information describing static instances.
  */
 typedef struct _sipInstancesDef {
-    /* The classes. */
-    struct _sipClassInstanceDef *id_class;
+    /* The types. */
+    struct _sipTypeInstanceDef *id_type;
 
     /* The void *. */
     struct _sipVoidPtrInstanceDef *id_voidp;
@@ -348,9 +352,6 @@ typedef struct _sipInstancesDef {
 
     /* The doubles. */
     struct _sipDoubleInstanceDef *id_double;
-
-    /* The enums. */
-    struct _sipEnumInstanceDef *id_enum;
 } sipInstancesDef;
 
 
@@ -380,7 +381,7 @@ typedef struct _sipSubClassConvertorDef {
     sipEncodedClassDef scc_base;
 
     /* The base type. */
-    sipWrapperType *scc_basetype;
+    struct _sipTypeDef *scc_basetype;
 } sipSubClassConvertorDef;
 
 
@@ -467,156 +468,193 @@ typedef struct _sipPySlotExtenderDef {
 
 
 /*
- * This enumerates the different dynamic signal argument types.
- */
-typedef enum {
-    unknown_sat,
-    char_sat,
-    uchar_sat,
-    string_sat,
-    ustring_sat,
-    short_sat,
-    ushort_sat,
-    int_sat,
-    uint_sat,
-    long_sat,
-    ulong_sat,
-    longlong_sat,
-    ulonglong_sat,
-    float_sat,
-    double_sat,
-    enum_sat,
-    bool_sat,
-    void_sat,
-    class_sat,
-    classp_sat,
-    mtype_sat,
-    mtypep_sat,
-    qvariant_sat,
-    qvariantp_sat,
-    pyobject_sat,
-    schar_sat,
-    sstring_sat,
-    wchar_sat,
-    wstring_sat
-} sipSigArgType;
-
-
-/*
  * The information describing a typedef.
  */
 typedef struct _sipTypedefDef {
     /* The typedef name. */
     const char *tdd_name;
 
-    /* The typedef type. */
-    sipSigArgType tdd_type;
-
-    /* The type name for enum_sat, class_sat and mtype_sat. */
+    /* The typedef value. */
     const char *tdd_type_name;
-
-    /* The defining module, NULL if the current one. */
-    const char *tdd_mod_name;
 } sipTypedefDef;
 
 
 /*
- * The information describing a type.
+ * The information describing a variable.
+ */
+typedef struct _sipVariableDef {
+    /* The variable name. */
+    const char *vd_name;
+
+    /* The variable getter. */
+    sipVariableGetterFunc vd_getter;
+
+    /* The variable setter.  It is NULL if the variable is const. */
+    sipVariableSetterFunc vd_setter;
+
+    /* This is set if the variable is static. */
+    int vd_is_static;
+} sipVariableDef;
+
+
+/*
+ * The information describing a type, either a C++ class (or C struct), a C++
+ * namespace, a mapped type or a named enum.
  */
 typedef struct _sipTypeDef {
-    /* The module. */
+    /* The version number, 0 if the type isn't versioned. */
+    unsigned td_version_nr;
+
+    /* The next version of this type. */
+    struct _sipTypeDef *td_next_version;
+
+    /* The module, 0 if the type hasn't been initialised. */
     struct _sipExportedModuleDef *td_module;
 
     /* Type flags, see the sipType*() macros. */
     int td_flags;
 
+    /* The C/C++ name of the type. */
+    int td_cname;
+
     /*
-     * The Python name of the type.  This includes the name of the containing
-     * module which should be removed when SIP_API_MAJOR_NR is moved to 4.
+     * The Python type object.  This needs to be a union until we remove the
+     * deprecated sipClass_* macros.
      */
-    const char *td_name;
+    union {
+        PyTypeObject *td_py_type;
+        sipWrapperType *td_wrapper_type;
+    } u;
+} sipTypeDef;
 
-    /* The C/C++ name of the type. */
-    const char *td_cname;
 
-    /* The scoping type. */
-    sipEncodedClassDef td_scope;
+/*
+ * The information describing a C++ class (or C struct) or a C++ namespace.
+ */
+typedef struct _sipClassTypeDef {
+    /* The base type information. */
+    sipTypeDef ctd_base;
+
+    /* The Python name of the type, -1 if this is a namespace extender. */
+    int ctd_name;
+
+    /*
+     * The meta-type name, -1 to use the meta-type of the first super-type
+     * (normally sipWrapperType).
+     */
+    int ctd_metatype;
+
+    /* The super-type name, -1 to use sipWrapper. */
+    int ctd_supertype;
+
+    /*
+     * The scoping type or the namespace this is extending if it is a namespace
+     * extender.
+     */
+    sipEncodedClassDef ctd_scope;
 
     /* The super-types. */
-    sipEncodedClassDef *td_supers;
+    sipEncodedClassDef *ctd_supers;
 
     /* The table of Python slots. */
-    sipPySlotDef *td_pyslots;
+    sipPySlotDef *ctd_pyslots;
 
     /* The number of lazy methods. */
-    int td_nrmethods;
+    int ctd_nrmethods;
 
     /* The table of lazy methods. */
-    PyMethodDef *td_methods;
+    PyMethodDef *ctd_methods;
 
     /* The number of lazy enum members. */
-    int td_nrenummembers;
+    int ctd_nrenummembers;
 
     /* The table of lazy enum members. */
-    sipEnumMemberDef *td_enummembers;
+    sipEnumMemberDef *ctd_enummembers;
 
-    /* The variable table. */
-    PyMethodDef *td_variables;
+    /* The number of variables. */
+    int ctd_nrvariables;
+
+    /* The table of variables. */
+    sipVariableDef *ctd_variables;
 
     /* The initialisation function. */
-    sipInitFunc td_init;
+    sipInitFunc ctd_init;
 
     /* The traverse function. */
-    sipTraverseFunc td_traverse;
+    sipTraverseFunc ctd_traverse;
 
     /* The clear function. */
-    sipClearFunc td_clear;
+    sipClearFunc ctd_clear;
 
     /* The read buffer function. */
-    sipBufferFunc td_readbuffer;
+    sipBufferFunc ctd_readbuffer;
 
     /* The write buffer function. */
-    sipBufferFunc td_writebuffer;
+    sipBufferFunc ctd_writebuffer;
 
     /* The segment count function. */
-    sipSegCountFunc td_segcount;
+    sipSegCountFunc ctd_segcount;
 
     /* The char buffer function. */
-    sipBufferFunc td_charbuffer;
+    sipBufferFunc ctd_charbuffer;
 
     /* The deallocation function. */
-    sipDeallocFunc td_dealloc;
+    sipDeallocFunc ctd_dealloc;
+
+    /* The release function, 0 if a C strict. */
+    sipReleaseFunc ctd_release;
 
     /* The cast function, 0 if a C struct. */
-    sipCastFunc td_cast;
+    sipCastFunc ctd_cast;
+
+    /* The optional convert to function. */
+    sipConvertToFunc ctd_cto;
+
+    /* The static instances. */
+    sipInstancesDef ctd_instances;
+
+    /* The next namespace extender. */
+    struct _sipClassTypeDef *ctd_nsextender;
+
+    /* The pickle function. */
+