From 785d93d9fb948bddf51ac22a8b2bd5cb82cb7ba9 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 15 Mar 2014 21:18:46 +0000 Subject: [PATCH] html fixes and section updates --- Doc/Manual/Allegrocl.html | 108 ++++++++--------- Doc/Manual/Android.html | 16 +-- Doc/Manual/Arguments.html | 22 ++-- Doc/Manual/CPlusPlus11.html | 67 ++++++----- Doc/Manual/CSharp.html | 57 ++++----- Doc/Manual/Chicken.html | 40 +++---- Doc/Manual/Contents.html | 160 +++++++++++++++++++------ Doc/Manual/Contract.html | 10 +- Doc/Manual/Customization.html | 32 ++--- Doc/Manual/D.html | 44 +++---- Doc/Manual/Extending.html | 100 ++++++++-------- Doc/Manual/Go.html | 34 +++--- Doc/Manual/Guile.html | 42 +++---- Doc/Manual/Java.html | 215 +++++++++++++++++----------------- Doc/Manual/Library.html | 41 +++---- Doc/Manual/Lisp.html | 22 ++-- Doc/Manual/Lua.html | 124 ++++++++++++-------- Doc/Manual/Modula3.html | 40 +++---- Doc/Manual/Modules.html | 16 +-- Doc/Manual/Mzscheme.html | 8 +- Doc/Manual/Ocaml.html | 62 +++++----- Doc/Manual/Octave.html | 48 ++++---- Doc/Manual/Perl5.html | 108 ++++++++--------- Doc/Manual/Php.html | 48 ++++---- Doc/Manual/Pike.html | 24 ++-- Doc/Manual/Preprocessor.html | 26 ++-- Doc/Manual/Python.html | 177 ++++++++++++++-------------- Doc/Manual/R.html | 16 +-- Doc/Manual/Ruby.html | 196 +++++++++++++++---------------- Doc/Manual/SWIGPlus.html | 1 + Doc/Manual/Tcl.html | 92 +++++++-------- Doc/Manual/Typemaps.html | 124 ++++++++++---------- Doc/Manual/Varargs.html | 20 ++-- Doc/Manual/Warnings.html | 36 +++--- 34 files changed, 1152 insertions(+), 1024 deletions(-) diff --git a/Doc/Manual/Allegrocl.html b/Doc/Manual/Allegrocl.html index 173777231..8295bad1c 100644 --- a/Doc/Manual/Allegrocl.html +++ b/Doc/Manual/Allegrocl.html @@ -8,7 +8,7 @@ -

17 SWIG and Allegro Common Lisp

+

18 SWIG and Allegro Common Lisp

-

17.2.2 Foreign Wrappers

+

18.2.2 Foreign Wrappers

@@ -512,7 +512,7 @@ interested in generating an interface to C++. typemap.

-

17.2.3 FFI Wrappers

+

18.2.3 FFI Wrappers

@@ -593,7 +593,7 @@ char *xxx(); ff:def-foreign-call's.

-

17.2.4 Non-overloaded Defuns

+

18.2.4 Non-overloaded Defuns

@@ -606,7 +606,7 @@ char *xxx(); this function can be manipulated via the lout typemap.

-

17.2.5 Overloaded Defuns

+

18.2.5 Overloaded Defuns

@@ -622,7 +622,7 @@ char *xxx(); can be manipulated via the lout typemap.

-

17.2.6 What about constant and variable access?

+

18.2.6 What about constant and variable access?

@@ -635,7 +635,7 @@ char *xxx(); into the foreign module.

-

17.2.7 Object Wrapping

+

18.2.7 Object Wrapping

@@ -657,7 +657,7 @@ char *xxx(); foreign function interface.

-

17.3 Wrapping Details

+

18.3 Wrapping Details

@@ -665,7 +665,7 @@ char *xxx(); translated into lisp.

-

17.3.1 Namespaces

+

18.3.1 Namespaces

@@ -742,7 +742,7 @@ namespace car { function such as (car '(1 2 3).

-

17.3.2 Constants

+

18.3.2 Constants

@@ -803,7 +803,7 @@ namespace car { not use the -nocwrap command-line option.

-

17.3.3 Variables

+

18.3.3 Variables

@@ -881,7 +881,7 @@ globalvar> (globalvar.nnn::glob_float) -

17.3.4 Enumerations

+

18.3.4 Enumerations

@@ -957,7 +957,7 @@ EXPORT const int ACL_ENUM___FOO3__SWIG_0 = FOO3; -

17.3.5 Arrays

+

18.3.5 Arrays

@@ -1105,10 +1105,10 @@ namespace BAR { -

17.3.6 Classes and Structs and Unions (oh my!)

+

18.3.6 Classes and Structs and Unions (oh my!)

-

17.3.6.1 CLOS wrapping of

+

18.3.6.1 CLOS wrapping of

@@ -1123,7 +1123,7 @@ namespace BAR { integer values.

-

17.3.6.2 CLOS Inheritance

+

18.3.6.2 CLOS Inheritance

@@ -1136,7 +1136,7 @@ namespace BAR { parameter.

-

17.3.6.3 Member fields and functions

+

18.3.6.3 Member fields and functions

@@ -1152,7 +1152,7 @@ namespace BAR { the interface does nothing for friend directives,

-

17.3.6.4 Why not directly access C++ classes using foreign types?

+

18.3.6.4 Why not directly access C++ classes using foreign types?

@@ -1170,11 +1170,11 @@ namespace BAR { use the more robust wrapper functions.

-

17.3.7 Templates

+

18.3.7 Templates

-

17.3.7.1 Generating wrapper code for templates

+

18.3.7.1 Generating wrapper code for templates

@@ -1187,7 +1187,7 @@ namespace BAR { directive.

-

17.3.7.2 Implicit Template instantiation

+

18.3.7.2 Implicit Template instantiation

@@ -1197,7 +1197,7 @@ namespace BAR { class schema.

-

17.3.8 Typedef, Templates, and Synonym Types

+

18.3.8 Typedef, Templates, and Synonym Types

@@ -1277,7 +1277,7 @@ synonym> -

17.3.8.1 Choosing a primary type

+

18.3.8.1 Choosing a primary type

@@ -1298,7 +1298,7 @@ synonym> -

17.3.9 Function overloading/Parameter defaulting

+

18.3.9 Function overloading/Parameter defaulting

@@ -1461,7 +1461,7 @@ overload> -

17.3.10 Operator wrapping and Operator overloading

+

18.3.10 Operator wrapping and Operator overloading

@@ -1607,7 +1607,7 @@ opoverload> -

17.3.11 Varargs

+

18.3.11 Varargs

@@ -1628,7 +1628,7 @@ opoverload> with other ways such functions can be wrapped.

-

17.3.12 C++ Exceptions

+

18.3.12 C++ Exceptions

@@ -1640,7 +1640,7 @@ opoverload> implemented.

-

17.3.13 Pass by value, pass by reference

+

18.3.13 Pass by value, pass by reference

@@ -1652,7 +1652,7 @@ opoverload> newly defined types.

-

17.4 Typemaps

+

18.4 Typemaps

@@ -1663,7 +1663,7 @@ opoverload> on Typemaps for more information.

-

17.4.1 Code Generation in the C++ Wrapper

+

18.4.1 Code Generation in the C++ Wrapper

@@ -1693,7 +1693,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN) -

17.4.1.1 IN Typemap

+

18.4.1.1 IN Typemap

@@ -1728,7 +1728,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN) -

17.4.1.2 OUT Typemap

+

18.4.1.2 OUT Typemap

@@ -1752,7 +1752,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN) -

17.4.1.3 CTYPE Typemap

+

18.4.1.3 CTYPE Typemap

@@ -1784,7 +1784,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN) these common typemaps here.

-

17.4.2 Code generation in Lisp wrappers

+

18.4.2 Code generation in Lisp wrappers

@@ -1803,7 +1803,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN) 16.3.1 Namespaces for details.

-

17.4.2.1 LIN Typemap

+

18.4.2.1 LIN Typemap

@@ -1846,7 +1846,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN) -

17.4.2.2 LOUT Typemap

+

18.4.2.2 LOUT Typemap

@@ -1889,7 +1889,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN) -

17.4.2.3 FFITYPE Typemap

+

18.4.2.3 FFITYPE Typemap

@@ -1939,7 +1939,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN) -

17.4.2.4 LISPTYPE Typemap

+

18.4.2.4 LISPTYPE Typemap

@@ -1959,7 +1959,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN) -

17.4.2.5 LISPCLASS Typemap

+

18.4.2.5 LISPCLASS Typemap

@@ -1983,7 +1983,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN) -

17.4.3 Modifying SWIG behavior using typemaps

+

18.4.3 Modifying SWIG behavior using typemaps

@@ -2017,10 +2017,10 @@ return-val wrapper-name(parm0, parm1, ..., parmN) -

17.5 Identifier Converter functions

+

18.5 Identifier Converter functions

-

17.5.1 Creating symbols in the lisp environment

+

18.5.1 Creating symbols in the lisp environment

@@ -2041,11 +2041,11 @@ return-val wrapper-name(parm0, parm1, ..., parmN) of arguments.

-

17.5.2 Existing identifier-converter functions

+

18.5.2 Existing identifier-converter functions

Two basic identifier routines have been defined. -

17.5.2.1 identifier-convert-null

+

18.5.2.1 identifier-convert-null

@@ -2054,7 +2054,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN) strings, from which a symbol will be created.

-

17.5.2.2 identifier-convert-lispify

+

18.5.2.2 identifier-convert-lispify

@@ -2063,7 +2063,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN) same symbol transformations.

-

17.5.2.3 Default identifier to symbol conversions

+

18.5.2.3 Default identifier to symbol conversions

@@ -2072,7 +2072,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN) default naming conventions.

-

17.5.3 Defining your own identifier-converter

+

18.5.3 Defining your own identifier-converter

@@ -2128,7 +2128,7 @@ indicating the number of arguments passed to the routine indicated by this identifier.

-

17.5.4 Instructing SWIG to use a particular identifier-converter

+

18.5.4 Instructing SWIG to use a particular identifier-converter

diff --git a/Doc/Manual/Android.html b/Doc/Manual/Android.html index e02271169..e62139797 100644 --- a/Doc/Manual/Android.html +++ b/Doc/Manual/Android.html @@ -5,7 +5,7 @@ -

18 SWIG and Android

+

19 SWIG and Android

-

9.1.3 Output parameters

+

10.1.3 Output parameters

@@ -314,7 +314,7 @@ iresult, dresult = foo(3.5, 2) -

9.1.4 Input/Output parameters

+

10.1.4 Input/Output parameters

@@ -379,7 +379,7 @@ rather than directly overwriting the value of the original input object. SWIG. Backwards compatibility is preserved, but deprecated.

-

9.1.5 Using different names

+

10.1.5 Using different names

@@ -413,7 +413,7 @@ Typemap declarations are lexically scoped so a typemap takes effect from the poi file or a matching %clear declaration.

-

9.2 Applying constraints to input values

+

10.2 Applying constraints to input values

@@ -423,7 +423,7 @@ insure that a value is positive, or that a pointer is non-NULL. This can be accomplished including the constraints.i library file.

-

9.2.1 Simple constraint example

+

10.2.1 Simple constraint example

@@ -449,7 +449,7 @@ the arguments violate the constraint condition, a scripting language exception will be raised. As a result, it is possible to catch bad values, prevent mysterious program crashes and so on.

-

9.2.2 Constraint methods

+

10.2.2 Constraint methods

@@ -465,7 +465,7 @@ NONNULL Non-NULL pointer (pointers only). -

9.2.3 Applying constraints to new datatypes

+

10.2.3 Applying constraints to new datatypes

diff --git a/Doc/Manual/CPlusPlus11.html b/Doc/Manual/CPlusPlus11.html index ed2edd630..ce9174254 100644 --- a/Doc/Manual/CPlusPlus11.html +++ b/Doc/Manual/CPlusPlus11.html @@ -23,6 +23,7 @@

  • Lambda functions and expressions
  • Alternate function syntax
  • Object construction improvement +
  • Explicit overrides and final
  • Null pointer constant
  • Strongly typed enumerations
  • Double angle brackets @@ -36,13 +37,16 @@
  • Explicitly defaulted functions and deleted functions
  • Type long long int
  • Static assertions -
  • Allow sizeof to work on members of classes without an explicit object +
  • Allow sizeof to work on members of classes without an explicit object
  • Exception specifications and noexcept +
  • Control and query object alignment +
  • Attributes
  • Standard library changes -

    19.8.5 Date example demonstrating the 'pre' and 'post' typemap attributes for directors

    +

    20.8.5 Date example demonstrating the 'pre' and 'post' typemap attributes for directors

    @@ -2414,7 +2415,7 @@ Pay special attention to the memory management issues, using these attributes.

    -

    19.8.6 Turning wrapped classes into partial classes

    +

    20.8.6 Turning wrapped classes into partial classes

    @@ -2514,7 +2515,7 @@ demonstrating that the class contains methods calling both unmanaged code - The following example is an alternative approach to adding managed code to the generated proxy class.

    -

    19.8.7 Extending proxy classes with additional C# code

    +

    20.8.7 Extending proxy classes with additional C# code

    @@ -2553,7 +2554,7 @@ public class ExtendMe : global::System.IDisposable { -

    19.8.8 Underlying type for enums

    +

    20.8.8 Underlying type for enums

    diff --git a/Doc/Manual/Chicken.html b/Doc/Manual/Chicken.html index 4e43b9b90..82861c31c 100644 --- a/Doc/Manual/Chicken.html +++ b/Doc/Manual/Chicken.html @@ -8,7 +8,7 @@ -

    20 SWIG and Chicken

    +

    21 SWIG and Chicken

      @@ -72,7 +72,7 @@

      -

      20.1 Preliminaries

      +

      21.1 Preliminaries

      @@ -89,7 +89,7 @@ directory for the basic steps to run SWIG CHICKEN.

      -

      20.1.1 Running SWIG in C mode

      +

      21.1.1 Running SWIG in C mode

      @@ -122,7 +122,7 @@ object files and linked into your project.

      -

      20.1.2 Running SWIG in C++ mode

      +

      21.1.2 Running SWIG in C++ mode

      @@ -151,10 +151,10 @@ object files and linked into your project.

      -

      20.2 Code Generation

      +

      21.2 Code Generation

      -

      20.2.1 Naming Conventions

      +

      21.2.1 Naming Conventions

      @@ -170,7 +170,7 @@ %rename SWIG directive in the SWIG interface file.

      -

      20.2.2 Modules

      +

      21.2.2 Modules

      @@ -192,7 +192,7 @@ (uses modulename)) CHICKEN Scheme form.

      -

      20.2.3 Constants and Variables

      +

      21.2.3 Constants and Variables

      @@ -229,7 +229,7 @@ for info on how to apply the %feature.

      -

      20.2.4 Functions

      +

      21.2.4 Functions

      @@ -248,7 +248,7 @@ parameters). The return values can then be accessed with (call-with-values).

      -

      20.2.5 Exceptions

      +

      21.2.5 Exceptions

      The SWIG chicken module has support for exceptions thrown from @@ -290,7 +290,7 @@

    -

    20.3 TinyCLOS

    +

    21.3 TinyCLOS

    @@ -333,7 +333,7 @@

    -

    20.4 Linkage

    +

    21.4 Linkage

    @@ -354,7 +354,7 @@

    -

    20.4.1 Static binary or shared library linked at compile time

    +

    21.4.1 Static binary or shared library linked at compile time

    We can easily use csc to build a static binary.

    @@ -395,7 +395,7 @@ in which case the test script does not need to be linked with example.so. The t be run with csi.

    -

    20.4.2 Building chicken extension libraries

    +

    21.4.2 Building chicken extension libraries

    Building a shared library like in the above section only works if the library @@ -453,7 +453,7 @@ distributed and used by anyone, even if SWIG is not installed.

    See the Examples/chicken/egg directory in the SWIG source for an example that builds two eggs, one using the first method and one using the second method.

    -

    20.4.3 Linking multiple SWIG modules with TinyCLOS

    +

    21.4.3 Linking multiple SWIG modules with TinyCLOS

    Linking together multiple modules that share type information using the %import @@ -477,7 +477,7 @@ with (declare (uses ...)). To create an extension library or an egg, just create a module_load.scm file that (declare (uses ...)) all the modules.

    -

    20.5 Typemaps

    +

    21.5 Typemaps

    @@ -486,7 +486,7 @@ all the modules.

    Lib/chicken/chicken.swg.

    -

    20.6 Pointers

    +

    21.6 Pointers

    @@ -519,7 +519,7 @@ all the modules.

    type. flags is either zero or SWIG_POINTER_DISOWN (see below).

    -

    20.6.1 Garbage collection

    +

    21.6.1 Garbage collection

    If the owner flag passed to SWIG_NewPointerObj is 1, NewPointerObj will add a @@ -550,7 +550,7 @@ all the modules.

    must be called manually.

    -

    20.7 Unsupported features and known problems

    +

    21.7 Unsupported features and known problems

    -

    20.7.1 TinyCLOS problems with Chicken version <= 1.92

    +

    21.7.1 TinyCLOS problems with Chicken version <= 1.92

    In Chicken versions equal to or below 1.92, TinyCLOS has a limitation such that generic methods do not properly work on methods diff --git a/Doc/Manual/Contents.html b/Doc/Manual/Contents.html index 77280c8bc..de64429cb 100644 --- a/Doc/Manual/Contents.html +++ b/Doc/Manual/Contents.html @@ -262,7 +262,61 @@ -

    7 Preprocessing

    +

    7 SWIG and C++11

    + + + + + +

    8 Preprocessing

    @@ -285,7 +339,7 @@
    -

    8 SWIG library

    +

    9 SWIG library

    @@ -311,6 +365,7 @@
  • std::vector
  • STL exceptions
  • shared_ptr smart pointer +
  • auto_ptr smart pointer
  • Utility Libraries
  • Accessing protected members
  • Common customization features @@ -987,7 +1046,7 @@ -

    25 SWIG and Common Lisp

    +

    26 SWIG and Common Lisp

    @@ -1010,7 +1069,7 @@
    -

    26 SWIG and Lua

    +

    27 SWIG and Lua

    @@ -1029,8 +1088,11 @@
  • Functions
  • Global variables
  • Constants and enums +
  • Pointers -
  • Structures +
  • Structures
  • C++ classes
  • C++ inheritance
  • Pointers, references, values, and arrays @@ -1041,17 +1103,26 @@
  • C++ templates
  • C++ Smart Pointers
  • C++ Exceptions +
  • Namespaces + +
  • Compatibility Note +
  • Typemaps -
  • Writing typemaps +
  • Writing typemaps
  • Customization of your Bindings @@ -1069,7 +1140,7 @@ -

    27 SWIG and Modula-3

    +

    28 SWIG and Modula-3

    @@ -1107,7 +1178,7 @@
    -

    28 SWIG and MzScheme/Racket

    +

    29 SWIG and MzScheme/Racket

    @@ -1119,7 +1190,7 @@
    -

    29 SWIG and Ocaml

    +

    30 SWIG and Ocaml

    @@ -1170,7 +1241,7 @@
    -

    30 SWIG and Octave

    +

    31 SWIG and Octave

    @@ -1206,7 +1277,7 @@
    -

    31 SWIG and Perl5

    +

    32 SWIG and Perl5

    @@ -1269,11 +1340,20 @@
  • Modifying the proxy methods
  • Adding additional Perl code +
  • Cross language polymorphism + -

    32 SWIG and PHP

    +

    33 SWIG and PHP

    @@ -1313,7 +1393,7 @@
    -

    33 SWIG and Pike

    +

    34 SWIG and Pike

    @@ -1337,7 +1417,7 @@
    -

    34 SWIG and Python

    +

    35 SWIG and Python

    @@ -1437,6 +1517,12 @@
  • %feature("docstring")
  • Python Packages +
  • Python 3 Support
    • Function annotation @@ -1447,7 +1533,7 @@ -

      35 SWIG and R

      +

      36 SWIG and R

      @@ -1463,7 +1549,7 @@
      -

      36 SWIG and Ruby

      +

      37 SWIG and Ruby

      @@ -1597,7 +1683,7 @@
      -

      37 SWIG and Tcl

      +

      38 SWIG and Tcl

      @@ -1663,7 +1749,7 @@
      -

      38 Extending SWIG to support new languages

      +

      39 Extending SWIG to support new languages

      diff --git a/Doc/Manual/Contract.html b/Doc/Manual/Contract.html index de390fba4..35bc874ef 100644 --- a/Doc/Manual/Contract.html +++ b/Doc/Manual/Contract.html @@ -6,7 +6,7 @@ -

      12 Contracts

      +

      13 Contracts

        @@ -38,7 +38,7 @@ When one of the rules is violated by a script, a runtime exception is generated rather than having the program continue to execute.

        -

        12.1 The %contract directive

        +

        13.1 The %contract directive

        @@ -94,7 +94,7 @@ RuntimeError: Contract violation: require: (arg1>=0)

      -

      12.2 %contract and classes

      +

      13.2 %contract and classes

      @@ -173,7 +173,7 @@ specified for the derived class all must hold. In the above example, this means that both the arguments to Spam::bar must be positive.

      -

      12.3 Constant aggregation and %aggregate_check

      +

      13.3 Constant aggregation and %aggregate_check

      @@ -262,7 +262,7 @@ Regrettably, there is no automatic way to perform similar checks with enums valu release.

      -

      12.4 Notes

      +

      13.4 Notes

      diff --git a/Doc/Manual/Customization.html b/Doc/Manual/Customization.html index f420f42d6..a0a89c042 100644 --- a/Doc/Manual/Customization.html +++ b/Doc/Manual/Customization.html @@ -6,7 +6,7 @@ -

      11 Customization Features

      +

      12 Customization Features

        @@ -45,7 +45,7 @@ of exception handling is presented. Then, a more general-purpose customization mechanism known as "features" is described.

        -

        11.1 Exception handling with %exception

        +

        12.1 Exception handling with %exception

        @@ -100,7 +100,7 @@ for exception handling. That directive is deprecated--%exception provides the same functionality, but is substantially more flexible.

        -

        11.1.1 Handling exceptions in C code

        +

        12.1.1 Handling exceptions in C code

        @@ -166,7 +166,7 @@ Each target language has its own approach to creating a runtime error/exception and for Perl it is the croak method shown above.

        -

        11.1.2 Exception handling with longjmp()

        +

        12.1.2 Exception handling with longjmp()

        @@ -240,7 +240,7 @@ Note: This implementation is only intended to illustrate the general idea. To m modify it to handle nested try declarations.

        -

        11.1.3 Handling C++ exceptions

        +

        12.1.3 Handling C++ exceptions

        @@ -275,7 +275,7 @@ class OutOfMemory {};

      -

      11.1.4 Exception handlers for variables

      +

      12.1.4 Exception handlers for variables

      @@ -300,7 +300,7 @@ The %allowexception feature works like any other feature and so can be

      -

      11.1.5 Defining different exception handlers

      +

      12.1.5 Defining different exception handlers

      @@ -437,7 +437,7 @@ declarations. However, it never really worked that well and the new %exception directive is much better.

      -

      11.1.6 Special variables for %exception

      +

      12.1.6 Special variables for %exception

      @@ -540,7 +540,7 @@ Below shows the expansions for the 1st of the overloaded something wrap -

      11.1.7 Using The SWIG exception library

      +

      12.1.7 Using The SWIG exception library

      @@ -595,7 +595,7 @@ SWIG_NullReferenceError The SWIG_exception() function can also be used in typemaps.

      -

      11.2 Object ownership and %newobject

      +

      12.2 Object ownership and %newobject

      @@ -752,7 +752,7 @@ char *strdup(const char *s); The results might not be what you expect.

      -

      11.3 Features and the %feature directive

      +

      12.3 Features and the %feature directive

      @@ -834,7 +834,7 @@ The following are all equivalent: The syntax in the first variation will generate the { } delimiters used whereas the other variations will not.

      -

      11.3.1 Feature attributes

      +

      12.3.1 Feature attributes

      @@ -875,7 +875,7 @@ In the following example, MyExceptionClass is the name of the Java clas Further details can be obtained from the Java exception handling section.

      -

      11.3.2 Feature flags

      +

      12.3.2 Feature flags

      @@ -973,7 +973,7 @@ in the swig.swg Library file. The following shows the alternative synta The concept of clearing features is discussed next.

      -

      11.3.3 Clearing features

      +

      12.3.3 Clearing features

      @@ -1066,7 +1066,7 @@ The three macros below show this for the "except" feature: -

      11.3.4 Features and default arguments

      +

      12.3.4 Features and default arguments

      @@ -1141,7 +1141,7 @@ specifying or not specifying default arguments in a feature is not applicable as in SWIG-1.3.23 when the approach to wrapping methods with default arguments was changed.

      -

      11.3.5 Feature example

      +

      12.3.5 Feature example

      diff --git a/Doc/Manual/D.html b/Doc/Manual/D.html index 43fa69196..47dab50f1 100644 --- a/Doc/Manual/D.html +++ b/Doc/Manual/D.html @@ -6,7 +6,7 @@ -

      21 SWIG and D

      +

      22 SWIG and D

        @@ -41,7 +41,7 @@ -

        21.1 Introduction

        +

        22.1 Introduction

        From the D Programming Language web site: D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. [...] The D language is statically typed and compiles directly to machine code. As such, it is not very surprising that D is able to directly interface with C libraries. Why would a SWIG module for D be needed then in the first place?

        @@ -53,7 +53,7 @@

        To help addressing these issues, the SWIG C# module has been forked to support D. Is has evolved quite a lot since then, but there are still many similarities, so if you do not find what you are looking for on this page, it might be worth having a look at the chapter on C# (and also on Java, since the C# module was in turn forked from it).

        -

        21.2 Command line invocation

        +

        22.2 Command line invocation

        To activate the D module, pass the -d option to SWIG at the command line. The same standard command line switches as with any other language module are available, plus the following D specific ones:

        @@ -83,10 +83,10 @@ -

        21.3 Typemaps

        +

        22.3 Typemaps

        -

        21.3.1 C# <-> D name comparison

        +

        22.3.1 C# <-> D name comparison

        If you already know the SWIG C# module, you might find the following name comparison table useful:

        @@ -112,7 +112,7 @@
      -

      21.3.2 ctype, imtype, dtype

      +

      22.3.2 ctype, imtype, dtype

      Mapping of types between the C/C++ library, the C/C++ library wrapper exposing the C functions, the D wrapper module importing these functions and the D proxy code.

      @@ -120,7 +120,7 @@

      The ctype typemap is used to determine the types to use in the C wrapper functions. The types from the imtype typemap are used in the extern(C) declarations of these functions in the intermediary D module. The dtype typemap contains the D types used in the D proxy module/class.

      -

      21.3.3 in, out, directorin, directorout

      +

      22.3.3 in, out, directorin, directorout

      Used for converting between the types for C/C++ and D when generating the code for the wrapper functions (on the C++ side).

      @@ -130,7 +130,7 @@

      The directorin typemap is used to convert parameters to the type used in the D director callback function, its return value is processed by directorout (see below).

      -

      21.3.4 din, dout, ddirectorin, ddirectorout

      +

      22.3.4 din, dout, ddirectorin, ddirectorout

      Typemaps for code generation in D proxy and type wrapper classes.

      @@ -157,13 +157,13 @@ dtype DClass.method(dtype a) -

      21.3.5 typecheck typemaps

      +

      22.3.5 typecheck typemaps

      Because, unlike many scripting languages supported by SWIG, D does not need any dynamic dispatch helper to access an overloaded function, the purpose of these is merely to issue a warning for overloaded C++ functions that cannot be overloaded in D (as more than one C++ type maps to a single D type).

      -

      21.3.6 Code injection typemaps

      +

      22.3.6 Code injection typemaps

      These typemaps are used for generating the skeleton of proxy classes for C++ types.

      @@ -175,7 +175,7 @@

      dconstructor, ddestructor, ddispose and ddispose_derived are used to generate the class constructor, destructor and dispose() method, respectively. The auxiliary code for handling the pointer to the C++ object is stored in dbody and dbody_derived. You can override them for specific types.

      -

      21.3.7 Special variable macros

      +

      22.3.7 Special variable macros

      The standard SWIG special variables are available for use within typemaps as described in the Typemaps documentation, for example $1, $input, $result etc.

      @@ -295,7 +295,7 @@ $importtype(AnotherInterface) -

      21.4 %features

      +

      22.4 %features

      The D module defines a number of directives which modify the SWIG features set globally or for a specific declaration:

      @@ -325,7 +325,7 @@ struct A { -

      21.5 Pragmas

      +

      22.5 Pragmas

      There are a few SWIG pragmas specific to the D module, which you can use to influence the D code SWIG generates:

      @@ -364,7 +364,7 @@ struct A { -

      21.6 D Exceptions

      +

      22.6 D Exceptions

      Out of the box, C++ exceptions are fundamentally incompatible to their equivalent in the D world and cannot simply be propagated to a calling D method. There is, however, an easy way to solve this problem: Just catch the exception in the C/C++ wrapper layer, pass the contents to D, and make the wrapper code rethrow the exception in the D world.

      @@ -374,7 +374,7 @@ struct A {

      As this feature is implemented in exactly the same way it is for C#, please see the C# documentation for a more detailed explanation.

      -

      21.7 D Directors

      +

      22.7 D Directors

      When the directors feature is activated, SWIG generates extra code on both the C++ and the D side to enable cross-language polymorphism. Essentially, this means that if you subclass a proxy class in D, C++ code can access any overridden virtual methods just as if you created a derived class in C++.

      @@ -383,16 +383,16 @@ struct A {

      -

      21.8 Other features

      +

      22.8 Other features

      -

      21.8.1 Extended namespace support (nspace)

      +

      22.8.1 Extended namespace support (nspace)

      By default, SWIG flattens all C++ namespaces into a single target language namespace, but as for Java and C#, the nspace feature is supported for D. If it is active, C++ namespaces are mapped to D packages/modules. Note, however, that like for the other languages, free variables and functions are not supported yet; currently, they are all allows written to the main proxy D module.

      -

      21.8.2 Native pointer support

      +

      22.8.2 Native pointer support

      Contrary to many of the scripting languages supported by SWIG, D fully supports C-style pointers. The D module thus includes a custom mechanism to wrap C pointers directly as D pointers where applicable, that is, if the type that is pointed to is represented the same in C and D (on the bit-level), dubbed a primitive type below.

      @@ -404,7 +404,7 @@ struct A {

      To determine if a type should be considered primitive, the cprimitive attribute on its dtype attribute is used. For example, the dtype typemap for float has cprimitive="1", so the code from the nativepointer attribute is taken into account e.g. for float ** or the function pointer float (*)(float *).

      -

      21.8.3 Operator overloading

      +

      22.8.3 Operator overloading

      The D module comes with basic operator overloading support for both D1 and D2. There are, however, a few limitations arising from conceptual differences between C++ and D:

      @@ -416,7 +416,7 @@ struct A {

      There are also some cases where the operators can be translated to D, but the differences in the implementation details are big enough that a rather involved scheme would be required for automatic wrapping them, which has not been implemented yet. This affects, for example, the array subscript operator, [], in combination with assignments - while operator [] in C++ simply returns a reference which is then written to, D resorts to a separate opIndexAssign method -, or implicit casting (which was introduced in D2 via alias this). Despite the lack of automatic support, manually handling these cases should be perfectly possible.

      -

      21.8.4 Running the test-suite

      +

      22.8.4 Running the test-suite

      As with any other language, the SWIG test-suite can be built for D using the *-d-test-suite targets of the top-level Makefile. By default, D1 is targeted, to build it with D2, use the optional D_VERSION variable, e.g. make check-d-test-suite D_VERSION=2.

      @@ -424,14 +424,14 @@ struct A {

      Note: If you want to use GDC on Linux or another platform which requires you to link libdl for dynamically loading the shared library, you might have to add -ldl manually to the d_compile target in Examples/Makefile, because GDC does not currently honor the pragma(lib,...) statement.

      -

      21.9 D Typemap examples

      +

      22.9 D Typemap examples

      There are no D-specific typemap examples yet. However, with the above name comparison table, you should be able to get an idea what can be done by looking at the corresponding C# section.

      -

      21.10 Work in progress and planned features

      +

      22.10 Work in progress and planned features

      There are a couple of features which are not implemented yet, but would be very useful and might be added in the near future:

      diff --git a/Doc/Manual/Extending.html b/Doc/Manual/Extending.html index a8c15fe03..5cd89a280 100644 --- a/Doc/Manual/Extending.html +++ b/Doc/Manual/Extending.html @@ -6,7 +6,7 @@ -

      38 Extending SWIG to support new languages

      +

      39 Extending SWIG to support new languages

        @@ -75,7 +75,7 @@ -

        38.1 Introduction

        +

        39.1 Introduction

        @@ -91,7 +91,7 @@ Also, this chapter is not meant to be a hand-holding tutorial. As a starting po you should probably look at one of SWIG's existing modules.

        -

        38.2 Prerequisites

        +

        39.2 Prerequisites

        @@ -121,7 +121,7 @@ obvious, but almost all SWIG directives as well as the low-level generation of wrapper code are driven by C++ datatypes.

        -

        38.3 The Big Picture

        +

        39.3 The Big Picture

        @@ -158,7 +158,7 @@ role in making the system work. For example, both typemaps and declaration anno based on pattern matching and interact heavily with the underlying type system.

        -

        38.4 Execution Model

        +

        39.4 Execution Model

        @@ -203,7 +203,7 @@ latter stage of compilation. The next few sections briefly describe some of these stages.

        -

        38.4.1 Preprocessing

        +

        39.4.1 Preprocessing

        @@ -284,7 +284,7 @@ been expanded as well as everything else that goes into the low-level construction of the wrapper code.

        -

        38.4.2 Parsing

        +

        39.4.2 Parsing

        @@ -385,7 +385,7 @@ returning a foo and taking types a and b as arguments).

        -

        38.4.3 Parse Trees

        +

        39.4.3 Parse Trees

        @@ -640,7 +640,7 @@ $ swig -c++ -python -debug-module 4 example.i

      -

      38.4.4 Attribute namespaces

      +

      39.4.4 Attribute namespaces

      @@ -659,7 +659,7 @@ that matches the name of the target language. For example, python:foo perl:foo.

      -

      38.4.5 Symbol Tables

      +

      39.4.5 Symbol Tables

      @@ -750,7 +750,7 @@ example.i:5. Previous declaration is foo_i(int ) -

      38.4.6 The %feature directive

      +

      39.4.6 The %feature directive

      @@ -806,7 +806,7 @@ For example, the exception code above is simply stored without any modifications.

      -

      38.4.7 Code Generation

      +

      39.4.7 Code Generation

      @@ -928,7 +928,7 @@ public : The role of these functions is described shortly.

      -

      38.4.8 SWIG and XML

      +

      39.4.8 SWIG and XML

      @@ -941,7 +941,7 @@ internal data structures, it may be useful to keep XML in the back of your mind as a model.

      -

      38.5 Primitive Data Structures

      +

      39.5 Primitive Data Structures

      @@ -987,7 +987,7 @@ typedef Hash Typetab; -

      38.5.1 Strings

      +

      39.5.1 Strings

      @@ -1128,7 +1128,7 @@ Returns the number of replacements made (if any). -

      38.5.2 Hashes

      +

      39.5.2 Hashes

      @@ -1205,7 +1205,7 @@ Returns the list of hash table keys. -

      38.5.3 Lists

      +

      39.5.3 Lists

      @@ -1294,7 +1294,7 @@ If t is not a standard object, it is assumed to be a char * and is used to create a String object. -

      38.5.4 Common operations

      +

      39.5.4 Common operations

      The following operations are applicable to all datatypes. @@ -1349,7 +1349,7 @@ objects and report errors. Gets the line number associated with x. -

      38.5.5 Iterating over Lists and Hashes

      +

      39.5.5 Iterating over Lists and Hashes

      To iterate over the elements of a list or a hash table, the following functions are used: @@ -1394,7 +1394,7 @@ for (j = First(j); j.item; j= Next(j)) { -

      38.5.6 I/O

      +

      39.5.6 I/O

      Special I/O functions are used for all internal I/O. These operations @@ -1531,7 +1531,7 @@ Similarly, the preprocessor and parser all operate on string-files. -

      38.6 Navigating and manipulating parse trees

      +

      39.6 Navigating and manipulating parse trees

      Parse trees are built as collections of hash tables. Each node is a hash table in which @@ -1665,7 +1665,7 @@ Deletes a node from the parse tree. Deletion reconnects siblings and properly u the parent so that sibling nodes are unaffected. -

      38.7 Working with attributes

      +

      39.7 Working with attributes

      @@ -1782,7 +1782,7 @@ the attribute is optional. Swig_restore() must always be called after function. -

      38.8 Type system

      +

      39.8 Type system

      @@ -1791,7 +1791,7 @@ pointers, references, and pointers to members. A detailed discussion of type theory is impossible here. However, let's cover the highlights.

      -

      38.8.1 String encoding of types

      +

      39.8.1 String encoding of types

      @@ -1892,7 +1892,7 @@ make the final type, the two parts are just joined together using string concatenation.

      -

      38.8.2 Type construction

      +

      39.8.2 Type construction

      @@ -2061,7 +2061,7 @@ Returns the prefix of a type. For example, if ty is ty is unmodified. -

      38.8.3 Type tests

      +

      39.8.3 Type tests

      @@ -2148,7 +2148,7 @@ Checks if ty is a varargs type. Checks if ty is a templatized type. -

      38.8.4 Typedef and inheritance

      +

      39.8.4 Typedef and inheritance

      @@ -2250,7 +2250,7 @@ Fully reduces ty according to typedef rules. Resulting datatype will consist only of primitive typenames. -

      38.8.5 Lvalues

      +

      39.8.5 Lvalues

      @@ -2287,7 +2287,7 @@ Literal y; // type = 'Literal', ltype='p.char' -

      38.8.6 Output functions

      +

      39.8.6 Output functions

      @@ -2349,7 +2349,7 @@ SWIG, but is most commonly associated with type-descriptor objects that appear in wrappers (e.g., SWIGTYPE_p_double). -

      38.9 Parameters

      +

      39.9 Parameters

      @@ -2448,7 +2448,7 @@ included. Used to emit prototypes. Returns the number of required (non-optional) arguments in p. -

      38.10 Writing a Language Module

      +

      39.10 Writing a Language Module

      @@ -2463,7 +2463,7 @@ describes the creation of a minimal Python module. You should be able to extra this to other languages.

      -

      38.10.1 Execution model

      +

      39.10.1 Execution model

      @@ -2473,7 +2473,7 @@ the parsing of command line options, all aspects of code generation are controll different methods of the Language that must be defined by your module.

      -

      38.10.2 Starting out

      +

      39.10.2 Starting out

      @@ -2581,7 +2581,7 @@ that activates your module. For example, swig -python foo.i. The messages from your new module should appear.

      -

      38.10.3 Command line options

      +

      39.10.3 Command line options

      @@ -2640,7 +2640,7 @@ to mark the option as valid. If you forget to do this, SWIG will terminate wit unrecognized command line option error.

      -

      38.10.4 Configuration and preprocessing

      +

      39.10.4 Configuration and preprocessing

      @@ -2689,7 +2689,7 @@ an implementation file python.cxx and a configuration file python.swg.

      -

      38.10.5 Entry point to code generation

      +

      39.10.5 Entry point to code generation

      @@ -2747,7 +2747,7 @@ int Python::top(Node *n) { -

      38.10.6 Module I/O and wrapper skeleton

      +

      39.10.6 Module I/O and wrapper skeleton

      @@ -2896,7 +2896,7 @@ functionWrapper : void Shape_y_set(Shape *self,double y) -

      38.10.7 Low-level code generators

      +

      39.10.7 Low-level code generators

      @@ -3050,7 +3050,7 @@ but without the typemaps, there is still work to do.

      -

      38.10.8 Configuration files

      +

      39.10.8 Configuration files

      @@ -3194,7 +3194,7 @@ politely displays the ignoring language message. -

      38.10.9 Runtime support

      +

      39.10.9 Runtime support

      @@ -3203,7 +3203,7 @@ Discuss the kinds of functions typically needed for SWIG runtime support (e.g. the SWIG files that implement those functions.

      -

      38.10.10 Standard library files

      +

      39.10.10 Standard library files

      @@ -3222,7 +3222,7 @@ The following are the minimum that are usually supported: Please copy these and modify for any new language.

      -

      38.10.11 User examples

      +

      39.10.11 User examples

      @@ -3251,7 +3251,7 @@ during this process, see the section on .

      -

      38.10.12 Test driven development and the test-suite

      +

      39.10.12 Test driven development and the test-suite

      @@ -3310,7 +3310,7 @@ It is therefore essential that the runtime tests are written in a manner that di but error/exception out with an error message on stderr on failure.

      -

      38.10.12.1 Running the test-suite

      +

      39.10.12.1 Running the test-suite

      @@ -3502,7 +3502,7 @@ It can be run in the same way as the other language test-suites, replacing [lang The test cases used and the way it works is described in Examples/test-suite/errors/Makefile.in.

      -

      38.10.13 Documentation

      +

      39.10.13 Documentation

      @@ -3534,7 +3534,7 @@ Some topics that you'll want to be sure to address include: if available.

    -

    38.10.14 Prerequisites for adding a new language module to the SWIG distribution

    +

    39.10.14 Prerequisites for adding a new language module to the SWIG distribution

    @@ -3591,7 +3591,7 @@ should be added should there be an area not already covered by the existing tests.

    -

    38.10.15 Coding style guidelines

    +

    39.10.15 Coding style guidelines

    @@ -3615,7 +3615,7 @@ The generated C/C++ code should also follow this style as close as possible. How should be avoided as unlike the SWIG developers, users will never have consistent tab settings.

    -

    38.11 Debugging Options

    +

    39.11 Debugging Options

    @@ -3642,7 +3642,7 @@ There are various command line options which can aid debugging a SWIG interface The complete list of command line options for SWIG are available by running swig -help.

    -

    38.12 Guide to parse tree nodes

    +

    39.12 Guide to parse tree nodes

    @@ -4050,7 +4050,7 @@ extern "X" { ... } declaration. -

    38.13 Further Development Information

    +

    39.13 Further Development Information

    diff --git a/Doc/Manual/Go.html b/Doc/Manual/Go.html index 226acaabf..f970b02e8 100644 --- a/Doc/Manual/Go.html +++ b/Doc/Manual/Go.html @@ -5,7 +5,7 @@ -

    22 SWIG and Go

    +

    23 SWIG and Go

      @@ -43,7 +43,7 @@ the Go programming language see golang.org.

      -

      22.1 Overview

      +

      23.1 Overview

      @@ -67,7 +67,7 @@ checking and runtime library are not used with Go. This should be borne in mind when reading the rest of the SWIG documentation.

      -

      22.2 Running SWIG with Go

      +

      23.2 Running SWIG with Go

      @@ -76,7 +76,7 @@ default SWIG will generate code for the gc compilers. To generate code for gccgo, you should also use the -gccgo option.

      -

      22.2.1 Additional Commandline Options

      +

      23.2.1 Additional Commandline Options

      @@ -150,7 +150,7 @@ swig -go -help -

      22.2.2 Go Output Files

      +

      23.2.2 Go Output Files

      When generating Go code, SWIG will generate the following @@ -226,7 +226,7 @@ this: % go tool 6l main.6

    -

    22.3 A tour of basic C/C++ wrapping

    +

    23.3 A tour of basic C/C++ wrapping

    @@ -236,7 +236,7 @@ modifications have to occur. This section briefly covers the essential aspects of this wrapping.

    -

    22.3.1 Go Package Name

    +

    23.3.1 Go Package Name

    @@ -246,7 +246,7 @@ directive. You may override this by using SWIG's -package command line option.

    -

    22.3.2 Go Names

    +

    23.3.2 Go Names

    @@ -278,7 +278,7 @@ followed by that name, and the destructor will be named Delete followed by that name.

    -

    22.3.3 Go Constants

    +

    23.3.3 Go Constants

    @@ -286,7 +286,7 @@ C/C++ constants created via #define or the %constant directive become Go constants, declared with a const declaration. -

    22.3.4 Go Enumerations

    +

    23.3.4 Go Enumerations

    @@ -296,7 +296,7 @@ usual). The values of the enumeration will become variables in Go; code should avoid modifying those variables.

    -

    22.3.5 Go Classes

    +

    23.3.5 Go Classes

    @@ -374,7 +374,7 @@ returns a go interface. If the returned pointer can be null, you can check for this by calling the Swigcptr() method.

    -

    22.3.5.1 Go Class Inheritance

    +

    23.3.5.1 Go Class Inheritance

    @@ -386,7 +386,7 @@ Doing the reverse will require an explicit type assertion, which will be checked dynamically.

    -

    22.3.6 Go Templates

    +

    23.3.6 Go Templates

    @@ -394,7 +394,7 @@ In order to use C++ templates in Go, you must tell SWIG to create wrappers for a particular template instantation. To do this, use the %template directive. -

    22.3.7 Go Director Classes

    +

    23.3.7 Go Director Classes

    @@ -437,7 +437,7 @@ method defined in Go. The Go code may of course call other methods on itself, and those methods may be defined either in Go or in C++.

    -

    22.3.8 Default Go primitive type mappings

    +

    23.3.8 Default Go primitive type mappings

    @@ -544,7 +544,7 @@ that typemap, or add new values, to control how C/C++ types are mapped into Go types.

    -

    22.3.9 Output arguments

    +

    23.3.9 Output arguments

    Because of limitations in the way output arguments are processed in swig, @@ -597,7 +597,7 @@ void f(char *output); -

    22.3.10 Adding additional go code

    +

    23.3.10 Adding additional go code

    Often the APIs generated by swig are not very natural in go, especially if diff --git a/Doc/Manual/Guile.html b/Doc/Manual/Guile.html index 17e3a3fab..4c1126c7f 100644 --- a/Doc/Manual/Guile.html +++ b/Doc/Manual/Guile.html @@ -8,7 +8,7 @@ -

    23 SWIG and Guile

    +

    24 SWIG and Guile

      @@ -47,7 +47,7 @@

      This section details guile-specific support in SWIG. -

      23.1 Supported Guile Versions

      +

      24.1 Supported Guile Versions

      @@ -61,7 +61,7 @@ improved performance. This is currently not tested with swig so your mileage may vary. To be safe set environment variable GUILE_AUTO_COMPILE to 0 when using swig generated guile code. -

      23.2 Meaning of "Module"

      +

      24.2 Meaning of "Module"

      @@ -69,7 +69,7 @@ There are three different concepts of "module" involved, defined separately for SWIG, Guile, and Libtool. To avoid horrible confusion, we explicitly prefix the context, e.g., "guile-module". -

      23.3 Old GH Guile API

      +

      24.3 Old GH Guile API

      Guile 1.8 and older could be interfaced using two different api's, the SCM @@ -80,7 +80,7 @@ or the GH API. The GH interface to guile is deprecated. Read more about why in version of SWIG that can still generate guile GH wrapper code is 2.0.9. Please use that version if you really need the GH wrapper code. -

      23.4 Linkage

      +

      24.4 Linkage

      @@ -88,7 +88,7 @@ Guile support is complicated by a lack of user community cohesiveness, which manifests in multiple shared-library usage conventions. A set of policies implementing a usage convention is called a linkage. -

      23.4.1 Simple Linkage

      +

      24.4.1 Simple Linkage

      @@ -193,7 +193,7 @@ placed between the define-module form and the SWIG_init via a preprocessor define to avoid symbol clashes. For this case, however, passive linkage is available. -

      23.4.2 Passive Linkage

      +

      24.4.2 Passive Linkage

      Passive linkage is just like simple linkage, but it generates an @@ -203,7 +203,7 @@ package name (see below).

      You should use passive linkage rather than simple linkage when you are using multiple modules. -

      23.4.3 Native Guile Module Linkage

      +

      24.4.3 Native Guile Module Linkage

      SWIG can also generate wrapper code that does all the Guile module @@ -244,7 +244,7 @@ Newer Guile versions have a shorthand procedure for this:

    -

    23.4.4 Old Auto-Loading Guile Module Linkage

    +

    24.4.4 Old Auto-Loading Guile Module Linkage

    Guile used to support an autoloading facility for object-code @@ -270,7 +270,7 @@ option, SWIG generates an exported module initialization function with an appropriate name. -

    23.4.5 Hobbit4D Linkage

    +

    24.4.5 Hobbit4D Linkage

    @@ -295,7 +295,7 @@ my/lib/libfoo.so.X.Y.Z and friends. This scheme is still very experimental; the (hobbit4d link) conventions are not well understood.

    -

    23.5 Underscore Folding

    +

    24.5 Underscore Folding

    @@ -307,7 +307,7 @@ complained so far. %rename to specify the Guile name of the wrapped functions and variables (see CHANGES). -

    23.6 Typemaps

    +

    24.6 Typemaps

    @@ -399,7 +399,7 @@ constant will appear as a scheme variable. See Features and the %feature directive for info on how to apply the %feature.

    -

    23.7 Representation of pointers as smobs

    +

    24.7 Representation of pointers as smobs

    @@ -420,7 +420,7 @@ representing the expected pointer type. See also If the Scheme object passed was not a SWIG smob representing a compatible pointer, a wrong-type-arg exception is raised. -

    23.7.1 Smobs

    +

    24.7.1 Smobs

    @@ -439,7 +439,7 @@ structure describing this type. If a generated GOOPS module has been loaded, sm the corresponding GOOPS class.

    -

    23.7.2 Garbage Collection

    +

    24.7.2 Garbage Collection

    Garbage collection is a feature of Guile since version 1.6. As SWIG now requires Guile > 1.8, @@ -453,7 +453,7 @@ is exactly like described in 23.8 Exception Handling +

    24.8 Exception Handling

    @@ -479,7 +479,7 @@ mapping: The default when not specified here is to use "swig-error". See Lib/exception.i for details. -

    23.9 Procedure documentation

    +

    24.9 Procedure documentation

    If invoked with the command-line option -procdoc @@ -514,7 +514,7 @@ like this: typemap argument doc. See Lib/guile/typemaps.i for details. -

    23.10 Procedures with setters

    +

    24.10 Procedures with setters

    For global variables, SWIG creates a single wrapper procedure @@ -542,7 +542,7 @@ struct members, the procedures (struct-member-get pointer) and (struct-member-set pointer value) are not generated. -

    23.11 GOOPS Proxy Classes

    +

    24.11 GOOPS Proxy Classes

    SWIG can also generate classes and generic functions for use with @@ -688,7 +688,7 @@ Notice that <Foo> is used before it is defined. The fix is to just put th %import "foo.h" before the %inline block.

    -

    23.11.1 Naming Issues

    +

    24.11.1 Naming Issues

    As you can see in the example above, there are potential naming conflicts. The default exported @@ -725,7 +725,7 @@ guile-modules. For example,

    (use-modules ((Test) #:renamer (symbol-prefix-proc 'goops:))) -

    23.11.2 Linking

    +

    24.11.2 Linking

    The guile-modules generated above all need to be linked together. GOOPS support requires diff --git a/Doc/Manual/Java.html b/Doc/Manual/Java.html index 3144341e1..fb8e5d694 100644 --- a/Doc/Manual/Java.html +++ b/Doc/Manual/Java.html @@ -5,7 +5,7 @@ -

    24 SWIG and Java

    +

    25 SWIG and Java

  • Accessing protected members
  • Common customization features @@ -157,7 +157,7 @@ It covers most SWIG features, but certain low-level details are covered in less

    -

    24.1 Overview

    +

    25.1 Overview

    @@ -192,7 +192,7 @@ Various customisation tips and techniques using SWIG directives are covered. The latter sections cover the advanced techniques of using typemaps for complete control of the wrapping process.

    -

    24.2 Preliminaries

    +

    25.2 Preliminaries

    @@ -212,7 +212,7 @@ This is the commonly used method to load JNI code so your system will more than Android uses Java JNI and also works with SWIG. Please read the Android chapter in conjunction with this one if you are targeting Android.

    -

    24.2.1 Running SWIG

    +

    25.2.1 Running SWIG

    @@ -271,7 +271,7 @@ The following sections have further practical examples and details on how you mi compiling and using the generated files.

    -

    24.2.2 Additional Commandline Options

    +

    25.2.2 Additional Commandline Options

    @@ -308,7 +308,7 @@ swig -java -help Their use will become clearer by the time you have finished reading this section on SWIG and Java.

    -

    24.2.3 Getting the right header files

    +

    25.2.3 Getting the right header files

    @@ -323,7 +323,7 @@ They are usually in directories like this:

    The exact location may vary on your machine, but the above locations are typical.

    -

    24.2.4 Compiling a dynamic module

    +

    25.2.4 Compiling a dynamic module

    @@ -360,7 +360,7 @@ The name of the shared library output file is important. If the name of your SWIG module is "example", the name of the corresponding shared library file should be "libexample.so" (or equivalent depending on your machine, see Dynamic linking problems for more information). The name of the module is specified using the %module directive or -module command line option.

    -

    24.2.5 Using your module

    +

    25.2.5 Using your module

    @@ -395,7 +395,7 @@ $ If it doesn't work have a look at the following section which discusses problems loading the shared library.

    -

    24.2.6 Dynamic linking problems

    +

    25.2.6 Dynamic linking problems

    @@ -482,7 +482,7 @@ The following section also contains some C++ specific linking problems and solut

    -

    24.2.7 Compilation problems and compiling with C++

    +

    25.2.7 Compilation problems and compiling with C++

    @@ -534,7 +534,7 @@ Finally make sure the version of JDK header files matches the version of Java th

    -

    24.2.8 Building on Windows

    +

    25.2.8 Building on Windows

    @@ -543,7 +543,7 @@ You will want to produce a DLL that can be loaded by the Java Virtual Machine. This section covers the process of using SWIG with Microsoft Visual C++ 6 although the procedure may be similar with other compilers. In order for everything to work, you will need to have a JDK installed on your machine in order to read the JNI header files.

    -

    24.2.8.1 Running SWIG from Visual Studio

    +

    25.2.8.1 Running SWIG from Visual Studio

    @@ -582,7 +582,7 @@ To run the native code in the DLL (example.dll), make sure that it is in your pa If the library fails to load have a look at Dynamic linking problems.

    -

    24.2.8.2 Using NMAKE

    +

    25.2.8.2 Using NMAKE

    @@ -641,7 +641,7 @@ Of course you may want to make changes for it to work for C++ by adding in the -

    -

    24.3 A tour of basic C/C++ wrapping

    +

    25.3 A tour of basic C/C++ wrapping

    @@ -651,7 +651,7 @@ variables are wrapped with JavaBean type getters and setters and so forth. This section briefly covers the essential aspects of this wrapping.

    -

    24.3.1 Modules, packages and generated Java classes

    +

    25.3.1 Modules, packages and generated Java classes

    @@ -687,7 +687,7 @@ swig -java -package com.bloggs.swig -outdir com/bloggs/swig example.i SWIG won't create the directory, so make sure it exists beforehand.

    -

    24.3.2 Functions

    +

    25.3.2 Functions

    @@ -721,7 +721,7 @@ System.out.println(example.fact(4)); -

    24.3.3 Global variables

    +

    25.3.3 Global variables

    @@ -808,7 +808,7 @@ extern char *path; // Read-only (due to %immutable) -

    24.3.4 Constants

    +

    25.3.4 Constants

    @@ -948,7 +948,7 @@ Or if you decide this practice isn't so bad and your own class implements ex

    -

    24.3.5 Enumerations

    +

    25.3.5 Enumerations

    @@ -962,7 +962,7 @@ The final two approaches use simple integers for each enum item. Before looking at the various approaches for wrapping named C/C++ enums, anonymous enums are considered.

    -

    24.3.5.1 Anonymous enums

    +

    25.3.5.1 Anonymous enums

    @@ -1025,7 +1025,7 @@ As in the case of constants, you can access them through either the module class

    -

    24.3.5.2 Typesafe enums

    +

    25.3.5.2 Typesafe enums

    @@ -1119,7 +1119,7 @@ When upgrading to JDK 1.5 or later, proper Java enums could be used instead, wit The following section details proper Java enum generation.

    -

    24.3.5.3 Proper Java enums

    +

    25.3.5.3 Proper Java enums

    @@ -1172,7 +1172,7 @@ The additional support methods need not be generated if none of the enum items h Simpler Java enums for enums without initializers section.

    -

    24.3.5.4 Type unsafe enums

    +

    25.3.5.4 Type unsafe enums

    @@ -1220,7 +1220,7 @@ Note that unlike typesafe enums, this approach requires users to mostly use diff Thus the upgrade path to proper enums provided in JDK 1.5 is more painful.

    -

    24.3.5.5 Simple enums

    +

    25.3.5.5 Simple enums

    @@ -1239,7 +1239,7 @@ SWIG-1.3.21 and earlier versions wrapped all enums using this approach. The type unsafe approach is preferable to this one and this simple approach is only included for backwards compatibility with these earlier versions of SWIG.

    -

    24.3.6 Pointers

    +

    25.3.6 Pointers

    @@ -1327,7 +1327,7 @@ C-style cast may return a bogus result whereas as the C++-style cast will return a NULL pointer if the conversion can't be performed.

    -

    24.3.7 Structures

    +

    25.3.7 Structures

    @@ -1495,7 +1495,7 @@ x.setA(3); // Modify x.a - this is the same as b.f.a -

    24.3.8 C++ classes

    +

    25.3.8 C++ classes

    @@ -1558,7 +1558,7 @@ int bar = Spam.getBar(); -

    24.3.9 C++ inheritance

    +

    25.3.9 C++ inheritance

    @@ -1619,7 +1619,7 @@ Note that Java does not support multiple inheritance so any multiple inheritance A warning is given when multiple inheritance is detected and only the first base class is used.

    -

    24.3.10 Pointers, references, arrays and pass by value

    +

    25.3.10 Pointers, references, arrays and pass by value

    @@ -1674,7 +1674,7 @@ to hold the result and a pointer is returned (Java will release this memory when the returned object's finalizer is run by the garbage collector).

    -

    24.3.10.1 Null pointers

    +

    25.3.10.1 Null pointers

    @@ -1698,7 +1698,7 @@ For spam1 and spam4 above the Java null gets translat The converse also occurs, that is, NULL pointers are translated into null Java objects when returned from a C/C++ function.

    -

    24.3.11 C++ overloaded functions

    +

    25.3.11 C++ overloaded functions

    @@ -1813,7 +1813,7 @@ void spam(unsigned short); // Ignored -

    24.3.12 C++ default arguments

    +

    25.3.12 C++ default arguments

    @@ -1856,7 +1856,7 @@ Further details on default arguments and how to restore this approach are given

    -

    24.3.13 C++ namespaces

    +

    25.3.13 C++ namespaces

    @@ -1946,7 +1946,7 @@ If the resulting use of the nspace feature and hence packages results in a proxy you will need to open up the visibility for the pointer constructor and getCPtr method from the default 'protected' to 'public' with the SWIG_JAVABODY_PROXY macro. See Java code typemaps.

    -

    24.3.14 C++ templates

    +

    25.3.14 C++ templates

    @@ -1995,7 +1995,7 @@ Obviously, there is more to template wrapping than shown in this example. More details can be found in the SWIG and C++ chapter.

    -

    24.3.15 C++ Smart Pointers

    +

    25.3.15 C++ Smart Pointers

    @@ -2079,7 +2079,7 @@ Foo f = p.__deref__(); // Returns underlying Foo * -

    24.4 Further details on the generated Java classes

    +

    25.4 Further details on the generated Java classes

    @@ -2094,7 +2094,7 @@ Finally enum classes are covered. First, the crucial intermediary JNI class is considered.

    -

    24.4.1 The intermediary JNI class

    +

    25.4.1 The intermediary JNI class

    @@ -2214,7 +2214,7 @@ If name is the same as modulename then the module class name g from modulename to modulenameModule.

    -

    24.4.1.1 The intermediary JNI class pragmas

    +

    25.4.1.1 The intermediary JNI class pragmas

    @@ -2296,7 +2296,7 @@ For example, let's change the intermediary JNI class access to just the default All the methods in the intermediary JNI class will then not be callable outside of the package as the method modifiers have been changed from public access to default access. This is useful if you want to prevent users calling these low level functions.

    -

    24.4.2 The Java module class

    +

    25.4.2 The Java module class

    @@ -2327,7 +2327,7 @@ example.egg(new Foo()); The primary reason for having the module class wrapping the calls in the intermediary JNI class is to implement static type checking. In this case only a Foo can be passed to the egg function, whereas any long can be passed to the egg function in the intermediary JNI class.

    -

    24.4.2.1 The Java module class pragmas

    +

    25.4.2.1 The Java module class pragmas

    @@ -2378,7 +2378,7 @@ See The intermediary JNI class pragmas secti

    -

    24.4.3 Java proxy classes

    +

    25.4.3 Java proxy classes

    @@ -2454,7 +2454,7 @@ int y = f.spam(5, new Foo()); -

    24.4.3.1 Memory management

    +

    25.4.3.1 Memory management

    @@ -2616,7 +2616,7 @@ and

    -

    24.4.3.2 Inheritance

    +

    25.4.3.2 Inheritance

    @@ -2732,7 +2732,7 @@ However, true cross language polymorphism can be achieved using the 24.4.3.3 Proxy classes and garbage collection +

    25.4.3.3 Proxy classes and garbage collection

    @@ -2815,7 +2815,7 @@ The section on Java typemaps details how to specify See the How to Handle Java Finalization's Memory-Retention Issues article for alternative approaches to managing memory by avoiding finalizers altogether.

    -

    24.4.3.4 The premature garbage collection prevention parameter for proxy class marshalling

    +

    25.4.3.4 The premature garbage collection prevention parameter for proxy class marshalling

    @@ -2937,7 +2937,7 @@ For example: Compatibility note: The generation of this additional parameter did not occur in versions prior to SWIG-1.3.30.

    -

    24.4.3.5 Single threaded applications and thread safety

    +

    25.4.3.5 Single threaded applications and thread safety

    @@ -3025,7 +3025,7 @@ for (int i=0; i<100000; i++) { -

    24.4.4 Type wrapper classes

    +

    25.4.4 Type wrapper classes

    @@ -3112,7 +3112,7 @@ public static void spam(SWIGTYPE_p_int x, SWIGTYPE_p_int y, int z) { ... } -

    24.4.5 Enum classes

    +

    25.4.5 Enum classes

    @@ -3121,7 +3121,7 @@ The Enumerations section discussed these but om The following sub-sections detail the various types of enum classes that can be generated.

    -

    24.4.5.1 Typesafe enum classes

    +

    25.4.5.1 Typesafe enum classes

    @@ -3205,7 +3205,7 @@ The swigValue method is used for marshalling in the other direction. The toString method is overridden so that the enum name is available.

    -

    24.4.5.2 Proper Java enum classes

    +

    25.4.5.2 Proper Java enum classes

    @@ -3283,7 +3283,7 @@ These needn't be generated if the enum being wrapped does not have any initializ Simpler Java enums for enums without initializers section describes how typemaps can be used to achieve this.

    -

    24.4.5.3 Type unsafe enum classes

    +

    25.4.5.3 Type unsafe enum classes

    @@ -3314,7 +3314,7 @@ public final class Beverage { -

    24.5 Cross language polymorphism using directors

    +

    25.5 Cross language polymorphism using directors

    @@ -3336,7 +3336,7 @@ The upshot is that C++ classes can be extended in Java and from C++ these extens Neither C++ code nor Java code needs to know where a particular method is implemented: the combination of proxy classes, director classes, and C wrapper functions transparently takes care of all the cross-language method routing.

    -

    24.5.1 Enabling directors

    +

    25.5.1 Enabling directors

    @@ -3404,7 +3404,7 @@ public: -

    24.5.2 Director classes

    +

    25.5.2 Director classes

    @@ -3431,7 +3431,7 @@ If the correct implementation is in Java, the Java API is used to call the metho

    -

    24.5.3 Overhead and code bloat

    +

    25.5.3 Overhead and code bloat

    @@ -3449,7 +3449,7 @@ This situation can be optimized by selectively enabling director methods (using

    -

    24.5.4 Simple directors example

    +

    25.5.4 Simple directors example

    @@ -3514,7 +3514,7 @@ DirectorDerived::upcall_method() invoked. -

    24.5.5 Director threading issues

    +

    25.5.5 Director threading issues

    @@ -3534,7 +3534,7 @@ Macros can be defined on the commandline when compiling your C++ code, or altern -

    24.5.6 Director performance tuning

    +

    25.5.6 Director performance tuning

    @@ -3555,7 +3555,8 @@ However, if all director methods are expected to usually be overridden by Java s The disadvantage is that invocation of director methods from C++ when Java doesn't actually override the method will require an additional call up into Java and back to C++. As such, this option is only useful when overrides are extremely common and instantiation is frequent enough that its performance is critical.

    -

    24.5.7 Java exceptions from directors

    +

    25.5.7 Java exceptions from directors

    +

    With directors routing method calls to Java, and proxies routing them @@ -3716,6 +3717,7 @@ this potential fate. Swig::DirectorException, any director methods that have exception specifications may cause program termination. To simply ignore unexpected exceptions, the default handling can be changed with: +

    @@ -3729,7 +3731,6 @@ unexpected exceptions, the default handling can be changed with:
     %}
     
    -

    Alternatively an exception compatible with the existing director method exception specifications can be thrown. Assuming that all @@ -3862,7 +3863,7 @@ See the Exception handling with %exception an section for more on converting C++ exceptions to Java exceptions.

    -

    24.6 Accessing protected members

    +

    25.6 Accessing protected members

    @@ -3958,7 +3959,7 @@ class MyProtectedBase extends ProtectedBase -

    24.7 Common customization features

    +

    25.7 Common customization features

    @@ -3970,7 +3971,7 @@ be awkward. This section describes some common SWIG features that are used to improve the interface to existing C/C++ code.

    -

    24.7.1 C/C++ helper functions

    +

    25.7.1 C/C++ helper functions

    @@ -4036,7 +4037,7 @@ hard to implement. It is possible to improve on this using Java code, typemaps, customization features as covered in later sections, but sometimes helper functions are a quick and easy solution to difficult cases.

    -

    24.7.2 Class extension with %extend

    +

    25.7.2 Class extension with %extend

    @@ -4099,7 +4100,7 @@ Vector(2,3,4) in any way---the extensions only show up in the Java interface.

    -

    24.7.3 Exception handling with %exception and %javaexception

    +

    25.7.3 Exception handling with %exception and %javaexception

    @@ -4258,7 +4259,7 @@ to raise exceptions. See the SWIG Library ch The typemap example Handling C++ exception specifications as Java exceptions provides further exception handling capabilities.

    -

    24.7.4 Method access with %javamethodmodifiers

    +

    25.7.4 Method access with %javamethodmodifiers

    @@ -4284,7 +4285,7 @@ protected static void protect_me() { -

    24.8 Tips and techniques

    +

    25.8 Tips and techniques

    @@ -4294,7 +4295,7 @@ strings and arrays. This chapter discusses the common techniques for solving these problems.

    -

    24.8.1 Input and output parameters using primitive pointers and references

    +

    25.8.1 Input and output parameters using primitive pointers and references

    @@ -4468,7 +4469,7 @@ void foo(Bar *OUTPUT); will not have the intended effect since typemaps.i does not define an OUTPUT rule for Bar.

    -

    24.8.2 Simple pointers

    +

    25.8.2 Simple pointers

    @@ -4534,7 +4535,7 @@ System.out.println("3 + 4 = " + result); See the SWIG Library chapter for further details.

    -

    24.8.3 Wrapping C arrays with Java arrays

    +

    25.8.3 Wrapping C arrays with Java arrays

    @@ -4601,7 +4602,7 @@ Please be aware that the typemaps in this library are not efficient as all the e There is an alternative approach using the SWIG array library and this is covered in the next section.

    -

    24.8.4 Unbounded C Arrays

    +

    25.8.4 Unbounded C Arrays

    @@ -4746,7 +4747,7 @@ well suited for applications in which you need to create buffers, package binary data, etc.

    -

    24.8.5 Binary data vs Strings

    +

    25.8.5 Binary data vs Strings

    @@ -4790,7 +4791,7 @@ len: 5 data: 68 69 0 6a 6b -

    24.8.6 Overriding new and delete to allocate from Java heap

    +

    25.8.6 Overriding new and delete to allocate from Java heap

    @@ -4907,7 +4908,7 @@ model and use these functions in place of malloc and free in your own code.

    -

    24.9 Java typemaps

    +

    25.9 Java typemaps

    @@ -4928,7 +4929,7 @@ Before proceeding, it should be stressed that typemaps are not a required part of using SWIG---the default wrapping behavior is enough in most cases. Typemaps are only used if you want to change some aspect of the generated code. -

    24.9.1 Default primitive type mappings

    +

    25.9.1 Default primitive type mappings

    @@ -5080,7 +5081,7 @@ However, the mappings allow the full range of values for each C type from Java.

    -

    24.9.2 Default typemaps for non-primitive types

    +

    25.9.2 Default typemaps for non-primitive types

    @@ -5095,7 +5096,7 @@ So in summary, the C/C++ pointer to non-primitive types is cast into the 64 bit The Java type is either the proxy class or type wrapper class.

    -

    24.9.3 Sixty four bit JVMs

    +

    25.9.3 Sixty four bit JVMs

    @@ -5108,7 +5109,7 @@ Unfortunately it won't of course hold true for JNI code.

    -

    24.9.4 What is a typemap?

    +

    25.9.4 What is a typemap?

    @@ -5231,7 +5232,7 @@ int c = example.count('e',"Hello World"); -

    24.9.5 Typemaps for mapping C/C++ types to Java types

    +

    25.9.5 Typemaps for mapping C/C++ types to Java types

    @@ -5491,7 +5492,7 @@ These are listed below: -

    24.9.6 Java typemap attributes

    +

    25.9.6 Java typemap attributes

    @@ -5537,7 +5538,7 @@ The "javain" typemap has the optional 'pre', 'post' and 'pgcppname' attributes. Note that when the 'pre' or 'post' attributes are specified and the associated type is used in a constructor, a constructor helper function is generated. This is necessary as the Java proxy constructor wrapper makes a call to a support constructor using a this call. In Java the this call must be the first statement in the constructor body. The constructor body thus calls the helper function and the helper function instead makes the JNI call, ensuring the 'pre' code is called before the JNI call is made. There is a Date marshalling example showing 'pre', 'post' and 'pgcppname' attributes in action.

    -

    24.9.7 Java special variables

    +

    25.9.7 Java special variables

    @@ -5688,7 +5689,7 @@ This special variable expands to the intermediary class name. Usually this is th unless the jniclassname attribute is specified in the %module directive.

    -

    24.9.8 Typemaps for both C and C++ compilation

    +

    25.9.8 Typemaps for both C and C++ compilation

    @@ -5725,7 +5726,7 @@ If you do not intend your code to be targeting both C and C++ then your typemaps

    -

    24.9.9 Java code typemaps

    +

    25.9.9 Java code typemaps

    @@ -5963,7 +5964,7 @@ to make the method and constructor public: -

    24.9.10 Director specific typemaps

    +

    25.9.10 Director specific typemaps

    @@ -6227,7 +6228,7 @@ The basic strategy here is to provide a default package typemap for the majority -

    24.10 Typemap Examples

    +

    25.10 Typemap Examples

    @@ -6237,7 +6238,7 @@ the SWIG library.

    -

    24.10.1 Simpler Java enums for enums without initializers

    +

    25.10.1 Simpler Java enums for enums without initializers

    @@ -6316,7 +6317,7 @@ This would be done by using the original versions of these typemaps in "enums.sw

    -

    24.10.2 Handling C++ exception specifications as Java exceptions

    +

    25.10.2 Handling C++ exception specifications as Java exceptions

    @@ -6441,7 +6442,7 @@ We could alternatively have used %rename to rename what() into

    -

    24.10.3 NaN Exception - exception handling for a particular type

    +

    25.10.3 NaN Exception - exception handling for a particular type

    @@ -6596,7 +6597,7 @@ If we were a martyr to the JNI cause, we could replace the succinct code within If we had, we would have put it in the "in" typemap which, like all JNI and Java typemaps, also supports the 'throws' attribute.

    -

    24.10.4 Converting Java String arrays to char **

    +

    25.10.4 Converting Java String arrays to char **

    @@ -6740,7 +6741,7 @@ Lastly the "jni", "jtype" and "jstype" typemaps are also required to specify what Java types to use.

    -

    24.10.5 Expanding a Java object to multiple arguments

    +

    25.10.5 Expanding a Java object to multiple arguments

    @@ -6822,7 +6823,7 @@ example.foo(new String[]{"red", "green", "blue", "white"}); -

    24.10.6 Using typemaps to return arguments

    +

    25.10.6 Using typemaps to return arguments

    @@ -6940,7 +6941,7 @@ $ java runme 1 12.0 340.0 -

    24.10.7 Adding Java downcasts to polymorphic return types

    +

    25.10.7 Adding Java downcasts to polymorphic return types

    @@ -7146,7 +7147,7 @@ SWIG usually generates code which constructs the proxy classes using Java code a Note that the JNI code above uses a number of string lookups to call a constructor, whereas this would not occur using byte compiled Java code.

    -

    24.10.8 Adding an equals method to the Java classes

    +

    25.10.8 Adding an equals method to the Java classes

    @@ -7190,7 +7191,7 @@ System.out.println("foo1? " + foo1.equals(foo2)); -

    24.10.9 Void pointers and a common Java base class

    +

    25.10.9 Void pointers and a common Java base class

    @@ -7249,7 +7250,7 @@ This example contains some useful functionality which you may want in your code.

  • It also has a function which effectively implements a cast from the type of the proxy/type wrapper class to a void pointer. This is necessary for passing a proxy class or a type wrapper class to a function that takes a void pointer. -

    24.10.10 Struct pointer to pointer

    +

    25.10.10 Struct pointer to pointer

    @@ -7429,7 +7430,7 @@ The C functional interface has been completely morphed into an object-oriented i the Butler class would behave much like any pure Java class and feel more natural to Java users.

    -

    24.10.11 Memory management when returning references to member variables

    +

    25.10.11 Memory management when returning references to member variables

    @@ -7552,7 +7553,7 @@ public class Bike { Note the addReference call.

    -

    24.10.12 Memory management for objects passed to the C++ layer

    +

    25.10.12 Memory management for objects passed to the C++ layer

    @@ -7668,7 +7669,7 @@ The 'javacode' typemap simply adds in the specified code into the Java proxy cla -

    24.10.13 Date marshalling using the javain typemap and associated attributes

    +

    25.10.13 Date marshalling using the javain typemap and associated attributes

    @@ -7845,7 +7846,7 @@ A few things to note: -

    24.11 Living with Java Directors

    +

    25.11 Living with Java Directors

    @@ -8026,10 +8027,10 @@ public abstract class UserVisibleFoo extends Foo {

  • -

    24.12 Odds and ends

    +

    25.12 Odds and ends

    -

    24.12.1 JavaDoc comments

    +

    25.12.1 JavaDoc comments

    @@ -8085,7 +8086,7 @@ public class Barmy { -

    24.12.2 Functional interface without proxy classes

    +

    25.12.2 Functional interface without proxy classes

    @@ -8146,7 +8147,7 @@ All destructors have to be called manually for example the delete_Foo(foo) -

    24.12.3 Using your own JNI functions

    +

    25.12.3 Using your own JNI functions

    @@ -8196,7 +8197,7 @@ This directive is only really useful if you want to mix your own hand crafted JN

    -

    24.12.4 Performance concerns and hints

    +

    25.12.4 Performance concerns and hints

    @@ -8217,7 +8218,7 @@ However, you will have to be careful about memory management and make sure that This method normally calls the C++ destructor or free() for C code.

    -

    24.12.5 Debugging

    +

    25.12.5 Debugging

    @@ -8239,7 +8240,7 @@ The -verbose:jni and -verbose:gc are also useful options for monitoring code beh

    -

    24.13 Java Examples

    +

    25.13 Java Examples

    diff --git a/Doc/Manual/Library.html b/Doc/Manual/Library.html index 7510c8686..740988e71 100644 --- a/Doc/Manual/Library.html +++ b/Doc/Manual/Library.html @@ -6,7 +6,7 @@ -

    8 SWIG library

    +

    9 SWIG library

      @@ -59,7 +59,7 @@ Alternative libraries provide similar functionality. Please read this chapter carefully if you used the old libraries.

      -

      8.1 The %include directive and library search path

      +

      9.1 The %include directive and library search path

      @@ -91,7 +91,7 @@ Set the environment variable to hold an alternative library directory. The directories that are searched are displayed when using -verbose commandline option.

      -

      8.2 C Arrays and Pointers

      +

      9.2 C Arrays and Pointers

      @@ -103,7 +103,7 @@ pointers as class-like objects. Since these functions provide direct access to memory, their use is potentially unsafe and you should exercise caution.

      -

      8.2.1 cpointer.i

      +

      9.2.1 cpointer.i

      @@ -319,7 +319,7 @@ In this example, the function int_to_uint() would be used to cast type Note: When working with simple pointers, typemaps can often be used to provide more seamless operation.

      -

      8.2.2 carrays.i

      +

      9.2.2 carrays.i

      @@ -497,7 +497,7 @@ you should consider using a special array object rather than a bare pointer. used with types of char or char *.

      -

      8.2.3 cmalloc.i

      +

      9.2.3 cmalloc.i

      @@ -658,7 +658,7 @@ Now, in a script:

    -

    8.2.4 cdata.i

    +

    9.2.4 cdata.i

    @@ -760,7 +760,7 @@ char *cdata_name(type* ptr, int nitems) Clearly they are unsafe.

    -

    8.3 C String Handling

    +

    9.3 C String Handling

    @@ -780,7 +780,7 @@ morality. The modules in this section provide basic functionality for manipulating raw C strings.

    -

    8.3.1 Default string handling

    +

    9.3.1 Default string handling

    @@ -821,7 +821,7 @@ interpreter and lead to a crash). Furthermore, the default behavior does not work well with binary data. Instead, strings are assumed to be NULL-terminated.

    -

    8.3.2 Passing binary data

    +

    9.3.2 Passing binary data

    @@ -863,7 +863,7 @@ In the wrapper function, the passed string will be expanded to a pointer and len The (char *STRING, int LENGTH) multi-argument typemap is also available in addition to (char *STRING, size_t LENGTH).

    -

    8.3.3 Using %newobject to release memory

    +

    9.3.3 Using %newobject to release memory

    @@ -904,7 +904,7 @@ however, you may need to provide your own "newfree" typemap for other types. See Object ownership and %newobject for more details.

    -

    8.3.4 cstring.i

    +

    9.3.4 cstring.i

    @@ -1364,7 +1364,7 @@ structure or class instead. -

    8.4 STL/C++ Library

    +

    9.4 STL/C++ Library

    @@ -1402,7 +1402,7 @@ Please look for the library files in the appropriate language library directory.

    -

    8.4.1 std::string

    +

    9.4.1 std::string

    @@ -1486,7 +1486,7 @@ void foo(string s, const String &t); // std_string typemaps still applie -

    8.4.2 std::vector

    +

    9.4.2 std::vector

    @@ -1665,7 +1665,7 @@ if you want to make their head explode. details and the public API exposed to the interpreter vary.

    -

    8.4.3 STL exceptions

    +

    9.4.3 STL exceptions

    @@ -1715,7 +1715,7 @@ The %exception directive can be used by placing the following code befo Any thrown STL exceptions will then be gracefully handled instead of causing a crash.

    -

    8.4.4 shared_ptr smart pointer

    +

    9.4.4 shared_ptr smart pointer

    @@ -1904,7 +1904,8 @@ Adding the missing %shared_ptr macros will fix this:

    -

    8.4.5 auto_ptr smart pointer

    +

    9.4.5 auto_ptr smart pointer

    +

    While std::auto_ptr is deprecated in C++11, some existing code may @@ -1952,10 +1953,10 @@ int value = k.getValue(); -

    8.5 Utility Libraries

    +

    9.5 Utility Libraries

    -

    8.5.1 exception.i

    +

    9.5.1 exception.i

    diff --git a/Doc/Manual/Lisp.html b/Doc/Manual/Lisp.html index 09e410185..7ea9139ac 100644 --- a/Doc/Manual/Lisp.html +++ b/Doc/Manual/Lisp.html @@ -6,7 +6,7 @@ -

    25 SWIG and Common Lisp

    +

    26 SWIG and Common Lisp

      @@ -41,7 +41,7 @@ Lisp, Common Foreign Function Interface(CFFI), CLisp and UFFI foreign function interfaces.

      -

      25.1 Allegro Common Lisp

      +

      26.1 Allegro Common Lisp

      @@ -50,7 +50,7 @@ here

      -

      25.2 Common Foreign Function Interface(CFFI)

      +

      26.2 Common Foreign Function Interface(CFFI)

      @@ -77,7 +77,7 @@ swig -cffi -module module-name file-name files and the various things which you can do with them.

      -

      25.2.1 Additional Commandline Options

      +

      26.2.1 Additional Commandline Options

      @@ -118,7 +118,7 @@ swig -cffi -help -

      25.2.2 Generating CFFI bindings

      +

      26.2.2 Generating CFFI bindings

      As we mentioned earlier the ideal way to use SWIG is to use interface @@ -392,7 +392,7 @@ The feature intern_function ensures that all C names are
    -

    25.2.3 Generating CFFI bindings for C++ code

    +

    26.2.3 Generating CFFI bindings for C++ code

    This feature to SWIG (for CFFI) is very new and still far from @@ -568,7 +568,7 @@ If you have any questions, suggestions, patches, etc., related to CFFI module feel free to contact us on the SWIG mailing list, and also please add a "[CFFI]" tag in the subject line. -

    25.2.4 Inserting user code into generated files

    +

    26.2.4 Inserting user code into generated files

    @@ -608,7 +608,7 @@ Note that the block %{ ... %} is effectively a shortcut for

    -

    25.3 CLISP

    +

    26.3 CLISP

    @@ -638,7 +638,7 @@ swig -clisp -module module-name file-name interface file for the CLISP module. The CLISP module tries to produce code which is both human readable and easily modifyable.

    -

    25.3.1 Additional Commandline Options

    +

    26.3.1 Additional Commandline Options

    @@ -671,7 +671,7 @@ and global variables will be created otherwise only definitions for
    -

    25.3.2 Details on CLISP bindings

    +

    26.3.2 Details on CLISP bindings

    @@ -795,7 +795,7 @@ struct bar { -

    25.4 UFFI

    +

    26.4 UFFI

    diff --git a/Doc/Manual/Lua.html b/Doc/Manual/Lua.html index e7d1a5b1b..f0415d8d6 100644 --- a/Doc/Manual/Lua.html +++ b/Doc/Manual/Lua.html @@ -6,7 +6,7 @@ -

    26 SWIG and Lua

    +

    27 SWIG and Lua

  • Typemaps -
  • Writing typemaps +
  • Writing typemaps
  • Customization of your Bindings @@ -73,14 +85,14 @@ Lua is an extension programming language designed to support general procedural eLua stands for Embedded Lua (can be thought of as a flavor of Lua) and offers the full implementation of the Lua programming language to the embedded world, extending it with specific features for efficient and portable software embedded development. eLua runs on smaller devices like microcontrollers and provides the full features of the regular Lua desktop version. More information on eLua can be found here: http://www.eluaproject.net

    -

    26.1 Preliminaries

    +

    27.1 Preliminaries

    The current SWIG implementation is designed to work with Lua 5.0.x, 5.1.x and 5.2.x. It should work with later versions of Lua, but certainly not with Lua 4.0 due to substantial API changes. It is possible to either static link or dynamic link a Lua module into the interpreter (normally Lua static links its libraries, as dynamic linking is not available on all platforms). SWIG also has support for eLua starting from eLua 0.8. Due to substantial changes between SWIG 2.x and SWIG 3.0 and unavailability of testing platform, eLua status was downgraded to 'experimental'.

    -

    26.2 Running SWIG

    +

    27.2 Running SWIG

    @@ -128,7 +140,7 @@ $ swig -lua -eluac example.i The -elua option puts all the C function wrappers and variable get/set wrappers in rotables. It also generates a metatable which will control the access to these variables from eLua. It also offers a significant amount of module size compression. On the other hand, the -eluac option puts all the wrappers in a single rotable. With this option, no matter how huge the module, it will consume no additional microcontroller SRAM (crass compression). There is a catch though: Metatables are not generated with -eluac. To access any value from eLua, one must directly call the wrapper function associated with that value.

    -

    26.2.1 Additional command line options

    +

    27.2.1 Additional command line options

    @@ -169,7 +181,7 @@ swig -lua -help -

    26.2.2 Compiling and Linking and Interpreter

    +

    27.2.2 Compiling and Linking and Interpreter

    @@ -240,7 +252,7 @@ LUALIB_API int ( luaopen_mod )(lua_State *L ); More information on building and configuring eLua can be found here: http://www.eluaproject.net/doc/v0.8/en_building.html

    -

    26.2.3 Compiling a dynamic module

    +

    27.2.3 Compiling a dynamic module

    @@ -308,7 +320,7 @@ Is quite obvious (Go back and consult the Lua documents on how to enable loadlib -

    26.2.4 Using your module

    +

    27.2.4 Using your module

    @@ -326,19 +338,19 @@ $ ./my_lua >

  • -

    26.3 A tour of basic C/C++ wrapping

    +

    27.3 A tour of basic C/C++ wrapping

    By default, SWIG tries to build a very natural Lua interface to your C/C++ code. This section briefly covers the essential aspects of this wrapping.

    -

    26.3.1 Modules

    +

    27.3.1 Modules

    The SWIG module directive specifies the name of the Lua module. If you specify `module example', then everything is wrapped into a Lua table 'example' containing all the functions and variables. When choosing a module name, make sure you don't use the same name as a built-in Lua command or standard module name.

    -

    26.3.2 Functions

    +

    27.3.2 Functions

    @@ -379,7 +391,7 @@ It is also possible to rename the module with an assignment. 24 -

    26.3.3 Global variables

    +

    27.3.3 Global variables

    @@ -467,7 +479,7 @@ If you have used the -eluac option for your eLua module, you will have In general, functions of the form "variable_get()" and "variable_set()" are automatically generated by SWIG for use with -eluac.

    -

    26.3.4 Constants and enums

    +

    27.3.4 Constants and enums

    @@ -502,7 +514,9 @@ If you're using eLua and have used -elua or -eluac to generate Hello World -

    Constants/enums and classes/structures

    +

    27.3.4.1 Constants/enums and classes/structures

    + +

    Enums are exported into a class table. For example, given some enums:

    @@ -556,7 +570,7 @@ If the -no-old-metatable-bindings option is used, then these old-style It is worth mentioning, that example.Test.TEST1 and example.Test_TEST1 are different entities and changing one does not change the other. Given the fact that these are constantes and they are not supposed to be changed, it is up to you to avoid such issues.

    -

    26.3.5 Pointers

    +

    27.3.5 Pointers

    @@ -594,7 +608,7 @@ Lua enforces the integrity of its userdata, so it is virtually impossible to cor nil -

    26.3.6 Structures

    +

    27.3.6 Structures

    @@ -698,7 +712,7 @@ For eLua with the -eluac option, structure manipulation has to be perfo In general, functions of the form "new_struct()", "struct_member_get()", "struct_member_set()" and "free_struct()" are automatically generated by SWIG for each structure defined in C. (Please note: This doesn't apply for modules generated with the -elua option)

    -

    26.3.7 C++ classes

    +

    27.3.7 C++ classes

    @@ -770,7 +784,7 @@ Both style names are generated by default now. However, if the -no-old-metatable-bindings option is used, then the backward compatible names are not generated in addition to ordinary ones.

    -

    26.3.8 C++ inheritance

    +

    27.3.8 C++ inheritance

    @@ -795,7 +809,7 @@ then the function spam() accepts a Foo pointer or a pointer to any clas

    It is safe to use multiple inheritance with SWIG.

    -

    26.3.9 Pointers, references, values, and arrays

    +

    27.3.9 Pointers, references, values, and arrays

    @@ -826,7 +840,7 @@ Foo spam7();

    then all three functions will return a pointer to some Foo object. Since the third function (spam7) returns a value, newly allocated memory is used to hold the result and a pointer is returned (Lua will release this memory when the return value is garbage collected). The other two are pointers which are assumed to be managed by the C code and so will not be garbage collected.

    -

    26.3.10 C++ overloaded functions

    +

    27.3.10 C++ overloaded functions

    @@ -912,7 +926,7 @@ Please refer to the "SWIG and C++" chapter for more information about overloadin

    Dealing with the Lua coercion mechanism, the priority is roughly (integers, floats, strings, userdata). But it is better to rename the functions rather than rely upon the ordering.

    -

    26.3.11 C++ operators

    +

    27.3.11 C++ operators

    @@ -1024,7 +1038,7 @@ It is also possible to overload the operator[], but currently this cann }; -

    26.3.12 Class extension with %extend

    +

    27.3.12 Class extension with %extend

    @@ -1080,7 +1094,7 @@ true Extend works with both C and C++ code, on classes and structs. It does not modify the underlying object in any way---the extensions only show up in the Lua interface. The only item to take note of is the code has to use the '$self' instead of 'this', and that you cannot access protected/private members of the code (as you are not officially part of the class).

    -

    26.3.13 Using %newobject to release memory

    +

    27.3.13 Using %newobject to release memory

    If you have a function that allocates memory like this,

    @@ -1104,7 +1118,7 @@ char *foo();

    This will release the allocated memory.

    -

    26.3.14 C++ templates

    +

    27.3.14 C++ templates

    @@ -1139,7 +1153,7 @@ In Lua:

    Obviously, there is more to template wrapping than shown in this example. More details can be found in the SWIG and C++ chapter. Some more complicated examples will appear later.

    -

    26.3.15 C++ Smart Pointers

    +

    27.3.15 C++ Smart Pointers

    @@ -1191,7 +1205,7 @@ If you ever need to access the underlying pointer returned by operator->( > f = p:__deref__() -- Returns underlying Foo * -

    26.3.16 C++ Exceptions

    +

    27.3.16 C++ Exceptions

    @@ -1334,7 +1348,9 @@ and the "Exception handling add exception specification to functions or globally (respectively).

    -

    26.3.17 Namespaces

    +

    27.3.17 Namespaces

    + +

    Since SWIG-3.0.0 C++ namespaces are supported via the %nspace feature.

    @@ -1379,7 +1395,9 @@ Now, from Lua usage is as follows: 19 > -

    Compatibility Note

    +

    27.3.17.1 Compatibility Note

    + +

    If SWIG is running in backward compatible way, i.e. without -no-old-metatable-bindings option, then additional old-style names are generated(notice the underscore):

    @@ -1391,8 +1409,12 @@ If SWIG is running in backward compatible way, i.e. without -no-old-metatabl 11 > -

    Compatibility Note

    -

    Names

    +

    27.3.18 Compatibility Note

    + + +

    27.3.18.1 Names

    + +

    If SWIG is launched without -no-old-metatable-bindings option, then it enters backward-compatible mode. While in this mode, it tries to generate additional names for static functions, class static constants and class enums. Those names are in a form $classname_$symbolname and are added to the scope surrounding the class. @@ -1434,7 +1456,9 @@ surrounding scope without any prefixing. Pretending that Test2 is a struct, not > -

    Inheritance

    +

    27.3.18.2 Inheritance

    + +

    The internal organization of inheritance has changed. Consider the following C++ code:

    %module example
    @@ -1473,12 +1497,12 @@ function
     >
     
    -

    26.4 Typemaps

    +

    27.4 Typemaps

    This section explains what typemaps are and how to use them. The default wrapping behaviour of SWIG is enough in most cases. However sometimes SWIG may need a little additional assistance to know which typemap to apply to provide the best wrapping. This section will be explaining how to use typemaps to best effect

    -

    26.4.1 What is a typemap?

    +

    27.4.1 What is a typemap?

    A typemap is nothing more than a code generation rule that is attached to a specific C datatype. For example, to convert integers from Lua to C, you might define a typemap like this:

    @@ -1506,7 +1530,7 @@ Received an integer : 6 720 -

    26.4.2 Using typemaps

    +

    27.4.2 Using typemaps

    There are many ready written typemaps built into SWIG for all common types (int, float, short, long, char*, enum and more), which SWIG uses automatically, with no effort required on your part.

    @@ -1559,7 +1583,7 @@ void swap(int *sx, int *sy);

    Note: C++ references must be handled exactly the same way. However SWIG will automatically wrap a const int& as an input parameter (since that it obviously input).

    -

    26.4.3 Typemaps and arrays

    +

    27.4.3 Typemaps and arrays

    Arrays present a challenge for SWIG, because like pointers SWIG does not know whether these are input or output values, nor @@ -1623,7 +1647,7 @@ and Lua tables to be 1..N, (the indexing follows the norm for the language). In

    Note: SWIG also can support arrays of pointers in a similar manner.

    -

    26.4.4 Typemaps and pointer-pointer functions

    +

    27.4.4 Typemaps and pointer-pointer functions

    Several C++ libraries use a pointer-pointer functions to create its objects. These functions require a pointer to a pointer which is then filled with the pointer to the new object. Microsoft's COM and DirectX as well as many other libraries have this kind of function. An example is given below:

    @@ -1657,7 +1681,7 @@ int Create_Math(iMath** pptr); // its creator (assume it mallocs) ptr=nil -- the iMath* will be GC'ed as normal -

    26.5 Writing typemaps

    +

    27.5 Writing typemaps

    This section describes how you can modify SWIG's default wrapping behavior for various C/C++ datatypes using the %typemap directive. This is an advanced topic that assumes familiarity with the Lua C API as well as the material in the "Typemaps" chapter.

    @@ -1666,7 +1690,7 @@ ptr=nil -- the iMath* will be GC'ed as normal

    Before proceeding, you should read the previous section on using typemaps, and look at the existing typemaps found in luatypemaps.swg and typemaps.i. These are both well documented and fairly easy to read. You should not attempt to write your own typemaps until you have read and can understand both of these files (they may well also give you an idea to base your work on).

    -

    26.5.1 Typemaps you can write

    +

    27.5.1 Typemaps you can write

    There are many different types of typemap that can be written, the full list can be found in the "Typemaps" chapter. However the following are the most commonly used ones.

    @@ -1679,7 +1703,7 @@ ptr=nil -- the iMath* will be GC'ed as normal (the syntax for the typecheck is different from the typemap, see typemaps for details). -

    26.5.2 SWIG's Lua-C API

    +

    27.5.2 SWIG's Lua-C API

    This section explains the SWIG specific Lua-C API. It does not cover the main Lua-C api, as this is well documented and not worth covering.

    @@ -1728,7 +1752,7 @@ This macro, when called within the context of a SWIG wrapped function, will disp
    Similar to SWIG_fail_arg, except that it will display the swig_type_info information instead.
    -

    26.6 Customization of your Bindings

    +

    27.6 Customization of your Bindings

    @@ -1737,7 +1761,7 @@ This section covers adding of some small extra bits to your module to add the la -

    26.6.1 Writing your own custom wrappers

    +

    27.6.1 Writing your own custom wrappers

    @@ -1756,7 +1780,7 @@ int native_function(lua_State*L) // my native code The %native directive in the above example, tells SWIG that there is a function int native_function(lua_State*L); which is to be added into the module under the name 'my_func'. SWIG will not add any wrapper for this function, beyond adding it into the function table. How you write your code is entirely up to you.

    -

    26.6.2 Adding additional Lua code

    +

    27.6.2 Adding additional Lua code

    @@ -1794,7 +1818,7 @@ Good uses for this feature is adding of new code, or writing helper functions to See Examples/lua/arrays for an example of this code.

    -

    26.7 Details on the Lua binding

    +

    27.7 Details on the Lua binding

    @@ -1805,7 +1829,7 @@ See Examples/lua/arrays for an example of this code.

    -

    26.7.1 Binding global data into the module.

    +

    27.7.1 Binding global data into the module.

    @@ -1865,7 +1889,7 @@ end

    That way when you call 'a=example.Foo', the interpreter looks at the table 'example' sees that there is no field 'Foo' and calls __index. This will in turn check in '.get' table and find the existence of 'Foo' and then return the value of the C function call 'Foo_get()'. Similarly for the code 'example.Foo=10', the interpreter will check the table, then call the __newindex which will then check the '.set' table and call the C function 'Foo_set(10)'.

    -

    26.7.2 Userdata and Metatables

    +

    27.7.2 Userdata and Metatables

    @@ -1945,7 +1969,7 @@ Note: Both the opaque structures (like the FILE*) and normal wrapped classes/str

    Note: Operator overloads are basically done in the same way, by adding functions such as '__add' & '__call' to the class' metatable. The current implementation is a bit rough as it will add any member function beginning with '__' into the metatable too, assuming its an operator overload.

    -

    26.7.3 Memory management

    +

    27.7.3 Memory management

    diff --git a/Doc/Manual/Modula3.html b/Doc/Manual/Modula3.html index 329127a0f..0bf9f2995 100644 --- a/Doc/Manual/Modula3.html +++ b/Doc/Manual/Modula3.html @@ -5,7 +5,7 @@ -

    27 SWIG and Modula-3

    +

    28 SWIG and Modula-3

      @@ -54,7 +54,7 @@ especially typemaps.

      -

      27.1 Overview

      +

      28.1 Overview

      @@ -84,7 +84,7 @@ FFTW -

      27.1.1 Motivation

      +

      28.1.1 Motivation

      @@ -131,10 +131,10 @@ functions), but it doesn't allow you to easily integrate a Modula-3 module into a C/C++ project.

      -

      27.2 Conception

      +

      28.2 Conception

      -

      27.2.1 Interfaces to C libraries

      +

      28.2.1 Interfaces to C libraries

      @@ -283,7 +283,7 @@ and the principal type must be renamed (%typemap).

      -

      27.2.2 Interfaces to C++ libraries

      +

      28.2.2 Interfaces to C++ libraries

      @@ -384,10 +384,10 @@ There is no C++ library I wrote a SWIG interface for, so I'm not sure if this is possible or sensible, yet.

      -

      27.3 Preliminaries

      +

      28.3 Preliminaries

      -

      27.3.1 Compilers

      +

      28.3.1 Compilers

      @@ -400,7 +400,7 @@ For testing examples I use Critical Mass cm3.

      -

      27.3.2 Additional Commandline Options

      +

      28.3.2 Additional Commandline Options

      @@ -477,10 +477,10 @@ Instead generate templates for some basic typemaps. -

      27.4 Modula-3 typemaps

      +

      28.4 Modula-3 typemaps

      -

      27.4.1 Inputs and outputs

      +

      28.4.1 Inputs and outputs

      @@ -694,7 +694,7 @@ consist of the following parts: -

      27.4.2 Subranges, Enumerations, Sets

      +

      28.4.2 Subranges, Enumerations, Sets

      @@ -746,7 +746,7 @@ that I'd like to automate.

      -

      27.4.3 Objects

      +

      28.4.3 Objects

      @@ -759,7 +759,7 @@ is not really useful, yet.

      -

      27.4.4 Imports

      +

      28.4.4 Imports

      @@ -792,7 +792,7 @@ IMPORT M3toC;

    -

    27.4.5 Exceptions

    +

    28.4.5 Exceptions

    @@ -816,7 +816,7 @@ you should declare %typemap("m3wrapinconv:throws") blah * %{OSError.E%}.

    -

    27.4.6 Example

    +

    28.4.6 Example

    @@ -863,10 +863,10 @@ where almost everything is generated by a typemap: -

    27.5 More hints to the generator

    +

    28.5 More hints to the generator

    -

    27.5.1 Features

    +

    28.5.1 Features

    @@ -903,7 +903,7 @@ where almost everything is generated by a typemap:
    -

    27.5.2 Pragmas

    +

    28.5.2 Pragmas

    @@ -926,7 +926,7 @@ where almost everything is generated by a typemap:
    -

    27.6 Remarks

    +

    28.6 Remarks

      diff --git a/Doc/Manual/Modules.html b/Doc/Manual/Modules.html index c44341e56..551fd0750 100644 --- a/Doc/Manual/Modules.html +++ b/Doc/Manual/Modules.html @@ -6,7 +6,7 @@ -

      15 Working with Modules

      +

      16 Working with Modules

        @@ -23,7 +23,7 @@ -

        15.1 Modules Introduction

        +

        16.1 Modules Introduction

        @@ -77,7 +77,7 @@ where you want to create a collection of modules. Each module in the collection is created via separate invocations of SWIG.

        -

        15.2 Basics

        +

        16.2 Basics

        @@ -176,7 +176,7 @@ in parallel from multiple threads as SWIG provides no locking - for more on that issue, read on.

        -

        15.3 The SWIG runtime code

        +

        16.3 The SWIG runtime code

        @@ -242,7 +242,7 @@ can peacefully coexist. So the type structures are separated by the is empty. Only modules compiled with the same pair will share type information.

        -

        15.4 External access to the runtime

        +

        16.4 External access to the runtime

        As described in The run-time type checker, @@ -279,7 +279,7 @@ SWIG_TYPE_TABLE to be the same as the module whose types you are trying to access.

        -

        15.5 A word of caution about static libraries

        +

        16.5 A word of caution about static libraries

        @@ -290,7 +290,7 @@ into it. This is very often NOT what you want and it can lead to unexpect behavior. When working with dynamically loadable modules, you should try to work exclusively with shared libraries.

        -

        15.6 References

        +

        16.6 References

        @@ -298,7 +298,7 @@ Due to the complexity of working with shared libraries and multiple modules, it an outside reference. John Levine's "Linkers and Loaders" is highly recommended.

        -

        15.7 Reducing the wrapper file size

        +

        16.7 Reducing the wrapper file size

        diff --git a/Doc/Manual/Mzscheme.html b/Doc/Manual/Mzscheme.html index 3b49a2974..40173d720 100644 --- a/Doc/Manual/Mzscheme.html +++ b/Doc/Manual/Mzscheme.html @@ -8,7 +8,7 @@ -

        28 SWIG and MzScheme/Racket

        +

        29 SWIG and MzScheme/Racket

          @@ -24,7 +24,7 @@

          This section contains information on SWIG's support of Racket, formally known as MzScheme. -

          28.1 Creating native structures

          +

          29.1 Creating native structures

          @@ -65,7 +65,7 @@ Then in scheme, you can use regular struct access procedures like

        -

        28.2 Simple example

        +

        29.2 Simple example

        @@ -166,7 +166,7 @@ Some points of interest:

      • The above requests mzc to create an extension using the CGC garbage-collector. The alternative -- the 3m collector -- has generally better performance, but work is still required for SWIG to emit code which is compatible with it.
      -

      28.3 External documentation

      +

      29.3 External documentation

      diff --git a/Doc/Manual/Ocaml.html b/Doc/Manual/Ocaml.html index 2eef3ad4d..ec46d6e50 100644 --- a/Doc/Manual/Ocaml.html +++ b/Doc/Manual/Ocaml.html @@ -6,7 +6,7 @@ -

      29 SWIG and Ocaml

      +

      30 SWIG and Ocaml

        @@ -80,7 +80,7 @@ If you're not familiar with the Objective Caml language, you can visit The Ocaml Website.

        -

        29.1 Preliminaries

        +

        30.1 Preliminaries

        @@ -99,7 +99,7 @@ file Examples/Makefile illustrate how to compile and link SWIG modules that will be loaded dynamically. This has only been tested on Linux so far.

        -

        29.1.1 Running SWIG

        +

        30.1.1 Running SWIG

        @@ -122,7 +122,7 @@ you will compile the file example_wrap.c with ocamlc or the resulting .ml and .mli files as well, and do the final link with -custom (not needed for native link).

        -

        29.1.2 Compiling the code

        +

        30.1.2 Compiling the code

        @@ -158,7 +158,7 @@ the user more freedom with respect to custom typing.

      -

      29.1.3 The camlp4 module

      +

      30.1.3 The camlp4 module

      @@ -234,7 +234,7 @@ let b = C_string (getenv "PATH") -

      29.1.4 Using your module

      +

      30.1.4 Using your module

      @@ -248,7 +248,7 @@ When linking any ocaml bytecode with your module, use the -custom option is not needed when you build native code.

      -

      29.1.5 Compilation problems and compiling with C++

      +

      30.1.5 Compilation problems and compiling with C++

      @@ -259,7 +259,7 @@ liberal with pointer types may not compile under the C++ compiler. Most code meant to be compiled as C++ will not have problems.

      -

      29.2 The low-level Ocaml/C interface

      +

      30.2 The low-level Ocaml/C interface

      @@ -360,7 +360,7 @@ is that you must append them to the return list with swig_result = caml_list_a signature for a function that uses value in this way.

      -

      29.2.1 The generated module

      +

      30.2.1 The generated module

      @@ -394,7 +394,7 @@ it describes the output SWIG will generate for class definitions. -

      29.2.2 Enums

      +

      30.2.2 Enums

      @@ -457,7 +457,7 @@ val x : Enum_test.c_obj = C_enum `a

      -

      29.2.2.1 Enum typing in Ocaml

      +

      30.2.2.1 Enum typing in Ocaml

      @@ -470,10 +470,10 @@ functions imported from different modules. You must convert values to master values using the swig_val function before sharing them with another module.

      -

      29.2.3 Arrays

      +

      30.2.3 Arrays

      -

      29.2.3.1 Simple types of bounded arrays

      +

      30.2.3.1 Simple types of bounded arrays

      @@ -494,7 +494,7 @@ arrays of simple types with known bounds in your code, but this only works for arrays whose bounds are completely specified.

      -

      29.2.3.2 Complex and unbounded arrays

      +

      30.2.3.2 Complex and unbounded arrays

      @@ -507,7 +507,7 @@ SWIG can't predict which of these methods will be used in the array, so you have to specify it for yourself in the form of a typemap.

      -

      29.2.3.3 Using an object

      +

      30.2.3.3 Using an object

      @@ -521,7 +521,7 @@ Consider writing an object when the ending condition of your array is complex, such as using a required sentinel, etc.

      -

      29.2.3.4 Example typemap for a function taking float * and int

      +

      30.2.3.4 Example typemap for a function taking float * and int

      @@ -572,7 +572,7 @@ void printfloats( float *tab, int len ); -

      29.2.4 C++ Classes

      +

      30.2.4 C++ Classes

      @@ -615,7 +615,7 @@ the underlying pointer, so using create_[x]_from_ptr alters the returned value for the same object.

      -

      29.2.4.1 STL vector and string Example

      +

      30.2.4.1 STL vector and string Example

      @@ -695,7 +695,7 @@ baz # -

      29.2.4.2 C++ Class Example

      +

      30.2.4.2 C++ Class Example

      @@ -725,7 +725,7 @@ public: }; -

      29.2.4.3 Compiling the example

      +

      30.2.4.3 Compiling the example

      @@ -743,7 +743,7 @@ bash-2.05a$ ocamlmktop -custom swig.cmo -I `camlp4 -where` \
         -L$QTPATH/lib -cclib -lqt
       
      -

      29.2.4.4 Sample Session

      +

      30.2.4.4 Sample Session

      @@ -770,10 +770,10 @@ Assuming you have a working installation of QT, you will see a window
       containing the string "hi" in a button.  
       

      -

      29.2.5 Director Classes

      +

      30.2.5 Director Classes

      -

      29.2.5.1 Director Introduction

      +

      30.2.5.1 Director Introduction

      @@ -800,7 +800,7 @@ class foo { };

      -

      29.2.5.2 Overriding Methods in Ocaml

      +

      30.2.5.2 Overriding Methods in Ocaml

      @@ -828,7 +828,7 @@ In this example, I'll examine the objective caml code involved in providing an overloaded class. This example is contained in Examples/ocaml/shapes.

      -

      29.2.5.3 Director Usage Example

      +

      30.2.5.3 Director Usage Example

      @@ -887,7 +887,7 @@ in a more effortless style in ocaml, while leaving the "engine" part of the program in C++.

      -

      29.2.5.4 Creating director objects

      +

      30.2.5.4 Creating director objects

      @@ -928,7 +928,7 @@ object from causing a core dump, as long as the object is destroyed properly.

      -

      29.2.5.5 Typemaps for directors, directorin, directorout, directorargout

      +

      30.2.5.5 Typemaps for directors, directorin, directorout, directorargout

      @@ -939,7 +939,7 @@ well as a function return value in the same way you provide function arguments, and to receive arguments the same way you normally receive function returns.

      -

      29.2.5.6 directorin typemap

      +

      30.2.5.6 directorin typemap

      @@ -950,7 +950,7 @@ code receives when you are called. In general, a simple directorin typ can use the same body as a simple out typemap.

      -

      29.2.5.7 directorout typemap

      +

      30.2.5.7 directorout typemap

      @@ -961,7 +961,7 @@ for the same type, except when there are special requirements for object ownership, etc.

      -

      29.2.5.8 directorargout typemap

      +

      30.2.5.8 directorargout typemap

      @@ -978,7 +978,7 @@ In the event that you don't specify all of the necessary values, integral values will read zero, and struct or object returns have undefined results.

      -

      29.2.6 Exceptions

      +

      30.2.6 Exceptions

      diff --git a/Doc/Manual/Octave.html b/Doc/Manual/Octave.html index 42c6526b7..bc6873c4b 100644 --- a/Doc/Manual/Octave.html +++ b/Doc/Manual/Octave.html @@ -8,7 +8,7 @@ -

      30 SWIG and Octave

      +

      31 SWIG and Octave

        @@ -55,7 +55,7 @@ More information can be found at O Also, there are a dozen or so examples in the Examples/octave directory, and hundreds in the test suite (Examples/test-suite and Examples/test-suite/octave).

        -

        30.1 Preliminaries

        +

        31.1 Preliminaries

        @@ -63,7 +63,7 @@ As of SWIG 3.0.0, the Octave module has been tested with Octave versions 3.0.5, Use of Octave versions older than 3.x.x is not recommended, as these versions are no longer tested with SWIG.

        -

        30.2 Running SWIG

        +

        31.2 Running SWIG

        @@ -95,7 +95,7 @@ The -c++ option is also required when wrapping C++ code: This creates a C++ source file "example_wrap.cpp". A C++ file is generated even when wrapping C code as Octave is itself written in C++ and requires wrapper code to be in the same language. The generated C++ source file contains the low-level wrappers that need to be compiled and linked with the rest of your C/C++ application (in this case, the gcd implementation) to create an extension module.

        -

        30.2.1 Command-line options

        +

        31.2.1 Command-line options

        @@ -118,7 +118,7 @@ The special name "." loads C global variables into the module namespace, i.e. al The -opprefix options sets the prefix of the names of global/friend operator functions.

        -

        30.2.2 Compiling a dynamic module

        +

        31.2.2 Compiling a dynamic module

        @@ -145,7 +145,7 @@ $ mkoctfile example_wrap.cpp example.c

        octave:1> swigexample
        -

        30.2.3 Using your module

        +

        31.2.3 Using your module

        @@ -163,10 +163,10 @@ octave:4> swigexample.cvar.Foo=4; octave:5> swigexample.cvar.Foo ans = 4

      -

      30.3 A tour of basic C/C++ wrapping

      +

      31.3 A tour of basic C/C++ wrapping

      -

      30.3.1 Modules

      +

      31.3.1 Modules

      @@ -211,7 +211,7 @@ octave:4> swigexample.gcd(4,6) ans = 2 -

      30.3.2 Functions

      +

      31.3.2 Functions

      @@ -228,7 +228,7 @@ int fact(int n);

      octave:1> swigexample.fact(4)
       24 
      -

      30.3.3 Global variables

      +

      31.3.3 Global variables

      @@ -281,7 +281,7 @@ octave:2> swigexample.PI=3.142; octave:3> swigexample.PI ans = 3.1420 -

      30.3.4 Constants and enums

      +

      31.3.4 Constants and enums

      @@ -303,7 +303,7 @@ swigexample.SCONST="Hello World" swigexample.SUNDAY=0 .... -

      30.3.5 Pointers

      +

      31.3.5 Pointers

      @@ -350,7 +350,7 @@ octave:2> f=swigexample.fopen("not there","r"); error: value on right hand side of assignment is undefined error: evaluating assignment expression near line 2, column 2 -

      30.3.6 Structures and C++ classes

      +

      31.3.6 Structures and C++ classes

      @@ -485,7 +485,7 @@ ans = 1 Depending on the ownership setting of a swig_ref, it may call C++ destructors when its reference count goes to zero. See the section on memory management below for details.

      -

      30.3.7 C++ inheritance

      +

      31.3.7 C++ inheritance

      @@ -494,7 +494,7 @@ This information contains the full class hierarchy. When an indexing operation ( the tree is walked to find a match in the current class as well as any of its bases. The lookup is then cached in the swig_ref.

      -

      30.3.8 C++ overloaded functions

      +

      31.3.8 C++ overloaded functions

      @@ -504,7 +504,7 @@ The dispatch function selects which overload to call (if any) based on the passe typecheck typemaps are used to analyze each argument, as well as assign precedence. See the chapter on typemaps for details.

      -

      30.3.9 C++ operators

      +

      31.3.9 C++ operators

      @@ -608,7 +608,7 @@ On the C++ side, the default mappings are as follows: Octave can also utilise friend (i.e. non-member) operators with a simple %rename: see the example in the Examples/octave/operator directory.

      -

      30.3.10 Class extension with %extend

      +

      31.3.10 Class extension with %extend

      @@ -638,7 +638,7 @@ octave:3> printf("%s\n",a); octave:4> a.__str() 4 -

      30.3.11 C++ templates

      +

      31.3.11 C++ templates

      @@ -715,14 +715,14 @@ ans = -

      30.3.12 C++ Smart Pointers

      +

      31.3.12 C++ Smart Pointers

      C++ smart pointers are fully supported as in other modules.

      -

      30.3.13 Directors (calling Octave from C++ code)

      +

      31.3.13 Directors (calling Octave from C++ code)

      @@ -803,14 +803,14 @@ c-side routine called octave-side routine called -

      30.3.14 Threads

      +

      31.3.14 Threads

      The use of threads in wrapped Director code is not supported; i.e., an Octave-side implementation of a C++ class must be called from the Octave interpreter's thread. Anything fancier (apartment/queue model, whatever) is left to the user. Without anything fancier, this amounts to the limitation that Octave must drive the module... like, for example, an optimization package that calls Octave to evaluate an objective function.

      -

      30.3.15 Memory management

      +

      31.3.15 Memory management

      @@ -844,14 +844,14 @@ The %newobject directive may be used to control this behavior for pointers retur In the case where one wishes for the C++ side to own an object that was created in Octave (especially a Director object), one can use the __disown() method to invert this logic. Then letting the Octave reference count go to zero will not destroy the object, but destroying the object will invalidate the Octave-side object if it still exists (and call destructors of other C++ bases in the case of multiple inheritance/subclass()'ing).

      -

      30.3.16 STL support

      +

      31.3.16 STL support

      Various STL library files are provided for wrapping STL containers.

      -

      30.3.17 Matrix typemaps

      +

      31.3.17 Matrix typemaps

      diff --git a/Doc/Manual/Perl5.html b/Doc/Manual/Perl5.html index 9e577b08b..010eb48df 100644 --- a/Doc/Manual/Perl5.html +++ b/Doc/Manual/Perl5.html @@ -6,7 +6,7 @@ -

      31 SWIG and Perl5

      +

      32 SWIG and Perl5

        @@ -96,7 +96,7 @@ later. We're no longer testing regularly with older versions, but Perl 5.6 seems to mostly work, while older versions don't.

        -

        31.1 Overview

        +

        32.1 Overview

        @@ -117,7 +117,7 @@ described. Advanced customization features, typemaps, and other options are found near the end of the chapter.

        -

        31.2 Preliminaries

        +

        32.2 Preliminaries

        @@ -142,7 +142,7 @@ To build the module, you will need to compile the file example_wrap.c and link it with the rest of your program.

        -

        31.2.1 Getting the right header files

        +

        32.2.1 Getting the right header files

        @@ -174,7 +174,7 @@ $ perl -e 'use Config; print "$Config{archlib}\n";'

      -

      31.2.2 Compiling a dynamic module

      +

      32.2.2 Compiling a dynamic module

      @@ -207,7 +207,7 @@ the target should be named `example.so', `example.sl', or the appropriate dynamic module name on your system.

      -

      31.2.3 Building a dynamic module with MakeMaker

      +

      32.2.3 Building a dynamic module with MakeMaker

      @@ -241,7 +241,7 @@ the preferred approach to compilation. More information about MakeMaker can be found in "Programming Perl, 2nd ed." by Larry Wall, Tom Christiansen, and Randal Schwartz.

      -

      31.2.4 Building a static version of Perl

      +

      32.2.4 Building a static version of Perl

      @@ -310,7 +310,7 @@ added to it. Depending on your machine, you may need to link with additional libraries such as -lsocket, -lnsl, -ldl, etc.

      -

      31.2.5 Using the module

      +

      32.2.5 Using the module

      @@ -463,7 +463,7 @@ system configuration (this requires root access and you will need to read the man pages).

      -

      31.2.6 Compilation problems and compiling with C++

      +

      32.2.6 Compilation problems and compiling with C++

      @@ -606,7 +606,7 @@ have to find the macro that conflicts and add an #undef into the .i file. Pleas any conflicting macros you find to swig-user mailing list.

      -

      31.2.7 Compiling for 64-bit platforms

      +

      32.2.7 Compiling for 64-bit platforms

      @@ -633,7 +633,7 @@ also introduce problems on platforms that support more than one linking standard (e.g., -o32 and -n32 on Irix).

      -

      31.3 Building Perl Extensions under Windows

      +

      32.3 Building Perl Extensions under Windows

      @@ -644,7 +644,7 @@ section assumes you are using SWIG with Microsoft Visual C++ although the procedure may be similar with other compilers.

      -

      31.3.1 Running SWIG from Developer Studio

      +

      32.3.1 Running SWIG from Developer Studio

      @@ -707,7 +707,7 @@ print "$a\n"; -

      31.3.2 Using other compilers

      +

      32.3.2 Using other compilers

      @@ -715,7 +715,7 @@ SWIG is known to work with Cygwin and may work with other compilers on Windows. For general hints and suggestions refer to the Windows chapter.

      -

      31.4 The low-level interface

      +

      32.4 The low-level interface

      @@ -725,7 +725,7 @@ can be used to control your application. However, it is also used to construct more user-friendly proxy classes as described in the next section.

      -

      31.4.1 Functions

      +

      32.4.1 Functions

      @@ -748,7 +748,7 @@ use example; $a = &example::fact(2); -

      31.4.2 Global variables

      +

      32.4.2 Global variables

      @@ -818,7 +818,7 @@ extern char *path; // Declared later in the input -

      31.4.3 Constants

      +

      32.4.3 Constants

      @@ -858,7 +858,7 @@ print example::FOO,"\n"; -

      31.4.4 Pointers

      +

      32.4.4 Pointers

      @@ -967,7 +967,7 @@ as XS and xsubpp. Given the advancement of the SWIG typesystem and the SWIG and XS, this is no longer supported.

      -

      31.4.5 Structures

      +

      32.4.5 Structures

      @@ -1101,7 +1101,7 @@ void Bar_f_set(Bar *b, Foo *val) { -

      31.4.6 C++ classes

      +

      32.4.6 C++ classes

      @@ -1166,7 +1166,7 @@ provides direct access to C++ objects. A higher level interface using Perl prox can be built using these low-level accessors. This is described shortly.

      -

      31.4.7 C++ classes and type-checking

      +

      32.4.7 C++ classes and type-checking

      @@ -1202,7 +1202,7 @@ If necessary, the type-checker also adjusts the value of the pointer (as is nece multiple inheritance is used).

      -

      31.4.8 C++ overloaded functions

      +

      32.4.8 C++ overloaded functions

      @@ -1246,7 +1246,7 @@ example::Spam_foo_d($s,3.14); Please refer to the "SWIG Basics" chapter for more information.

      -

      31.4.9 Operators

      +

      32.4.9 Operators

      @@ -1273,7 +1273,7 @@ The following C++ operators are currently supported by the Perl module:

    • operator or
    • -

      31.4.10 Modules and packages

      +

      32.4.10 Modules and packages

      @@ -1368,7 +1368,7 @@ print Foo::fact(4),"\n"; # Call a function in package FooBar --> -

      31.5 Input and output parameters

      +

      32.5 Input and output parameters

      @@ -1587,7 +1587,7 @@ print "$c\n"; Note: The REFERENCE feature is only currently supported for numeric types (integers and floating point).

      -

      31.6 Exception handling

      +

      32.6 Exception handling

      @@ -1752,7 +1752,7 @@ This is still supported, but it is deprecated. The newer %exception di functionality, but it has additional capabilities that make it more powerful.

      -

      31.7 Remapping datatypes with typemaps

      +

      32.7 Remapping datatypes with typemaps

      @@ -1769,7 +1769,7 @@ Typemaps are only used if you want to change some aspect of the primitive C-Perl interface.

      -

      31.7.1 A simple typemap example

      +

      32.7.1 A simple typemap example

      @@ -1873,7 +1873,7 @@ example::count("e","Hello World"); -

      31.7.2 Perl5 typemaps

      +

      32.7.2 Perl5 typemaps

      @@ -1978,7 +1978,7 @@ Return of C++ member data (all languages). Check value of input parameter. -

      31.7.3 Typemap variables

      +

      32.7.3 Typemap variables

      @@ -2049,7 +2049,7 @@ properly assigned. The Perl name of the wrapper function being created. -

      31.7.4 Useful functions

      +

      32.7.4 Useful functions

      @@ -2118,7 +2118,7 @@ int sv_isa(SV *, char *0; -

      31.8 Typemap Examples

      +

      32.8 Typemap Examples

      @@ -2127,7 +2127,7 @@ might look at the files "perl5.swg" and "typemaps.i" in the SWIG library.

      -

      31.8.1 Converting a Perl5 array to a char **

      +

      32.8.1 Converting a Perl5 array to a char **

      @@ -2219,7 +2219,7 @@ print @$b,"\n"; # Print it out -

      31.8.2 Return values

      +

      32.8.2 Return values

      @@ -2248,7 +2248,7 @@ can be done using the EXTEND() macro as in: } -

      31.8.3 Returning values from arguments

      +

      32.8.3 Returning values from arguments

      @@ -2302,7 +2302,7 @@ print "multout(7,13) = @r\n"; ($x,$y) = multout(7,13); -

      31.8.4 Accessing array structure members

      +

      32.8.4 Accessing array structure members

      @@ -2365,7 +2365,7 @@ the "in" typemap in the previous section would be used to convert an to copy the converted array into a C data structure.

      -

      31.8.5 Turning Perl references into C pointers

      +

      32.8.5 Turning Perl references into C pointers

      @@ -2430,7 +2430,7 @@ print "$c\n"; -

      31.8.6 Pointer handling

      +

      32.8.6 Pointer handling

      @@ -2509,7 +2509,7 @@ For example: -

      31.9 Proxy classes

      +

      32.9 Proxy classes

      @@ -2525,7 +2525,7 @@ to the underlying code. This section describes the implementation details of the proxy interface.

      -

      31.9.1 Preliminaries

      +

      32.9.1 Preliminaries

      @@ -2547,7 +2547,7 @@ SWIG creates a collection of high-level Perl wrappers. In your scripts, you wil high level wrappers. The wrappers, in turn, interact with the low-level procedural module.

      -

      31.9.2 Structure and class wrappers

      +

      32.9.2 Structure and class wrappers

      @@ -2673,7 +2673,7 @@ $v->DESTROY(); -

      31.9.3 Object Ownership

      +

      32.9.3 Object Ownership

      @@ -2760,7 +2760,7 @@ counting, garbage collection, or advanced features one might find in sophisticated languages.

      -

      31.9.4 Nested Objects

      +

      32.9.4 Nested Objects

      @@ -2813,7 +2813,7 @@ $p->{f}->{x} = 0.0; %${$p->{v}} = ( x=>0, y=>0, z=>0); -

      31.9.5 Proxy Functions

      +

      32.9.5 Proxy Functions

      @@ -2847,7 +2847,7 @@ This function replaces the original function, but operates in an identical manner.

      -

      31.9.6 Inheritance

      +

      32.9.6 Inheritance

      @@ -2923,7 +2923,7 @@ particular, inheritance of data members is extremely tricky (and I'm not even sure if it really works).

      -

      31.9.7 Modifying the proxy methods

      +

      32.9.7 Modifying the proxy methods

      @@ -2951,7 +2951,7 @@ public: }; -

      31.10 Adding additional Perl code

      +

      32.10 Adding additional Perl code

      @@ -3002,7 +3002,7 @@ set_transform($im, $a); -

      31.11 Cross language polymorphism

      +

      32.11 Cross language polymorphism

      @@ -3036,7 +3036,7 @@ proxy classes, director classes, and C wrapper functions takes care of all the cross-language method routing transparently.

      -

      31.11.1 Enabling directors

      +

      32.11.1 Enabling directors

      @@ -3126,7 +3126,7 @@ sub one { -

      31.11.2 Director classes

      +

      32.11.2 Director classes

      @@ -3206,7 +3206,7 @@ so there is no need for the extra overhead involved with routing the calls through Perl.

      -

      31.11.3 Ownership and object destruction

      +

      32.11.3 Ownership and object destruction

      @@ -3255,7 +3255,7 @@ sub DESTROY { -

      31.11.4 Exception unrolling

      +

      32.11.4 Exception unrolling

      @@ -3311,7 +3311,7 @@ Swig::DirectorMethodException is thrown, Perl will register the exception as soon as the C wrapper function returns.

      -

      31.11.5 Overhead and code bloat

      +

      32.11.5 Overhead and code bloat

      @@ -3345,7 +3345,7 @@ directive) for only those methods that are likely to be extended in Perl.

      -

      31.11.6 Typemaps

      +

      32.11.6 Typemaps

      diff --git a/Doc/Manual/Php.html b/Doc/Manual/Php.html index 19bfab6ba..493c861f8 100644 --- a/Doc/Manual/Php.html +++ b/Doc/Manual/Php.html @@ -7,7 +7,7 @@ -

      32 SWIG and PHP

      +

      33 SWIG and PHP

        @@ -79,7 +79,7 @@ your extension into php directly, you will need the complete PHP source tree available.

        -

        32.1 Generating PHP Extensions

        +

        33.1 Generating PHP Extensions

        @@ -126,7 +126,7 @@ and it doesn't play nicely with package system. We don't recommend this approach, or provide explicit support for it.

        -

        32.1.1 Building a loadable extension

        +

        33.1.1 Building a loadable extension

        @@ -141,7 +141,7 @@ least work for Linux though): gcc -shared example_wrap.o -o example.so

      -

      32.1.2 Using PHP Extensions

      +

      33.1.2 Using PHP Extensions

      @@ -172,7 +172,7 @@ attempts to do the dl() call for you: include("example.php"); -

      32.2 Basic PHP interface

      +

      33.2 Basic PHP interface

      @@ -183,7 +183,7 @@ other symbols unless care is taken to %rename them. At present SWIG doesn't have support for the namespace feature added in PHP 5.3.

      -

      32.2.1 Constants

      +

      33.2.1 Constants

      @@ -260,7 +260,7 @@ is treated as true by the if test, when the value of the intended constant would be treated as false!

      -

      32.2.2 Global Variables

      +

      33.2.2 Global Variables

      @@ -309,7 +309,7 @@ undefined. At this time SWIG does not support custom accessor methods.

      -

      32.2.3 Functions

      +

      33.2.3 Functions

      @@ -362,7 +362,7 @@ print $s; # The value of $s was not changed. --> -

      32.2.4 Overloading

      +

      33.2.4 Overloading

      @@ -418,7 +418,7 @@ taking the integer argument.

      --> -

      32.2.5 Pointers and References

      +

      33.2.5 Pointers and References

      @@ -563,7 +563,7 @@ PHP in a number of ways: by using unset on an existing variable, or assigning NULL to a variable.

      -

      32.2.6 Structures and C++ classes

      +

      33.2.6 Structures and C++ classes

      @@ -624,7 +624,7 @@ Would be used in the following way from PHP5: Member variables and methods are accessed using the -> operator.

      -

      32.2.6.1 Using -noproxy

      +

      33.2.6.1 Using -noproxy

      @@ -650,7 +650,7 @@ Complex_im_set($obj,$d); Complex_im_get($obj); -

      32.2.6.2 Constructors and Destructors

      +

      33.2.6.2 Constructors and Destructors

      @@ -691,7 +691,7 @@ the programmer can either reassign the variable or call unset($v)

      -

      32.2.6.3 Static Member Variables

      +

      33.2.6.3 Static Member Variables

      @@ -734,7 +734,7 @@ Ko::threats(10); echo "There have now been " . Ko::threats() . " threats\n"; -

      32.2.6.4 Static Member Functions

      +

      33.2.6.4 Static Member Functions

      @@ -756,7 +756,7 @@ Ko::threats(); -

      32.2.7 PHP Pragmas, Startup and Shutdown code

      +

      33.2.7 PHP Pragmas, Startup and Shutdown code

      @@ -844,7 +844,7 @@ The %rinit and %rshutdown statements are very similar but inse into the request init (PHP_RINIT_FUNCTION) and request shutdown (PHP_RSHUTDOWN_FUNCTION) code respectively.

      -

      32.3 Cross language polymorphism

      +

      33.3 Cross language polymorphism

      @@ -879,7 +879,7 @@ wrapper functions takes care of all the cross-language method routing transparently.

      -

      32.3.1 Enabling directors

      +

      33.3.1 Enabling directors

      @@ -968,7 +968,7 @@ class MyFoo extends Foo { -

      32.3.2 Director classes

      +

      33.3.2 Director classes

      @@ -1048,7 +1048,7 @@ so there is no need for the extra overhead involved with routing the calls through PHP.

      -

      32.3.3 Ownership and object destruction

      +

      33.3.3 Ownership and object destruction

      @@ -1104,7 +1104,7 @@ In this example, we are assuming that FooContainer will take care of deleting all the Foo pointers it contains at some point.

      -

      32.3.4 Exception unrolling

      +

      33.3.4 Exception unrolling

      @@ -1163,7 +1163,7 @@ Swig::DirectorMethodException is thrown, PHP will register the exception as soon as the C wrapper function returns.

      -

      32.3.5 Overhead and code bloat

      +

      33.3.5 Overhead and code bloat

      @@ -1196,7 +1196,7 @@ optimized by selectively enabling director methods (using the %feature directive) for only those methods that are likely to be extended in PHP.

      -

      32.3.6 Typemaps

      +

      33.3.6 Typemaps

      @@ -1210,7 +1210,7 @@ need to be supported.

      -

      32.3.7 Miscellaneous

      +

      33.3.7 Miscellaneous

      Director typemaps for STL classes are mostly in place, and hence you diff --git a/Doc/Manual/Pike.html b/Doc/Manual/Pike.html index 8c1eb2d36..3ede1a992 100644 --- a/Doc/Manual/Pike.html +++ b/Doc/Manual/Pike.html @@ -6,7 +6,7 @@ -

      33 SWIG and Pike

      +

      34 SWIG and Pike

        @@ -46,10 +46,10 @@ least, make sure you read the "SWIG Basics" chapter.

        -

        33.1 Preliminaries

        +

        34.1 Preliminaries

        -

        33.1.1 Running SWIG

        +

        34.1.1 Running SWIG

        @@ -94,7 +94,7 @@ can use the -o option:

        $ swig -pike -o pseudonym.c example.i
        -

        33.1.2 Getting the right header files

        +

        34.1.2 Getting the right header files

        @@ -114,7 +114,7 @@ You're looking for files with the names global.h, program.h and so on.

        -

        33.1.3 Using your module

        +

        34.1.3 Using your module

        @@ -129,10 +129,10 @@ Pike v7.4 release 10 running Hilfe v3.5 (Incremental Pike Frontend) (1) Result: 24

      -

      33.2 Basic C/C++ Mapping

      +

      34.2 Basic C/C++ Mapping

      -

      33.2.1 Modules

      +

      34.2.1 Modules

      @@ -143,7 +143,7 @@ concerned), SWIG's %module directive doesn't really have any significance.

      -

      33.2.2 Functions

      +

      34.2.2 Functions

      @@ -168,7 +168,7 @@ exactly as you'd expect it to: (1) Result: 24 -

      33.2.3 Global variables

      +

      34.2.3 Global variables

      @@ -197,7 +197,7 @@ will result in two functions, Foo_get() and Foo_set(): (3) Result: 3.141590 -

      33.2.4 Constants and enumerated types

      +

      34.2.4 Constants and enumerated types

      @@ -205,7 +205,7 @@ Enumerated types in C/C++ declarations are wrapped as Pike constants, not as Pike enums.

      -

      33.2.5 Constructors and Destructors

      +

      34.2.5 Constructors and Destructors

      @@ -213,7 +213,7 @@ Constructors are wrapped as create() methods, and destructors are wrapped as destroy() methods, for Pike classes.

      -

      33.2.6 Static Members

      +

      34.2.6 Static Members

      diff --git a/Doc/Manual/Preprocessor.html b/Doc/Manual/Preprocessor.html index 8fcbe9206..d5c41dde7 100644 --- a/Doc/Manual/Preprocessor.html +++ b/Doc/Manual/Preprocessor.html @@ -6,7 +6,7 @@ -

      7 Preprocessing

      +

      8 Preprocessing

        @@ -37,7 +37,7 @@ However, a number of modifications and enhancements have been made. This chapter describes some of these modifications.

        -

        7.1 File inclusion

        +

        8.1 File inclusion

        @@ -63,7 +63,7 @@ By default, the #include is ignored unless you run SWIG with the is that you often don't want SWIG to try and wrap everything included in standard header system headers and auxiliary files. -

        7.2 File imports

        +

        8.2 File imports

        @@ -92,7 +92,7 @@ The -importall directive tells SWIG to follow all #include sta as imports. This might be useful if you want to extract type definitions from system header files without generating any wrappers. -

        7.3 Conditional Compilation

        +

        8.3 Conditional Compilation

        @@ -152,7 +152,7 @@ SWIG (except for the symbol `SWIG' which is only defined within the SWIG compiler).

        -

        7.4 Macro Expansion

        +

        8.4 Macro Expansion

        @@ -207,7 +207,7 @@ like #x. This is a non-standard SWIG extension.

      -

      7.5 SWIG Macros

      +

      8.5 SWIG Macros

      @@ -253,7 +253,7 @@ many of SWIG's advanced features and libraries are built using this mechanism (s support).

      -

      7.6 C99 and GNU Extensions

      +

      8.6 C99 and GNU Extensions

      @@ -309,14 +309,14 @@ interface building. However, they are used internally to implement a number of SWIG directives and are provided to make SWIG more compatible with C99 code.

      -

      7.7 Preprocessing and delimiters

      +

      8.7 Preprocessing and delimiters

      The preprocessor handles { }, " " and %{ %} delimiters differently.

      -

      7.7.1 Preprocessing and %{ ... %} & " ... " delimiters

      +

      8.7.1 Preprocessing and %{ ... %} & " ... " delimiters

      @@ -341,7 +341,7 @@ the contents of the %{ ... %} block are copied without modification to the output (including all preprocessor directives).

      -

      7.7.2 Preprocessing and { ... } delimiters

      +

      8.7.2 Preprocessing and { ... } delimiters

      @@ -383,7 +383,7 @@ to actually go into the wrapper file, prefix the preprocessor directives with % and leave the preprocessor directive in the code.

      -

      7.8 Preprocessor and Typemaps

      +

      8.8 Preprocessor and Typemaps

      @@ -454,7 +454,7 @@ would generate

      -

      7.9 Viewing preprocessor output

      +

      8.9 Viewing preprocessor output

      @@ -464,7 +464,7 @@ Instead the results after the preprocessor has run are displayed. This might be useful as an aid to debugging and viewing the results of macro expansions.

      -

      7.10 The #error and #warning directives

      +

      8.10 The #error and #warning directives

      diff --git a/Doc/Manual/Python.html b/Doc/Manual/Python.html index 522412fc8..dcfd7427e 100644 --- a/Doc/Manual/Python.html +++ b/Doc/Manual/Python.html @@ -6,7 +6,7 @@ -

      34 SWIG and Python

      +

      35 SWIG and Python

        @@ -106,10 +106,10 @@
    • Python Packages
    • Python 3 Support
        @@ -141,7 +141,7 @@ very least, make sure you read the "SWIG Basics" chapter.

        -

        34.1 Overview

        +

        35.1 Overview

        @@ -168,10 +168,10 @@ described followed by a discussion of low-level implementation details.

        -

        34.2 Preliminaries

        +

        35.2 Preliminaries

        -

        34.2.1 Running SWIG

        +

        35.2.1 Running SWIG

        @@ -269,7 +269,7 @@ The following sections have further practical examples and details on how you might go about compiling and using the generated files.

        -

        34.2.2 Using distutils

        +

        35.2.2 Using distutils

        @@ -361,7 +361,7 @@ This same approach works on all platforms if the appropriate compiler is install can even build extensions to the standard Windows Python using MingGW)

        -

        34.2.3 Hand compiling a dynamic module

        +

        35.2.3 Hand compiling a dynamic module

        @@ -409,7 +409,7 @@ module actually consists of two files; socket.py and

        -

        34.2.4 Static linking

        +

        35.2.4 Static linking

        @@ -488,7 +488,7 @@ If using static linking, you might want to rely on a different approach (perhaps using distutils).

        -

        34.2.5 Using your module

        +

        35.2.5 Using your module

        @@ -645,7 +645,7 @@ system configuration (this requires root access and you will need to read the man pages).

        -

        34.2.6 Compilation of C++ extensions

        +

        35.2.6 Compilation of C++ extensions

        @@ -737,7 +737,7 @@ erratic program behavior. If working with lots of software components, you might want to investigate using a more formal standard such as COM.

        -

        34.2.7 Compiling for 64-bit platforms

        +

        35.2.7 Compiling for 64-bit platforms

        @@ -774,7 +774,7 @@ and -m64 allow you to choose the desired binary format for your python extension.

        -

        34.2.8 Building Python Extensions under Windows

        +

        35.2.8 Building Python Extensions under Windows

        @@ -903,7 +903,7 @@ SWIG Wiki.

        -

        34.3 A tour of basic C/C++ wrapping

        +

        35.3 A tour of basic C/C++ wrapping

        @@ -912,7 +912,7 @@ to your C/C++ code. Functions are wrapped as functions, classes are wrapped as This section briefly covers the essential aspects of this wrapping.

        -

        34.3.1 Modules

        +

        35.3.1 Modules

        @@ -925,7 +925,7 @@ module name, make sure you don't use the same name as a built-in Python command or standard module name.

        -

        34.3.2 Functions

        +

        35.3.2 Functions

        @@ -949,7 +949,7 @@ like you think it does: >>>

    • -

      34.3.3 Global variables

      +

      35.3.3 Global variables

      @@ -1087,7 +1087,7 @@ that starts with a leading underscore. SWIG does not create cvar if there are no global variables in a module.

      -

      34.3.4 Constants and enums

      +

      35.3.4 Constants and enums

      @@ -1127,7 +1127,7 @@ other object. Unfortunately, there is no easy way for SWIG to generate code that prevents this. You will just have to be careful.

      -

      34.3.5 Pointers

      +

      35.3.5 Pointers

      @@ -1268,7 +1268,7 @@ C-style cast may return a bogus result whereas as the C++-style cast will return None if the conversion can't be performed.

      -

      34.3.6 Structures

      +

      35.3.6 Structures

      @@ -1457,7 +1457,7 @@ everything works just like you would expect. For example: -

      34.3.7 C++ classes

      +

      35.3.7 C++ classes

      @@ -1546,7 +1546,7 @@ they are accessed through cvar like this: -

      34.3.8 C++ inheritance

      +

      35.3.8 C++ inheritance

      @@ -1601,7 +1601,7 @@ then the function spam() accepts Foo * or a pointer to any cla It is safe to use multiple inheritance with SWIG.

      -

      34.3.9 Pointers, references, values, and arrays

      +

      35.3.9 Pointers, references, values, and arrays

      @@ -1662,7 +1662,7 @@ treated as a returning value, and it will follow the same allocation/deallocation process.

      -

      34.3.10 C++ overloaded functions

      +

      35.3.10 C++ overloaded functions

      @@ -1785,7 +1785,7 @@ first declaration takes precedence. Please refer to the "SWIG and C++" chapter for more information about overloading.

      -

      34.3.11 C++ operators

      +

      35.3.11 C++ operators

      @@ -1874,7 +1874,7 @@ Also, be aware that certain operators don't map cleanly to Python. For instance overloaded assignment operators don't map to Python semantics and will be ignored.

      -

      34.3.12 C++ namespaces

      +

      35.3.12 C++ namespaces

      @@ -1941,7 +1941,7 @@ utilizes thousands of small deeply nested namespaces each with identical symbol names, well, then you get what you deserve.

      -

      34.3.13 C++ templates

      +

      35.3.13 C++ templates

      @@ -1995,7 +1995,7 @@ Some more complicated examples will appear later.

      -

      34.3.14 C++ Smart Pointers

      +

      35.3.14 C++ Smart Pointers

      @@ -2079,7 +2079,7 @@ simply use the __deref__() method. For example: -

      34.3.15 C++ reference counted objects

      +

      35.3.15 C++ reference counted objects

      @@ -2088,7 +2088,7 @@ Python examples of memory management using referencing counting.

      -

      34.4 Further details on the Python class interface

      +

      35.4 Further details on the Python class interface

      @@ -2111,7 +2111,7 @@ the -builtin option are in the Built-in section.

      -

      34.4.1 Proxy classes

      +

      35.4.1 Proxy classes

      @@ -2200,7 +2200,7 @@ you can attach new Python methods to the class and you can even inherit from it by Python built-in types until Python 2.2).

      -

      34.4.2 Built-in Types

      +

      35.4.2 Built-in Types

      @@ -2244,7 +2244,7 @@ please refer to the python documentation:

      http://docs.python.org/extending/newtypes.html

      -

      34.4.2.1 Limitations

      +

      35.4.2.1 Limitations

      Use of the -builtin option implies a couple of limitations: @@ -2412,7 +2412,7 @@ assert(issubclass(B.Derived, A.Base)) -

      34.4.2.2 Operator overloads -- use them!

      +

      35.4.2.2 Operator overloads -- use them!

      The entire justification for the -builtin option is improved @@ -2513,7 +2513,7 @@ structs.

      -

      34.4.3 Memory management

      +

      35.4.3 Memory management

      NOTE: Although this section refers to proxy objects, everything here also applies @@ -2708,7 +2708,7 @@ It is also possible to deal with situations like this using typemaps--an advanced topic discussed later.

      -

      34.4.4 Python 2.2 and classic classes

      +

      35.4.4 Python 2.2 and classic classes

      @@ -2745,7 +2745,7 @@ class itself. In Python-2.1 and earlier, they have to be accessed as a global function or through an instance (see the earlier section).

      -

      34.5 Cross language polymorphism

      +

      35.5 Cross language polymorphism

      @@ -2779,7 +2779,7 @@ proxy classes, director classes, and C wrapper functions takes care of all the cross-language method routing transparently.

      -

      34.5.1 Enabling directors

      +

      35.5.1 Enabling directors

      @@ -2869,7 +2869,7 @@ class MyFoo(mymodule.Foo): -

      34.5.2 Director classes

      +

      35.5.2 Director classes

      @@ -2951,7 +2951,7 @@ so there is no need for the extra overhead involved with routing the calls through Python.

      -

      34.5.3 Ownership and object destruction

      +

      35.5.3 Ownership and object destruction

      @@ -3018,7 +3018,7 @@ deleting all the Foo pointers it contains at some point. Note that no hard references to the Foo objects remain in Python.

      -

      34.5.4 Exception unrolling

      +

      35.5.4 Exception unrolling

      @@ -3077,7 +3077,7 @@ Swig::DirectorMethodException is thrown, Python will register the exception as soon as the C wrapper function returns.

      -

      34.5.5 Overhead and code bloat

      +

      35.5.5 Overhead and code bloat

      @@ -3111,7 +3111,7 @@ directive) for only those methods that are likely to be extended in Python.

      -

      34.5.6 Typemaps

      +

      35.5.6 Typemaps

      @@ -3125,7 +3125,7 @@ need to be supported.

      -

      34.5.7 Miscellaneous

      +

      35.5.7 Miscellaneous

      @@ -3172,7 +3172,7 @@ methods that return const references.

      -

      34.6 Common customization features

      +

      35.6 Common customization features

      @@ -3185,7 +3185,7 @@ This section describes some common SWIG features that are used to improve your the interface to an extension module.

      -

      34.6.1 C/C++ helper functions

      +

      35.6.1 C/C++ helper functions

      @@ -3266,7 +3266,7 @@ hard to implement. It is possible to clean this up using Python code, typemaps, customization features as covered in later sections.

      -

      34.6.2 Adding additional Python code

      +

      35.6.2 Adding additional Python code

      @@ -3494,7 +3494,7 @@ The same applies for overloaded constructors.

      -

      34.6.3 Class extension with %extend

      +

      35.6.3 Class extension with %extend

      @@ -3583,7 +3583,7 @@ Vector(12,14,16) in any way---the extensions only show up in the Python interface.

      -

      34.6.4 Exception handling with %exception

      +

      35.6.4 Exception handling with %exception

      @@ -3709,7 +3709,7 @@ The language-independent exception.i library file can also be used to raise exceptions. See the SWIG Library chapter.

      -

      34.7 Tips and techniques

      +

      35.7 Tips and techniques

      @@ -3719,7 +3719,7 @@ strings, binary data, and arrays. This chapter discusses the common techniques solving these problems.

      -

      34.7.1 Input and output parameters

      +

      35.7.1 Input and output parameters

      @@ -3932,7 +3932,7 @@ void foo(Bar *OUTPUT); may not have the intended effect since typemaps.i does not define an OUTPUT rule for Bar.

      -

      34.7.2 Simple pointers

      +

      35.7.2 Simple pointers

      @@ -4001,7 +4001,7 @@ If you replace %pointer_functions() by %pointer_class(type,name)SWIG Library chapter for further details.

      -

      34.7.3 Unbounded C Arrays

      +

      35.7.3 Unbounded C Arrays

      @@ -4063,7 +4063,7 @@ well suited for applications in which you need to create buffers, package binary data, etc.

      -

      34.7.4 String handling

      +

      35.7.4 String handling

      @@ -4132,7 +4132,7 @@ If you need to return binary data, you might use the also be used to extra binary data from arbitrary pointers.

      -

      34.8 Typemaps

      +

      35.8 Typemaps

      @@ -4149,7 +4149,7 @@ Typemaps are only used if you want to change some aspect of the primitive C-Python interface or if you want to elevate your guru status.

      -

      34.8.1 What is a typemap?

      +

      35.8.1 What is a typemap?

      @@ -4265,7 +4265,7 @@ parameter is omitted): -

      34.8.2 Python typemaps

      +

      35.8.2 Python typemaps

      @@ -4306,7 +4306,7 @@ a look at the SWIG library version 1.3.20 or so.

      -

      34.8.3 Typemap variables

      +

      35.8.3 Typemap variables

      @@ -4377,7 +4377,7 @@ properly assigned. The Python name of the wrapper function being created. -

      34.8.4 Useful Python Functions

      +

      35.8.4 Useful Python Functions

      @@ -4505,7 +4505,7 @@ write me -

      34.9 Typemap Examples

      +

      35.9 Typemap Examples

      @@ -4514,7 +4514,7 @@ might look at the files "python.swg" and "typemaps.i" in the SWIG library.

      -

      34.9.1 Converting Python list to a char **

      +

      35.9.1 Converting Python list to a char **

      @@ -4594,7 +4594,7 @@ memory allocation is used to allocate memory for the array, the the C function.

      -

      34.9.2 Expanding a Python object into multiple arguments

      +

      35.9.2 Expanding a Python object into multiple arguments

      @@ -4673,7 +4673,7 @@ to supply the argument count. This is automatically set by the typemap code. F -

      34.9.3 Using typemaps to return arguments

      +

      35.9.3 Using typemaps to return arguments

      @@ -4761,7 +4761,7 @@ function can now be used as follows: >>> -

      34.9.4 Mapping Python tuples into small arrays

      +

      35.9.4 Mapping Python tuples into small arrays

      @@ -4810,7 +4810,7 @@ array, such an approach would not be recommended for huge arrays, but for small structures, this approach works fine.

      -

      34.9.5 Mapping sequences to C arrays

      +

      35.9.5 Mapping sequences to C arrays

      @@ -4899,7 +4899,7 @@ static int convert_darray(PyObject *input, double *ptr, int size) { -

      34.9.6 Pointer handling

      +

      35.9.6 Pointer handling

      @@ -4996,7 +4996,7 @@ class object (if applicable). -

      34.10 Docstring Features

      +

      35.10 Docstring Features

      @@ -5024,7 +5024,7 @@ of your users much simpler.

      -

      34.10.1 Module docstring

      +

      35.10.1 Module docstring

      @@ -5058,7 +5058,7 @@ layout of controls on a panel, etc. to be loaded from an XML file." -

      34.10.2 %feature("autodoc")

      +

      35.10.2 %feature("autodoc")

      @@ -5086,7 +5086,7 @@ four levels for autodoc controlled by the value given to the feature, %feature("autodoc", "level"). The four values for level are covered in the following sub-sections. -

      34.10.2.1 %feature("autodoc", "0")

      +

      35.10.2.1 %feature("autodoc", "0")

      @@ -5115,7 +5115,7 @@ def function_name(*args, **kwargs): -

      34.10.2.2 %feature("autodoc", "1")

      +

      35.10.2.2 %feature("autodoc", "1")

      @@ -5140,7 +5140,7 @@ def function_name(*args, **kwargs): -

      34.10.2.3 %feature("autodoc", "2")

      +

      35.10.2.3 %feature("autodoc", "2")

      @@ -5200,7 +5200,7 @@ def function_name(*args, **kwargs): -

      34.10.2.4 %feature("autodoc", "3")

      +

      35.10.2.4 %feature("autodoc", "3")

      @@ -5225,7 +5225,7 @@ def function_name(*args, **kwargs): -

      34.10.2.5 %feature("autodoc", "docstring")

      +

      35.10.2.5 %feature("autodoc", "docstring")

      @@ -5244,7 +5244,7 @@ void GetPosition(int* OUTPUT, int* OUTPUT); -

      34.10.3 %feature("docstring")

      +

      35.10.3 %feature("docstring")

      @@ -5276,7 +5276,8 @@ with more than one line. -

      34.11 Python Packages

      +

      35.11 Python Packages

      +

      Python has concepts of modules and packages. Modules are separate units of code and may be grouped together to form a package. Packages may be nested, @@ -5333,7 +5334,8 @@ users may need to use special features such as the package option in th %module directive or import related command line options. These are explained in the following sections.

      -

      34.11.1 Setting the Python package

      +

      35.11.1 Setting the Python package

      +

      Using the package option in the %module directive allows you @@ -5386,7 +5388,8 @@ pkg1/pkg2/_foo.so # (shared library built from C/C++ code generated by SWI -

      34.11.2 Absolute and relative imports

      +

      35.11.2 Absolute and relative imports

      +

      Suppose, we have the following hierarchy of files:

      @@ -5524,7 +5527,8 @@ uses relative imports. Second case is, when one puts import directives in __init__.py to import symbols from submodules or subpackages and the submodule depends on other submodules (discussed later).

      -

      34.11.3 Enforcing absolute import semantics

      +

      35.11.3 Enforcing absolute import semantics

      +

      As you may know, there is an incompatibility in import semantics (for the import <> syntax) between Python 2 and 3. In Python 2.4 and @@ -5560,7 +5564,8 @@ from __future__ import absolute_import -

      34.11.4 Importing from __init__.py

      +

      35.11.4 Importing from __init__.py

      +

      Imports in __init__.py are handy when you want to populate a package's namespace with names imported from other modules. In SWIG based @@ -5670,7 +5675,7 @@ effect (note, that the Python 2 case also needs the -relativeimport workaround).

      -

      34.12 Python 3 Support

      +

      35.12 Python 3 Support

      @@ -5697,7 +5702,7 @@ The following are Python 3.0 new features that are currently supported by SWIG.

      -

      34.12.1 Function annotation

      +

      35.12.1 Function annotation

      @@ -5730,7 +5735,7 @@ For detailed usage of function annotation, see PEP 3107.

      -

      34.12.2 Buffer interface

      +

      35.12.2 Buffer interface

      @@ -5882,7 +5887,7 @@ modify the buffer. -

      34.12.3 Abstract base classes

      +

      35.12.3 Abstract base classes

      diff --git a/Doc/Manual/R.html b/Doc/Manual/R.html index ceea32146..ce9523ced 100644 --- a/Doc/Manual/R.html +++ b/Doc/Manual/R.html @@ -6,7 +6,7 @@ -

      35 SWIG and R

      +

      36 SWIG and R

        @@ -33,7 +33,7 @@ compile and run an R interface to QuantLib running on Mandriva Linux with gcc. The R bindings also work on Microsoft Windows using Visual C++.

        -

        35.1 Bugs

        +

        36.1 Bugs

        @@ -45,7 +45,7 @@ Currently the following features are not implemented or broken:

      • C Array wrappings
      -

      35.2 Using R and SWIG

      +

      36.2 Using R and SWIG

      @@ -119,7 +119,7 @@ Without it, inheritance of wrapped objects may fail. These two files can be loaded in any order

      -

      35.3 Precompiling large R files

      +

      36.3 Precompiling large R files

      In cases where the R file is large, one make save a lot of loading @@ -137,7 +137,7 @@ will save a large amount of loading time. -

      35.4 General policy

      +

      36.4 General policy

      @@ -146,7 +146,7 @@ wrapping over the underlying functions and rely on the R type system to provide R syntax.

      -

      35.5 Language conventions

      +

      36.5 Language conventions

      @@ -155,7 +155,7 @@ and [ are overloaded to allow for R syntax (one based indices and slices)

      -

      35.6 C++ classes

      +

      36.6 C++ classes

      @@ -167,7 +167,7 @@ keep track of the pointer object which removes the necessity for a lot of the proxy class baggage you see in other languages.

      -

      35.7 Enumerations

      +

      36.7 Enumerations

      diff --git a/Doc/Manual/Ruby.html b/Doc/Manual/Ruby.html index 6ff98ca23..3fc45834d 100644 --- a/Doc/Manual/Ruby.html +++ b/Doc/Manual/Ruby.html @@ -7,7 +7,7 @@ -

      36 SWIG and Ruby

      +

      37 SWIG and Ruby

        @@ -144,7 +144,7 @@

        This chapter describes SWIG's support of Ruby.

        -

        36.1 Preliminaries

        +

        37.1 Preliminaries

        SWIG 1.3 is known to work with Ruby versions 1.6 and later. @@ -159,7 +159,7 @@ read the "SWIG Basics" chapter. It is also assumed that the reader has a basic understanding of Ruby.

        -

        36.1.1 Running SWIG

        +

        37.1.1 Running SWIG

        To build a Ruby module, run SWIG using the -ruby @@ -183,7 +183,7 @@ if compiling a C++ extension) that contains all of the code needed to build a Ruby extension module. To finish building the module, you need to compile this file and link it with the rest of your program.

        -

        36.1.2 Getting the right header files

        +

        37.1.2 Getting the right header files

        In order to compile the wrapper code, the compiler needs the ruby.h @@ -206,7 +206,7 @@ installed, you can run Ruby to find out. For example:

      -

      36.1.3 Compiling a dynamic module

      +

      37.1.3 Compiling a dynamic module

      Ruby extension modules are typically compiled into shared @@ -279,7 +279,7 @@ manual pages for your compiler and linker to determine the correct set of options. You might also check the SWIG Wiki for additional information.

      -

      36.1.4 Using your module

      +

      37.1.4 Using your module

      Ruby module names must be capitalized, @@ -309,7 +309,7 @@ begins with:

      will result in an extension module using the feature name "example" and Ruby module name "Example".

      -

      36.1.5 Static linking

      +

      37.1.5 Static linking

      An alternative approach to dynamic linking is to rebuild the @@ -324,7 +324,7 @@ finding the Ruby source, adding an entry to the ext/Setup file, adding your directory to the list of extensions in the file, and finally rebuilding Ruby.

      -

      36.1.6 Compilation of C++ extensions

      +

      37.1.6 Compilation of C++ extensions

      On most machines, C++ extension modules should be linked @@ -356,7 +356,7 @@ $libs = append_library($libs, "supc++") create_makefile('example')

      -

      36.2 Building Ruby Extensions under Windows 95/NT

      +

      37.2 Building Ruby Extensions under Windows 95/NT

      Building a SWIG extension to Ruby under Windows 95/NT is @@ -381,7 +381,7 @@ order to build extensions, you may need to download the source distribution to the Ruby package, as you will need the Ruby header files.

      -

      36.2.1 Running SWIG from Developer Studio

      +

      37.2.1 Running SWIG from Developer Studio

      If you are developing your application within Microsoft @@ -445,13 +445,13 @@ Foo = 3.0 -

      36.3 The Ruby-to-C/C++ Mapping

      +

      37.3 The Ruby-to-C/C++ Mapping

      This section describes the basics of how SWIG maps C or C++ declarations in your SWIG interface files to Ruby constructs.

      -

      36.3.1 Modules

      +

      37.3.1 Modules

      The SWIG %module directive specifies @@ -523,7 +523,7 @@ option to wrap everything into the global module, take care that the names of your constants, classes and methods don't conflict with any of Ruby's built-in names.

      -

      36.3.2 Functions

      +

      37.3.2 Functions

      Global functions are wrapped as Ruby module methods. For @@ -557,7 +557,7 @@ irb(main):002:0> Example.fact(4) 24 -

      36.3.3 Variable Linking

      +

      37.3.3 Variable Linking

      C/C++ global variables are wrapped as a pair of singleton @@ -619,7 +619,7 @@ directive. For example:

      effect until it is explicitly disabled using %mutable.

      -

      36.3.4 Constants

      +

      37.3.4 Constants

      C/C++ constants are wrapped as module constants initialized @@ -647,7 +647,7 @@ irb(main):002:0> Example::PI 3.14159 -

      36.3.5 Pointers

      +

      37.3.5 Pointers

      "Opaque" pointers to arbitrary C/C++ types (i.e. types that @@ -671,7 +671,7 @@ returns an instance of an internally generated Ruby class:

      A NULL pointer is always represented by the Ruby nil object.

      -

      36.3.6 Structures

      +

      37.3.6 Structures

      C/C++ structs are wrapped as Ruby classes, with accessor @@ -776,7 +776,7 @@ void Bar_f_set(Bar *b, Foo *val) { } -

      36.3.7 C++ classes

      +

      37.3.7 C++ classes

      Like structs, C++ classes are wrapped by creating a new Ruby @@ -831,7 +831,7 @@ Ale 3 -

      36.3.8 C++ Inheritance

      +

      37.3.8 C++ Inheritance

      The SWIG type-checker is fully aware of C++ inheritance. @@ -984,7 +984,7 @@ inherit from both Base1 and Base2 (i.e. they exhibit "Duck Typing").

      -

      36.3.9 C++ Overloaded Functions

      +

      37.3.9 C++ Overloaded Functions

      C++ overloaded functions, methods, and constructors are @@ -1074,7 +1074,7 @@ arises--in this case, the first declaration takes precedence.

      Please refer to the "SWIG and C++" chapter for more information about overloading.

      -

      36.3.10 C++ Operators

      +

      37.3.10 C++ Operators

      For the most part, overloaded operators are handled @@ -1116,7 +1116,7 @@ c = Example.add_complex(a, b) is discussed in the section on operator overloading.

      -

      36.3.11 C++ namespaces

      +

      37.3.11 C++ namespaces

      SWIG is aware of C++ namespaces, but namespace names do not @@ -1173,7 +1173,7 @@ and create extension modules for each namespace separately. If your program utilizes thousands of small deeply nested namespaces each with identical symbol names, well, then you get what you deserve.

      -

      36.3.12 C++ templates

      +

      37.3.12 C++ templates

      C++ templates don't present a huge problem for SWIG. However, @@ -1215,7 +1215,7 @@ irb(main):004:0> p.second 4 -

      36.3.13 C++ Standard Template Library (STL)

      +

      37.3.13 C++ Standard Template Library (STL)

      On a related note, the standard SWIG library contains a @@ -1308,7 +1308,7 @@ puts v shown in these examples. More details can be found in the SWIG and C++ chapter.

      -

      36.3.14 C++ STL Functors

      +

      37.3.14 C++ STL Functors

      Some containers in the STL allow you to modify their default @@ -1369,7 +1369,7 @@ b -

      36.3.15 C++ STL Iterators

      +

      37.3.15 C++ STL Iterators

      The STL is well known for the use of iterators. There @@ -1452,7 +1452,7 @@ i

      If you'd rather have STL classes without any iterators, you should define -DSWIG_NO_EXPORT_ITERATOR_METHODS when running swig.

      -

      36.3.16 C++ Smart Pointers

      +

      37.3.16 C++ Smart Pointers

      In certain C++ programs, it is common to use classes that @@ -1517,7 +1517,7 @@ method. For example:

      irb(main):004:0> f = p.__deref__() # Returns underlying Foo *
      -

      36.3.17 Cross-Language Polymorphism

      +

      37.3.17 Cross-Language Polymorphism

      SWIG's Ruby module supports cross-language polymorphism @@ -1526,7 +1526,7 @@ module. Rather than duplicate the information presented in the 36.3.17.1 Exception Unrolling +

      37.3.17.1 Exception Unrolling

      Whenever a C++ director class routes one of its virtual @@ -1549,7 +1549,7 @@ method is "wrapped" using the rb_rescue2() function from Ruby's C API. If any Ruby exception is raised, it will be caught here and a C++ exception is raised in its place.

      -

      36.4 Naming

      +

      37.4 Naming

      Ruby has several common naming conventions. Constants are @@ -1587,7 +1587,7 @@ generated by SWIG, it is turned off by default in SWIG 1.3.28. However, it is planned to become the default option in future releases.

      -

      36.4.1 Defining Aliases

      +

      37.4.1 Defining Aliases

      It's a fairly common practice in the Ruby built-ins and @@ -1657,7 +1657,7 @@ matching rules used for other kinds of features apply (see the chapter on "Customization Features") for more details).

      -

      36.4.2 Predicate Methods

      +

      37.4.2 Predicate Methods

      Ruby methods that return a boolean value and end in a @@ -1706,7 +1706,7 @@ using SWIG's "features" mechanism and so the same name matching rules used for other kinds of features apply (see the chapter on "Customization Features") for more details).

      -

      36.4.3 Bang Methods

      +

      37.4.3 Bang Methods

      Ruby methods that modify an object in-place and end in an @@ -1738,7 +1738,7 @@ using SWIG's "features" mechanism and so the same name matching rules used for other kinds of features apply (see the chapter on "Customization Features") for more details).

      -

      36.4.4 Getters and Setters

      +

      37.4.4 Getters and Setters

      Often times a C++ library will expose properties through @@ -1773,7 +1773,7 @@ irb(main):003:0> puts foo.value %rename("value=") Foo::setValue(int value); -

      36.5 Input and output parameters

      +

      37.5 Input and output parameters

      A common problem in some C programs is handling parameters @@ -1912,10 +1912,10 @@ void get_dimensions(Matrix *m, int *rows, int*columns);

      r, c = Example.get_dimensions(m)
      -

      36.6 Exception handling

      +

      37.6 Exception handling

      -

      36.6.1 Using the %exception directive

      +

      37.6.1 Using the %exception directive

      The SWIG %exception directive can be @@ -2024,7 +2024,7 @@ methods and functions named getitem and setitem. limited to C++ exception handling. See the chapter on Customization Features for more examples.

      -

      36.6.2 Handling Ruby Blocks

      +

      37.6.2 Handling Ruby Blocks

      One of the highlights of Ruby and most of its standard library @@ -2091,7 +2091,7 @@ a special in typemap, like:

      For more information on typemaps, see Typemaps.

      -

      36.6.3 Raising exceptions

      +

      37.6.3 Raising exceptions

      There are three ways to raise exceptions from C++ code to @@ -2248,7 +2248,7 @@ function. The first argument passed to rb_raise() is the exception type. You can raise a custom exception type or one of the built-in Ruby exception types.

      -

      36.6.4 Exception classes

      +

      37.6.4 Exception classes

      Starting with SWIG 1.3.28, the Ruby module supports the %exceptionclass @@ -2285,7 +2285,7 @@ end

      For another example look at swig/Examples/ruby/exception_class.

      -

      36.7 Typemaps

      +

      37.7 Typemaps

      This section describes how you can modify SWIG's default @@ -2300,7 +2300,7 @@ a required part of using SWIG---the default wrapping behavior is enough in most cases. Typemaps are only used if you want to change some aspect of the primitive C-Ruby interface.

      -

      36.7.1 What is a typemap?

      +

      37.7.1 What is a typemap?

      A typemap is nothing more than a code generation rule that is @@ -2457,7 +2457,7 @@ to be used as follows (notice how the length parameter is omitted):

      2 -

      36.7.2 Typemap scope

      +

      37.7.2 Typemap scope

      Once defined, a typemap remains in effect for all of the @@ -2503,7 +2503,7 @@ where the class itself is defined. For example:

      }; -

      36.7.3 Copying a typemap

      +

      37.7.3 Copying a typemap

      A typemap is copied by using assignment. For example:

      @@ -2545,7 +2545,7 @@ rules as for %apply (char *buf, int len) { (char *buffer, int size) }; // Multiple arguments -

      36.7.4 Deleting a typemap

      +

      37.7.4 Deleting a typemap

      A typemap can be deleted by simply defining no code. For @@ -2570,7 +2570,7 @@ defined by typemaps, clearing a fundamental type like int will make that type unusable unless you also define a new set of typemaps immediately after the clear operation.

      -

      36.7.5 Placement of typemaps

      +

      37.7.5 Placement of typemaps

      Typemap declarations can be declared in the global scope, @@ -2641,13 +2641,13 @@ In this example, this is done using the class declaration class string .

      -

      36.7.6 Ruby typemaps

      +

      37.7.6 Ruby typemaps

      The following list details all of the typemap methods that can be used by the Ruby module:

      -

      36.7.6.1 "in" typemap

      +

      37.7.6.1 "in" typemap

      Converts Ruby objects to input @@ -2714,7 +2714,7 @@ arguments to be specified. For example:

      At this time, only zero or one arguments may be converted.

      -

      36.7.6.2 "typecheck" typemap

      +

      37.7.6.2 "typecheck" typemap

      The "typecheck" typemap is used to support overloaded @@ -2736,7 +2736,7 @@ program uses overloaded methods, you should also define a collection of "typecheck" typemaps. More details about this follow in a later section on "Typemaps and Overloading."

      -

      36.7.6.3 "out" typemap

      +

      37.7.6.3 "out" typemap

      Converts return value of a C function @@ -2787,7 +2787,7 @@ version of the C datatype matched by the typemap.

      -

      36.7.6.4 "arginit" typemap

      +

      37.7.6.4 "arginit" typemap

      The "arginit" typemap is used to set the initial value of a @@ -2802,7 +2802,7 @@ applications. For example:

      } -

      36.7.6.5 "default" typemap

      +

      37.7.6.5 "default" typemap

      The "default" typemap is used to turn an argument into a @@ -2827,7 +2827,7 @@ arguments that follow must have default values. See the 36.7.6.6 "check" typemap +

      37.7.6.6 "check" typemap

      The "check" typemap is used to supply value checking code @@ -2842,7 +2842,7 @@ arguments have been converted. For example:

      } -

      36.7.6.7 "argout" typemap

      +

      37.7.6.7 "argout" typemap

      The "argout" typemap is used to return values from arguments. @@ -2896,7 +2896,7 @@ some function like SWIG_Ruby_AppendOutput.

      See the typemaps.i library for examples.

      -

      36.7.6.8 "freearg" typemap

      +

      37.7.6.8 "freearg" typemap

      The "freearg" typemap is used to cleanup argument data. It is @@ -2923,7 +2923,7 @@ This code is also placed into a special variable $cleanup that may be used in other typemaps whenever a wrapper function needs to abort prematurely.

      -

      36.7.6.9 "newfree" typemap

      +

      37.7.6.9 "newfree" typemap

      The "newfree" typemap is used in conjunction with the %newobject @@ -2947,7 +2947,7 @@ string *foo();

      See Object ownership and %newobject for further details.

      -

      36.7.6.10 "memberin" typemap

      +

      37.7.6.10 "memberin" typemap

      The "memberin" typemap is used to copy data from an @@ -2965,21 +2965,21 @@ example:

      already provides a default implementation for arrays, strings, and other objects.

      -

      36.7.6.11 "varin" typemap

      +

      37.7.6.11 "varin" typemap

      The "varin" typemap is used to convert objects in the target language to C for the purposes of assigning to a C/C++ global variable. This is implementation specific.

      -

      36.7.6.12 "varout" typemap

      +

      37.7.6.12 "varout" typemap

      The "varout" typemap is used to convert a C/C++ object to an object in the target language when reading a C/C++ global variable. This is implementation specific.

      -

      36.7.6.13 "throws" typemap

      +

      37.7.6.13 "throws" typemap

      The "throws" typemap is only used when SWIG parses a C++ @@ -3020,7 +3020,7 @@ specification yet they do throw exceptions, SWIG cannot know how to deal with them. For a neat way to handle these, see the Exception handling with %exception section.

      -

      36.7.6.14 directorin typemap

      +

      37.7.6.14 directorin typemap

      Converts C++ objects in director @@ -3079,7 +3079,7 @@ referring to the class itself. -

      36.7.6.15 directorout typemap

      +

      37.7.6.15 directorout typemap

      Converts Ruby objects in director @@ -3152,7 +3152,7 @@ exception.

      -

      36.7.6.16 directorargout typemap

      +

      37.7.6.16 directorargout typemap

      Output argument processing in director @@ -3210,19 +3210,19 @@ referring to the instance of the class itself -

      36.7.6.17 ret typemap

      +

      37.7.6.17 ret typemap

      Cleanup of function return values

      -

      36.7.6.18 globalin typemap

      +

      37.7.6.18 globalin typemap

      Setting of C global variables

      -

      36.7.7 Typemap variables

      +

      37.7.7 Typemap variables

      @@ -3272,7 +3272,7 @@ so that their values can be properly assigned.

      The Ruby name of the wrapper function being created.
      -

      36.7.8 Useful Functions

      +

      37.7.8 Useful Functions

      When you write a typemap, you usually have to work directly @@ -3287,7 +3287,7 @@ stick to the swig functions instead of the native Ruby functions. That should help you avoid having to rewrite a lot of typemaps across multiple languages.

      -

      36.7.8.1 C Datatypes to Ruby Objects

      +

      37.7.8.1 C Datatypes to Ruby Objects

      @@ -3329,7 +3329,7 @@ SWIG_From_float(float)
      -

      36.7.8.2 Ruby Objects to C Datatypes

      +

      37.7.8.2 Ruby Objects to C Datatypes

      Here, while the Ruby versions return the value directly, the SWIG @@ -3397,7 +3397,7 @@ versions do not, but return a status value to indicate success (SWIG_OK -

      36.7.8.3 Macros for VALUE

      +

      37.7.8.3 Macros for VALUE

      RSTRING_LEN(str)

      @@ -3420,7 +3420,7 @@ versions do not, but return a status value to indicate success (SWIG_OK
      pointer to array storage
      -

      36.7.8.4 Exceptions

      +

      37.7.8.4 Exceptions

      void rb_raise(VALUE exception, const char *fmt, @@ -3499,7 +3499,7 @@ message to standard error if Ruby was invoked with the -w flag. The given format string fmt and remaining arguments are interpreted as with printf(). -

      36.7.8.5 Iterators

      +

      37.7.8.5 Iterators

      void rb_iter_break()

      @@ -3545,14 +3545,14 @@ VALUE), VALUE value)

      Equivalent to Ruby's throw.
      -

      36.7.9 Typemap Examples

      +

      37.7.9 Typemap Examples

      This section includes a few examples of typemaps. For more examples, you might look at the examples in the Example/ruby directory.

      -

      36.7.10 Converting a Ruby array to a char **

      +

      37.7.10 Converting a Ruby array to a char **

      A common problem in many C programs is the processing of @@ -3617,7 +3617,7 @@ array. Since dynamic memory allocation is used to allocate memory for the array, the "freearg" typemap is used to later release this memory after the execution of the C function.

      -

      36.7.11 Collecting arguments in a hash

      +

      37.7.11 Collecting arguments in a hash

      Ruby's solution to the "keyword arguments" capability of some @@ -3831,7 +3831,7 @@ memory leak. Fortunately, this typemap is a lot easier to write:

      program that uses the extension, can be found in the Examples/ruby/hashargs directory of the SWIG distribution.

      -

      36.7.12 Pointer handling

      +

      37.7.12 Pointer handling

      Occasionally, it might be necessary to convert pointer values @@ -3890,7 +3890,7 @@ For example:

      } -

      36.7.12.1 Ruby Datatype Wrapping

      +

      37.7.12.1 Ruby Datatype Wrapping

      VALUE Data_Wrap_Struct(VALUE class, void @@ -3917,7 +3917,7 @@ as above. type c-type from the data object obj and assigns that pointer to ptr. -

      36.7.13 Example: STL Vector to Ruby Array

      +

      37.7.13 Example: STL Vector to Ruby Array

      Another use for macros and type maps is to create a Ruby array @@ -4009,7 +4009,7 @@ STL with ruby, you are advised to use the standard swig STL library, which does much more than this. Refer to the section called the C++ Standard Template Library. -

      36.8 Docstring Features

      +

      37.8 Docstring Features

      @@ -4043,7 +4043,7 @@ generate ri documentation from a c wrap file, you could do:

      $ rdoc -r file_wrap.c -

      36.8.1 Module docstring

      +

      37.8.1 Module docstring

      @@ -4073,7 +4073,7 @@ layout of controls on a panel, etc. to be loaded from an XML file." %module(docstring=DOCSTRING) xrc -

      36.8.2 %feature("autodoc")

      +

      37.8.2 %feature("autodoc")

      Since SWIG does know everything about the function it wraps, @@ -4094,7 +4094,7 @@ several options for autodoc controlled by the value given to the feature, described below.

      -

      36.8.2.1 %feature("autodoc", "0")

      +

      37.8.2.1 %feature("autodoc", "0")

      @@ -4118,7 +4118,7 @@ Then Ruby code like this will be generated: ... -

      36.8.2.2 %feature("autodoc", "1")

      +

      37.8.2.2 %feature("autodoc", "1")

      @@ -4138,7 +4138,7 @@ this: ... -

      36.8.2.3 %feature("autodoc", "2")

      +

      37.8.2.3 %feature("autodoc", "2")

      @@ -4150,7 +4150,7 @@ parameter types with the "2" option will result in Ruby code like this:

      -

      36.8.2.4 %feature("autodoc", "3")

      +

      37.8.2.4 %feature("autodoc", "3")

      @@ -4171,7 +4171,7 @@ Parameters: bar - Bar -

      36.8.2.5 %feature("autodoc", "docstring")

      +

      37.8.2.5 %feature("autodoc", "docstring")

      @@ -4187,7 +4187,7 @@ generated string. For example: void GetPosition(int* OUTPUT, int* OUTPUT); -

      36.8.3 %feature("docstring")

      +

      37.8.3 %feature("docstring")

      @@ -4198,10 +4198,10 @@ docstring associated with classes, function or methods are output. If an item already has an autodoc string then it is combined with the docstring and they are output together.

      -

      36.9 Advanced Topics

      +

      37.9 Advanced Topics

      -

      36.9.1 Operator overloading

      +

      37.9.1 Operator overloading

      SWIG allows operator overloading with, by using the %extend @@ -4382,7 +4382,7 @@ separate method for handling inequality since Ruby parses the expression a != b as !(a == b).

      -

      36.9.2 Creating Multi-Module Packages

      +

      37.9.2 Creating Multi-Module Packages

      The chapter on Working @@ -4508,7 +4508,7 @@ irb(main):005:0> c.getX() 5.0 -

      36.9.3 Specifying Mixin Modules

      +

      37.9.3 Specifying Mixin Modules

      The Ruby language doesn't support multiple inheritance, but @@ -4575,7 +4575,7 @@ matching rules used for other kinds of features apply (see the chapter on "Customization Features") for more details).

      -

      36.10 Memory Management

      +

      37.10 Memory Management

      One of the most common issues in generating SWIG bindings for @@ -4598,7 +4598,7 @@ to C++ (or vice versa) depending on what function or methods are invoked. Clearly, developing a SWIG wrapper requires a thorough understanding of how the underlying library manages memory.

      -

      36.10.1 Mark and Sweep Garbage Collector

      +

      37.10.1 Mark and Sweep Garbage Collector

      Ruby uses a mark and sweep garbage collector. When the garbage @@ -4630,7 +4630,7 @@ any memory has been allocated in creating the underlying C struct or C++ struct, then a "free" function must be defined that deallocates this memory.

      -

      36.10.2 Object Ownership

      +

      37.10.2 Object Ownership

      As described above, memory management depends on clearly @@ -4775,7 +4775,7 @@ public:

      This code can be seen in swig/examples/ruby/tracking.

      -

      36.10.3 Object Tracking

      +

      37.10.3 Object Tracking

      The remaining parts of this section will use the class library @@ -5000,7 +5000,7 @@ However, if you implement your own free functions (see below) you may also have to call the SWIG_RubyRemoveTracking and RubyUnlinkObjects methods.

      -

      36.10.4 Mark Functions

      +

      37.10.4 Mark Functions

      With a bit more testing, we see that our class library still @@ -5129,7 +5129,7 @@ irb(main):016:0>

      This code can be seen in swig/examples/ruby/mark_function.

      -

      36.10.5 Free Functions

      +

      37.10.5 Free Functions

      By default, SWIG creates a "free" function that is called when @@ -5296,7 +5296,7 @@ been freed, and thus raises a runtime exception.

      This code can be seen in swig/examples/ruby/free_function.

      -

      36.10.6 Embedded Ruby and the C++ Stack

      +

      37.10.6 Embedded Ruby and the C++ Stack

      As has been said, the Ruby GC runs and marks objects before diff --git a/Doc/Manual/SWIGPlus.html b/Doc/Manual/SWIGPlus.html index aa02b2dee..f9558994b 100644 --- a/Doc/Manual/SWIGPlus.html +++ b/Doc/Manual/SWIGPlus.html @@ -4972,6 +4972,7 @@ public:

      6.27 Nested classes

      +

      If the target language supports the nested classes concept (like Java), the nested C++ classes are wrapped as nested target language proxy classes. (In case of Java - "static" nested classes.) diff --git a/Doc/Manual/Tcl.html b/Doc/Manual/Tcl.html index 9b9cd7218..45eebbf5e 100644 --- a/Doc/Manual/Tcl.html +++ b/Doc/Manual/Tcl.html @@ -6,7 +6,7 @@ -

      37 SWIG and Tcl

      +

      38 SWIG and Tcl

        @@ -83,7 +83,7 @@ Tcl 8.0 or a later release. Earlier releases of SWIG supported Tcl 7.x, but this is no longer supported.

        -

        37.1 Preliminaries

        +

        38.1 Preliminaries

        @@ -109,7 +109,7 @@ build a Tcl extension module. To finish building the module, you need to compile this file and link it with the rest of your program.

        -

        37.1.1 Getting the right header files

        +

        38.1.1 Getting the right header files

        @@ -127,7 +127,7 @@ this is the case, you should probably make a symbolic link so that tcl.h -

        37.1.2 Compiling a dynamic module

        +

        38.1.2 Compiling a dynamic module

        @@ -163,7 +163,7 @@ The name of the module is specified using the %module directive or the -module command line option.

        -

        37.1.3 Static linking

        +

        38.1.3 Static linking

        @@ -229,7 +229,7 @@ minimal in most situations (and quite frankly not worth the extra hassle in the opinion of this author).

        -

        37.1.4 Using your module

        +

        38.1.4 Using your module

        @@ -357,7 +357,7 @@ to the default system configuration (this requires root access and you will need the man pages).

        -

        37.1.5 Compilation of C++ extensions

        +

        38.1.5 Compilation of C++ extensions

        @@ -440,7 +440,7 @@ erratic program behavior. If working with lots of software components, you might want to investigate using a more formal standard such as COM.

        -

        37.1.6 Compiling for 64-bit platforms

        +

        38.1.6 Compiling for 64-bit platforms

        @@ -467,7 +467,7 @@ also introduce problems on platforms that support more than one linking standard (e.g., -o32 and -n32 on Irix).

        -

        37.1.7 Setting a package prefix

        +

        38.1.7 Setting a package prefix

        @@ -486,7 +486,7 @@ option will append the prefix to the name when creating a command and call it "Foo_bar".

        -

        37.1.8 Using namespaces

        +

        38.1.8 Using namespaces

        @@ -508,7 +508,7 @@ When the -namespace option is used, objects in the module are always accessed with the namespace name such as Foo::bar.

        -

        37.2 Building Tcl/Tk Extensions under Windows 95/NT

        +

        38.2 Building Tcl/Tk Extensions under Windows 95/NT

        @@ -519,7 +519,7 @@ covers the process of using SWIG with Microsoft Visual C++. although the procedure may be similar with other compilers.

        -

        37.2.1 Running SWIG from Developer Studio

        +

        38.2.1 Running SWIG from Developer Studio

        @@ -577,7 +577,7 @@ MSDOS > tclsh80 %

      -

      37.2.2 Using NMAKE

      +

      38.2.2 Using NMAKE

      @@ -640,7 +640,7 @@ to get you started. With a little practice, you'll be making lots of Tcl extensions.

      -

      37.3 A tour of basic C/C++ wrapping

      +

      38.3 A tour of basic C/C++ wrapping

      @@ -651,7 +651,7 @@ classes. This section briefly covers the essential aspects of this wrapping.

      -

      37.3.1 Modules

      +

      38.3.1 Modules

      @@ -685,7 +685,7 @@ To fix this, supply an extra argument to load like this: -

      37.3.2 Functions

      +

      38.3.2 Functions

      @@ -710,7 +710,7 @@ like you think it does: % -

      37.3.3 Global variables

      +

      38.3.3 Global variables

      @@ -790,7 +790,7 @@ extern char *path; // Read-only (due to %immutable) -

      37.3.4 Constants and enums

      +

      38.3.4 Constants and enums

      @@ -874,7 +874,7 @@ When an identifier name is given, it is used to perform an implicit hash-table l conversion. This allows the global statement to be omitted.

      -

      37.3.5 Pointers

      +

      38.3.5 Pointers

      @@ -970,7 +970,7 @@ C-style cast may return a bogus result whereas as the C++-style cast will return None if the conversion can't be performed.

      -

      37.3.6 Structures

      +

      38.3.6 Structures

      @@ -1252,7 +1252,7 @@ Note: Tcl only destroys the underlying object if it has ownership. See the memory management section that appears shortly.

      -

      37.3.7 C++ classes

      +

      38.3.7 C++ classes

      @@ -1319,7 +1319,7 @@ In Tcl, the static member is accessed as follows: -

      37.3.8 C++ inheritance

      +

      38.3.8 C++ inheritance

      @@ -1368,7 +1368,7 @@ For instance: It is safe to use multiple inheritance with SWIG.

      -

      37.3.9 Pointers, references, values, and arrays

      +

      38.3.9 Pointers, references, values, and arrays

      @@ -1422,7 +1422,7 @@ to hold the result and a pointer is returned (Tcl will release this memory when the return value is garbage collected).

      -

      37.3.10 C++ overloaded functions

      +

      38.3.10 C++ overloaded functions

      @@ -1545,7 +1545,7 @@ first declaration takes precedence. Please refer to the "SWIG and C++" chapter for more information about overloading.

      -

      37.3.11 C++ operators

      +

      38.3.11 C++ operators

      @@ -1647,7 +1647,7 @@ There are ways to make this operator appear as part of the class using the % Keep reading.

      -

      37.3.12 C++ namespaces

      +

      38.3.12 C++ namespaces

      @@ -1711,7 +1711,7 @@ utilizes thousands of small deeply nested namespaces each with identical symbol names, well, then you get what you deserve.

      -

      37.3.13 C++ templates

      +

      38.3.13 C++ templates

      @@ -1763,7 +1763,7 @@ More details can be found in the SWIG and C++ -

      37.3.14 C++ Smart Pointers

      +

      38.3.14 C++ Smart Pointers

      @@ -1847,7 +1847,7 @@ simply use the __deref__() method. For example: -

      37.4 Further details on the Tcl class interface

      +

      38.4 Further details on the Tcl class interface

      @@ -1860,7 +1860,7 @@ of low-level details were omitted. This section provides a brief overview of how the proxy classes work.

      -

      37.4.1 Proxy classes

      +

      38.4.1 Proxy classes

      @@ -1925,7 +1925,7 @@ function. This allows objects to be encapsulated objects that look a lot like as shown in the last section.

      -

      37.4.2 Memory management

      +

      38.4.2 Memory management

      @@ -2113,7 +2113,7 @@ typemaps--an advanced topic discussed later.

      -

      37.5 Input and output parameters

      +

      38.5 Input and output parameters

      @@ -2301,7 +2301,7 @@ set c [lindex $dim 1] -

      37.6 Exception handling

      +

      38.6 Exception handling

      @@ -2435,7 +2435,7 @@ Since SWIG's exception handling is user-definable, you are not limited to C++ ex See the chapter on "Customization Features" for more examples.

      -

      37.7 Typemaps

      +

      38.7 Typemaps

      @@ -2452,7 +2452,7 @@ Typemaps are only used if you want to change some aspect of the primitive C-Tcl interface.

      -

      37.7.1 What is a typemap?

      +

      38.7.1 What is a typemap?

      @@ -2569,7 +2569,7 @@ parameter is omitted): -

      37.7.2 Tcl typemaps

      +

      38.7.2 Tcl typemaps

      @@ -2707,7 +2707,7 @@ Initialize an argument to a value before any conversions occur. Examples of these methods will appear shortly.

      -

      37.7.3 Typemap variables

      +

      38.7.3 Typemap variables

      @@ -2778,7 +2778,7 @@ properly assigned. The Tcl name of the wrapper function being created. -

      37.7.4 Converting a Tcl list to a char **

      +

      38.7.4 Converting a Tcl list to a char **

      @@ -2840,7 +2840,7 @@ argv[2] = Larry 3 -

      37.7.5 Returning values in arguments

      +

      38.7.5 Returning values in arguments

      @@ -2882,7 +2882,7 @@ result, a Tcl function using these typemaps will work like this : % -

      37.7.6 Useful functions

      +

      38.7.6 Useful functions

      @@ -2959,7 +2959,7 @@ int Tcl_IsShared(Tcl_Obj *obj); -

      37.7.7 Standard typemaps

      +

      38.7.7 Standard typemaps

      @@ -3043,7 +3043,7 @@ work) -

      37.7.8 Pointer handling

      +

      38.7.8 Pointer handling

      @@ -3119,7 +3119,7 @@ For example: -

      37.8 Turning a SWIG module into a Tcl Package.

      +

      38.8 Turning a SWIG module into a Tcl Package.

      @@ -3191,7 +3191,7 @@ As a final note, most SWIG examples do not yet use the to use the load command instead.

      -

      37.9 Building new kinds of Tcl interfaces (in Tcl)

      +

      38.9 Building new kinds of Tcl interfaces (in Tcl)

      @@ -3290,7 +3290,7 @@ danger of blowing something up (although it is easily accomplished with an out of bounds array access).

      -

      37.9.1 Proxy classes

      +

      38.9.1 Proxy classes

      @@ -3411,7 +3411,7 @@ short, but clever Tcl script can be combined with SWIG to do many interesting things.

      -

      37.10 Tcl/Tk Stubs

      +

      38.10 Tcl/Tk Stubs

      diff --git a/Doc/Manual/Typemaps.html b/Doc/Manual/Typemaps.html index 20ad085f8..cba524149 100644 --- a/Doc/Manual/Typemaps.html +++ b/Doc/Manual/Typemaps.html @@ -6,7 +6,7 @@ -

      10 Typemaps

      +

      11 Typemaps

        @@ -95,7 +95,7 @@ -

        10.1 Introduction

        +

        11.1 Introduction

        @@ -112,7 +112,7 @@ to re-read the earlier chapters if you have found your way to this chapter with only a vague idea of what SWIG already does by default.

        -

        10.1.1 Type conversion

        +

        11.1.1 Type conversion

        @@ -205,7 +205,7 @@ to read the extension documentation for your favorite language to know how it works (an exercise left to the reader).

        -

        10.1.2 Typemaps

        +

        11.1.2 Typemaps

        @@ -306,7 +306,7 @@ parts of the generated wrapper functions. Because arbitrary code can be insert possible to completely change the way in which values are converted.

        -

        10.1.3 Pattern matching

        +

        11.1.3 Pattern matching

        @@ -408,7 +408,7 @@ In this case, a single input object is expanded into a pair of C arguments. Thi provides a hint to the unusual variable naming scheme involving $1, $2, and so forth.

        -

        10.1.4 Reusing typemaps

        +

        11.1.4 Reusing typemaps

        @@ -464,7 +464,7 @@ typedef int size_t; then SWIG already knows that the int typemaps apply. You don't have to do anything.

        -

        10.1.5 What can be done with typemaps?

        +

        11.1.5 What can be done with typemaps?

        @@ -576,7 +576,7 @@ typemaps that expand upon this list. For example, the Java module defines a var aspects of the Java bindings. Consult language specific documentation for further details.

        -

        10.1.6 What can't be done with typemaps?

        +

        11.1.6 What can't be done with typemaps?

        @@ -639,7 +639,7 @@ void wrap_foo(char *s, int x) {

      -

      10.1.7 Similarities to Aspect Oriented Programming

      +

      11.1.7 Similarities to Aspect Oriented Programming

      @@ -657,7 +657,7 @@ SWIG can also be viewed as has having a second set of aspects based around %exception are also cross-cutting concerns as they encapsulate code that can be used to add logging or exception handling to any function.

      -

      10.1.8 The rest of this chapter

      +

      11.1.8 The rest of this chapter

      @@ -677,14 +677,14 @@ of "The C Programming Language" by Kernighan and Ritchie or "The C++ Programming Language" by Stroustrup before going any further.

      -

      10.2 Typemap specifications

      +

      11.2 Typemap specifications

      This section describes the behavior of the %typemap directive itself.

      -

      10.2.1 Defining a typemap

      +

      11.2.1 Defining a typemap

      @@ -797,7 +797,7 @@ Admittedly, it's not the most readable syntax at first glance. However, the pur individual pieces will become clear.

      -

      10.2.2 Typemap scope

      +

      11.2.2 Typemap scope

      @@ -847,7 +847,7 @@ class Foo { -

      10.2.3 Copying a typemap

      +

      11.2.3 Copying a typemap

      @@ -905,7 +905,7 @@ The patterns for %apply follow the same rules as for %typemap. -

      10.2.4 Deleting a typemap

      +

      11.2.4 Deleting a typemap

      @@ -938,7 +938,7 @@ For example: after the clear operation.

      -

      10.2.5 Placement of typemaps

      +

      11.2.5 Placement of typemaps

      @@ -1018,7 +1018,7 @@ It should be noted that for scoping to work, SWIG has to know that stringclass string.

      -

      10.3 Pattern matching rules

      +

      11.3 Pattern matching rules

      @@ -1026,7 +1026,7 @@ The section describes the pattern matching rules by which C/C++ datatypes are as The matching rules can be observed in practice by using the debugging options also described.

      -

      10.3.1 Basic matching rules

      +

      11.3.1 Basic matching rules

      @@ -1125,7 +1125,7 @@ void F(int x[1000]); // int [ANY] rule (typemap 5) stripped all qualifiers in one step.

      -

      10.3.2 Typedef reductions matching

      +

      11.3.2 Typedef reductions matching

      @@ -1300,7 +1300,7 @@ void go(Struct aStruct); -

      10.3.3 Default typemap matching rules

      +

      11.3.3 Default typemap matching rules

      @@ -1438,7 +1438,7 @@ Finally the best way to view the typemap matching rules in action is via the -

      10.3.4 Multi-arguments typemaps

      +

      11.3.4 Multi-arguments typemaps

      @@ -1468,7 +1468,7 @@ but all subsequent arguments must match exactly.

      -

      10.3.5 Matching rules compared to C++ templates

      +

      11.3.5 Matching rules compared to C++ templates

      @@ -1627,7 +1627,7 @@ are similar to those for specialized template handling.

      -

      10.3.6 Debugging typemap pattern matching

      +

      11.3.6 Debugging typemap pattern matching

      @@ -1840,7 +1840,7 @@ Also the types may be displayed slightly differently - char const * and

    -

    10.4 Code generation rules

    +

    11.4 Code generation rules

    @@ -1848,7 +1848,7 @@ This section describes rules by which typemap code is inserted into the generated wrapper code.

    -

    10.4.1 Scope

    +

    11.4.1 Scope

    @@ -1926,7 +1926,7 @@ a block scope when it is emitted. This sometimes results in a less complicated Note that only the third of the three typemaps have the typemap code passed through the SWIG preprocessor.

    -

    10.4.2 Declaring new local variables

    +

    11.4.2 Declaring new local variables

    @@ -2077,7 +2077,7 @@ each type must have its own local variable declaration. -

    10.4.3 Special variables

    +

    11.4.3 Special variables

    @@ -2329,7 +2329,7 @@ Another approach, which only works for arrays is to use the $1_basetype -

    10.4.4 Special variable macros

    +

    11.4.4 Special variable macros

    @@ -2341,7 +2341,7 @@ it is done during the SWIG parsing/compilation stages. The following special variable macros are available across all language modules.

    -

    10.4.4.1 $descriptor(type)

    +

    11.4.4.1 $descriptor(type)

    @@ -2352,7 +2352,7 @@ For example, $descriptor(std::vector<int> *) will expand into Run-time type checker usage section.

    -

    10.4.4.2 $typemap(method, typepattern)

    +

    11.4.4.2 $typemap(method, typepattern)

    @@ -2409,7 +2409,7 @@ The result is the following expansion -

    10.5 Common typemap methods

    +

    11.5 Common typemap methods

    @@ -2417,7 +2417,7 @@ The set of typemaps recognized by a language module may vary. However, the following typemap methods are nearly universal:

    -

    10.5.1 "in" typemap

    +

    11.5.1 "in" typemap

    @@ -2477,7 +2477,7 @@ Usually numinputs is not specified, whereupon the default value is 1, t is the same as the old "ignore" typemap.

    -

    10.5.2 "typecheck" typemap

    +

    11.5.2 "typecheck" typemap

    @@ -2503,7 +2503,7 @@ If you define new "in" typemaps and your program uses overloaded method "typecheck" typemaps. More details about this follow in the Typemaps and overloading section.

    -

    10.5.3 "out" typemap

    +

    11.5.3 "out" typemap

    @@ -2534,7 +2534,7 @@ $symname - Name of function/method being wrapped The "out" typemap supports an optional attribute flag called "optimal". This is for code optimisation and is detailed in the Optimal code generation when returning by value section.

    -

    10.5.4 "arginit" typemap

    +

    11.5.4 "arginit" typemap

    @@ -2553,7 +2553,7 @@ For example: -

    10.5.5 "default" typemap

    +

    11.5.5 "default" typemap

    @@ -2586,7 +2586,7 @@ See the Default/optional arguments sec for further information on default argument wrapping.

    -

    10.5.6 "check" typemap

    +

    11.5.6 "check" typemap

    @@ -2605,7 +2605,7 @@ converted. For example: -

    10.5.7 "argout" typemap

    +

    11.5.7 "argout" typemap

    @@ -2651,7 +2651,7 @@ return values are often appended to return value of the function. See the typemaps.i library file for examples.

    -

    10.5.8 "freearg" typemap

    +

    11.5.8 "freearg" typemap

    @@ -2684,7 +2684,7 @@ be used in other typemaps whenever a wrapper function needs to abort prematurely.

    -

    10.5.9 "newfree" typemap

    +

    11.5.9 "newfree" typemap

    @@ -2713,7 +2713,7 @@ string *foo(); See Object ownership and %newobject for further details.

    -

    10.5.10 "memberin" typemap

    +

    11.5.10 "memberin" typemap

    @@ -2735,7 +2735,7 @@ It is rarely necessary to write "memberin" typemaps---SWIG already provides a default implementation for arrays, strings, and other objects.

    -

    10.5.11 "varin" typemap

    +

    11.5.11 "varin" typemap

    @@ -2743,7 +2743,7 @@ The "varin" typemap is used to convert objects in the target language to C for t purposes of assigning to a C/C++ global variable. This is implementation specific.

    -

    10.5.12 "varout" typemap

    +

    11.5.12 "varout" typemap

    @@ -2751,7 +2751,7 @@ The "varout" typemap is used to convert a C/C++ object to an object in the targe language when reading a C/C++ global variable. This is implementation specific.

    -

    10.5.13 "throws" typemap

    +

    11.5.13 "throws" typemap

    @@ -2797,7 +2797,7 @@ Note that if your methods do not have an exception specification yet they do thr For a neat way to handle these, see the Exception handling with %exception section.

    -

    10.6 Some typemap examples

    +

    11.6 Some typemap examples

    @@ -2805,7 +2805,7 @@ This section contains a few examples. Consult language module documentation for more examples.

    -

    10.6.1 Typemaps for arrays

    +

    11.6.1 Typemaps for arrays

    @@ -3064,7 +3064,7 @@ Now, you will find that member access is quite nice: useless and has since been eliminated. To return structure members, simply use the "out" typemap.

    -

    10.6.2 Implementing constraints with typemaps

    +

    11.6.2 Implementing constraints with typemaps

    @@ -3112,7 +3112,7 @@ a NULL pointer. As a result, SWIG can often prevent a potential segmentation faults or other run-time problems by raising an exception rather than blindly passing values to the underlying C/C++ program.

    -

    10.7 Typemaps for multiple target languages

    +

    11.7 Typemaps for multiple target languages

    @@ -3142,7 +3142,7 @@ The example above also shows a common approach of issuing a warning for an as ye %typemap(ruby,in) int "$1 = NUM2INT($input);".

    -

    10.8 Optimal code generation when returning by value

    +

    11.8 Optimal code generation when returning by value

    @@ -3331,7 +3331,7 @@ example.i:7: Warning 475: optimal attribute usage in the out typemap. However, it doesn't always get it right, for example when $1 is within some commented out code.

    -

    10.9 Multi-argument typemaps

    +

    11.9 Multi-argument typemaps

    @@ -3598,7 +3598,7 @@ with non-consecutive C/C++ arguments; a workaround such as a helper function re- the arguments to make them consecutive will need to be written.

    -

    10.10 Typemap warnings

    +

    11.10 Typemap warnings

    @@ -3607,7 +3607,7 @@ See the information in the issuing warnings

    -

    10.11 Typemap fragments

    +

    11.11 Typemap fragments

    @@ -3860,7 +3860,7 @@ fragment usage unless a desire to really get to grips with some powerful but tricky macro and fragment usage that is used in parts of the SWIG typemap library.

    -

    10.11.1 Fragment type specialization

    +

    11.11.1 Fragment type specialization

    @@ -3893,7 +3893,7 @@ struct A { -

    10.11.2 Fragments and automatic typemap specialization

    +

    11.11.2 Fragments and automatic typemap specialization

    @@ -3939,7 +3939,7 @@ The interested (or very brave) reader can take a look at the fragments.swg file

    -

    10.12 The run-time type checker

    +

    11.12 The run-time type checker

    @@ -3965,7 +3965,7 @@ language modules.

  • Modules can be unloaded from the type system.
  • -

    10.12.1 Implementation

    +

    11.12.1 Implementation

    @@ -4151,7 +4151,7 @@ structures rather than creating new ones. These swig_module_info structures are chained together in a circularly linked list.

    -

    10.12.2 Usage

    +

    11.12.2 Usage

    This section covers how to use these functions from typemaps. To learn how to @@ -4245,7 +4245,7 @@ probably just look at the output of SWIG to get a better sense for how types are managed.

    -

    10.13 Typemaps and overloading

    +

    11.13 Typemaps and overloading

    @@ -4556,7 +4556,7 @@ Subsequent "in" typemaps would then perform more extensive type-checking. -

    10.14 More about %apply and %clear

    +

    11.14 More about %apply and %clear

    @@ -4642,7 +4642,7 @@ example: -

    10.15 Passing data between typemaps

    +

    11.15 Passing data between typemaps

    @@ -4679,7 +4679,7 @@ sure that the typemaps sharing information have exactly the same types and names

    -

    10.16 C++ "this" pointer

    +

    11.16 C++ "this" pointer

    @@ -4739,7 +4739,7 @@ will also match the typemap. One work around is to create an interface file tha the method, but gives the argument a name other than self.

    -

    10.17 Where to go for more information?

    +

    11.17 Where to go for more information?

    diff --git a/Doc/Manual/Varargs.html b/Doc/Manual/Varargs.html index 9564fe00b..dac1ad7bc 100644 --- a/Doc/Manual/Varargs.html +++ b/Doc/Manual/Varargs.html @@ -6,7 +6,7 @@ -

    13 Variable Length Arguments

    +

    14 Variable Length Arguments

      @@ -42,7 +42,7 @@ added in SWIG-1.3.12. Most other wrapper generation tools have wisely chosen to avoid this issue.

      -

      13.1 Introduction

      +

      14.1 Introduction

      @@ -139,7 +139,7 @@ List make_list(const char *s, ...) {

    -

    13.2 The Problem

    +

    14.2 The Problem

    @@ -232,7 +232,7 @@ can also support real varargs wrapping (with stack-frame manipulation) if you are willing to get hands dirty. Keep reading.

    -

    13.3 Default varargs support

    +

    14.3 Default varargs support

    @@ -301,7 +301,7 @@ Read on for further solutions.

    -

    13.4 Argument replacement using %varargs

    +

    14.4 Argument replacement using %varargs

    @@ -412,7 +412,7 @@ mixed argument types such as printf(). Providing general purpose wrappers to such functions presents special problems (covered shortly).

    -

    13.5 Varargs and typemaps

    +

    14.5 Varargs and typemaps

    @@ -589,7 +589,7 @@ really want to elevate your guru status and increase your job security, continue to the next section.

    -

    13.6 Varargs wrapping with libffi

    +

    14.6 Varargs wrapping with libffi

    @@ -841,7 +841,7 @@ provide an argument number for the first extra argument. This can be used to in values. Please consult the chapter on each language module for more details.

    -

    13.7 Wrapping of va_list

    +

    14.7 Wrapping of va_list

    @@ -895,7 +895,7 @@ int my_vprintf(const char *fmt, ...) { -

    13.8 C++ Issues

    +

    14.8 C++ Issues

    @@ -964,7 +964,7 @@ design or to provide an alternative interface using a helper function than it is fully general wrapper to a varargs C++ member function.

    -

    13.9 Discussion

    +

    14.9 Discussion

    diff --git a/Doc/Manual/Warnings.html b/Doc/Manual/Warnings.html index b4d27872c..99b89c425 100644 --- a/Doc/Manual/Warnings.html +++ b/Doc/Manual/Warnings.html @@ -6,7 +6,7 @@ -

    14 Warning Messages

    +

    15 Warning Messages

      @@ -35,7 +35,7 @@ -

      14.1 Introduction

      +

      15.1 Introduction

      @@ -55,7 +55,7 @@ where the generated wrapper code will probably compile, but it may not work like you expect.

      -

      14.2 Warning message suppression

      +

      15.2 Warning message suppression

      @@ -147,7 +147,7 @@ your interface. Ignore the warning messages at your own peril.

      -

      14.3 Enabling extra warnings

      +

      15.3 Enabling extra warnings

      @@ -220,7 +220,7 @@ that is, any warnings suppressed or added in %warnfilter, #pragma S or the -w option.

      -

      14.4 Issuing a warning message

      +

      15.4 Issuing a warning message

      @@ -274,7 +274,7 @@ example.i:24: Warning 901: You are really going to regret this usage of blah * s

    -

    14.5 Symbolic symbols

    +

    15.5 Symbolic symbols

    @@ -309,7 +309,7 @@ or -

    14.6 Commentary

    +

    15.6 Commentary

    @@ -326,7 +326,7 @@ no obvious recovery. There is no mechanism for suppressing error messages.

    -

    14.7 Warnings as errors

    +

    15.7 Warnings as errors

    @@ -335,7 +335,7 @@ option. This will cause SWIG to exit with a non successful exit code if a warning is encountered.

    -

    14.8 Message output format

    +

    15.8 Message output format

    @@ -354,10 +354,10 @@ $ swig -python -Fmicrosoft example.i example.i(4) : Syntax error in input. -

    14.9 Warning number reference

    +

    15.9 Warning number reference

    -

    14.9.1 Deprecated features (100-199)

    +

    15.9.1 Deprecated features (100-199)

      @@ -385,7 +385,7 @@ example.i(4) : Syntax error in input.
    • 126. The 'nestedworkaround' feature is deprecated.
    -

    14.9.2 Preprocessor (200-299)

    +

    15.9.2 Preprocessor (200-299)

      @@ -397,7 +397,7 @@ example.i(4) : Syntax error in input.
    • 206. Unexpected tokens after #directive directive.
    -

    14.9.3 C/C++ Parser (300-399)

    +

    15.9.3 C/C++ Parser (300-399)

      @@ -474,7 +474,7 @@ example.i(4) : Syntax error in input.
    • 395. operator delete[] ignored.
    -

    14.9.4 Types and typemaps (400-499)

    +

    15.9.4 Types and typemaps (400-499)

      @@ -505,7 +505,7 @@ example.i(4) : Syntax error in input. -

      14.9.5 Code generation (500-599)

      +

      15.9.5 Code generation (500-599)

        @@ -534,7 +534,7 @@ example.i(4) : Syntax error in input.
      • 523. Use of an illegal destructor name 'name' in %extend is deprecated, the destructor name should be 'name'.
      -

      14.9.6 Language module specific (700-899)

      +

      15.9.6 Language module specific (700-899)

        @@ -585,14 +585,14 @@ example.i(4) : Syntax error in input.
      • 871. Unrecognized pragma pragma. (Php).
      -

      14.9.7 User defined (900-999)

      +

      15.9.7 User defined (900-999)

      These numbers can be used by your own application.

      -

      14.10 History

      +

      15.10 History