From cfdad249937a030cf035bb3509278f29a44191ea Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 26 Nov 2005 09:28:20 +0000 Subject: [PATCH] Use the system angle brackets for %include git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7871 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/allkw.swg | 20 ++++++++++---------- Lib/chicken/chicken.swg | 4 ++-- Lib/chicken/typemaps.i | 14 +++++++------- Lib/constraints.i | 4 ++-- Lib/csharp/csharp.swg | 6 +++--- Lib/csharp/std_pair.i | 4 ++-- Lib/csharp/std_vector.i | 2 +- Lib/csharp/typemaps.i | 12 ++++++------ Lib/guile/guile.i | 2 +- Lib/guile/guile_gh.swg | 2 +- Lib/guile/guile_scm.swg | 4 ++-- Lib/guile/std_pair.i | 4 ++-- Lib/guile/std_string.i | 2 +- Lib/java/arrays_java.i | 2 +- Lib/java/java.swg | 6 +++--- Lib/java/std_pair.i | 4 ++-- Lib/java/typemaps.i | 18 +++++++++--------- Lib/lua/std_except.i | 2 +- Lib/modula3/modula3.swg | 2 +- Lib/mzscheme/mzscheme.swg | 2 +- Lib/mzscheme/std_pair.i | 4 ++-- Lib/mzscheme/std_string.i | 2 +- Lib/ocaml/cstring.i | 2 +- Lib/ocaml/ocaml.i | 10 +++++----- Lib/ocaml/ocaml.swg | 2 +- Lib/ocaml/std_deque.i | 2 +- Lib/ocaml/std_pair.i | 4 ++-- Lib/ocaml/std_string.i | 4 ++-- Lib/ocaml/std_vector.i | 2 +- Lib/ocaml/typemaps.i | 2 +- Lib/perl5/perltypemaps.swg | 2 +- Lib/perl5/std_list.i | 4 ++-- Lib/perl5/std_pair.i | 4 ++-- Lib/php4/php4.swg | 10 +++++----- Lib/php4/std_pair.i | 4 ++-- Lib/php4/std_string.i | 2 +- Lib/pike/pike.swg | 8 ++++---- Lib/python/pycontainer.swg | 2 +- Lib/python/pyrun.swg | 10 ++++++++++ Lib/python/pytypemaps.swg | 2 +- Lib/ruby/rubytypemaps.swg | 2 +- Lib/ruby/std_deque.i | 2 +- Lib/ruby/std_pair.i | 4 ++-- Lib/std/std_except.i | 2 +- Lib/std_deque.i | 2 +- Lib/stl.i | 10 +++++----- Lib/swiglabels.swg | 15 --------------- Lib/tcl/std_pair.i | 4 ++-- Lib/tcl/tclsh.i | 2 +- Lib/tcl/tcltypemaps.swg | 2 +- Lib/tcl/wish.i | 5 ++++- Lib/xml/typemaps.i | 18 +++++++++--------- 52 files changed, 132 insertions(+), 134 deletions(-) diff --git a/Lib/allkw.swg b/Lib/allkw.swg index d4f7d8876..dec6c7c03 100644 --- a/Lib/allkw.swg +++ b/Lib/allkw.swg @@ -16,16 +16,16 @@ */ -%include "chicken/chickenkw.swg" -%include "csharp/csharpkw.swg" -%include "java/javakw.swg" -%include "php4/php4kw.swg" -%include "pike/pikekw.swg" -%include "python/pythonkw.swg" -%include "ocaml/ocamlkw.swg" -%include "ruby/rubykw.swg" -%include "tcl/tclkw.swg" -%include "perl5/perlkw.swg" +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include #endif //__Lib_allkw_swg__ diff --git a/Lib/chicken/chicken.swg b/Lib/chicken/chicken.swg index 748f7a156..e38d6f7f9 100644 --- a/Lib/chicken/chicken.swg +++ b/Lib/chicken/chicken.swg @@ -7,7 +7,7 @@ /* chicken.h has to appear first. */ %insert(runtime) %{ -#include "chicken.h" +#include %} %insert(runtime) "swigrun.swg"; // Common C API type-checking code @@ -695,7 +695,7 @@ $result = C_SCHEME_UNDEFINED; #endif /* Warnings for certain CHICKEN keywords */ -%include "chickenkw.swg" +%include /* TinyCLOS <--> Low-level CHICKEN */ diff --git a/Lib/chicken/typemaps.i b/Lib/chicken/typemaps.i index 626cbbb7e..4606567b8 100644 --- a/Lib/chicken/typemaps.i +++ b/Lib/chicken/typemaps.i @@ -53,12 +53,12 @@ To use these, suppose you had a C function like this : You could wrap it with SWIG as follows : - %include typemaps.i + %include double fadd(double *INPUT, double *INPUT); or you can use the %apply directive : - %include typemaps.i + %include %apply double *INPUT { double *a, double *b }; double fadd(double *a, double *b); @@ -96,12 +96,12 @@ returns the integer part in one of its parameters).K: You could wrap it with SWIG as follows : - %include typemaps.i + %include double modf(double x, double *OUTPUT); or you can use the %apply directive : - %include typemaps.i + %include %apply double *OUTPUT { double *ip }; double modf(double x, double *ip); @@ -208,18 +208,18 @@ For example, suppose you were trying to wrap the following function : You could wrap it with SWIG as follows : - %include typemaps.i + %include void neg(double *INOUT); or you can use the %apply directive : - %include typemaps.i + %include %apply double *INOUT { double *x }; void neg(double *x); As well, you can wrap variables with : - %include typemaps.i + %include %apply double *INOUT { double *y }; extern double *y; diff --git a/Lib/constraints.i b/Lib/constraints.i index e85485b7d..818aebc63 100644 --- a/Lib/constraints.i +++ b/Lib/constraints.i @@ -9,7 +9,7 @@ #ifdef AUTODOC %text %{ -%include constraints.i +%include This library provides support for applying constraints to function arguments. Using a constraint, you can restrict arguments to be @@ -64,7 +64,7 @@ If you have used typedef to change type-names, you can also do this : %} #endif -%include exception.i +%include #ifdef SWIGCSHARP // Required attribute for C# exception handling diff --git a/Lib/csharp/csharp.swg b/Lib/csharp/csharp.swg index d688afa60..bfef1fc9e 100644 --- a/Lib/csharp/csharp.swg +++ b/Lib/csharp/csharp.swg @@ -4,7 +4,7 @@ * CSharp typemaps * ----------------------------------------------------------------------------- */ -%include "csharphead.swg" +%include /* The ctype, imtype and cstype typemaps work together and so there should be one of each. * The ctype typemap contains the PInvoke type used in the PInvoke (C/C++) code. @@ -640,10 +640,10 @@ using System.Runtime.InteropServices; %apply unsigned long { size_t }; /* csharp keywords */ -%include "csharpkw.swg" +%include // Default enum handling -%include "enums.swg" +%include /* // Alternative char * typemaps. diff --git a/Lib/csharp/std_pair.i b/Lib/csharp/std_pair.i index 488648883..bff9c91b0 100644 --- a/Lib/csharp/std_pair.i +++ b/Lib/csharp/std_pair.i @@ -5,8 +5,8 @@ // // Common implementation -%include std_common.i -%include exception.i +%include +%include // ------------------------------------------------------------------------ // std::pair diff --git a/Lib/csharp/std_vector.i b/Lib/csharp/std_vector.i index 1b1b460c9..9c2b9e1d6 100755 --- a/Lib/csharp/std_vector.i +++ b/Lib/csharp/std_vector.i @@ -358,6 +358,6 @@ SWIG_STD_VECTOR_SPECIALIZE(long, long long) SWIG_STD_VECTOR_SPECIALIZE(ulong, unsigned long long) SWIG_STD_VECTOR_SPECIALIZE(float, float) SWIG_STD_VECTOR_SPECIALIZE(double, double) -SWIG_STD_VECTOR_SPECIALIZE(string, std::string) // also requires a %include "std_string.i" +SWIG_STD_VECTOR_SPECIALIZE(string, std::string) // also requires a %include diff --git a/Lib/csharp/typemaps.i b/Lib/csharp/typemaps.i index d211d6431..590472b68 100644 --- a/Lib/csharp/typemaps.i +++ b/Lib/csharp/typemaps.i @@ -43,12 +43,12 @@ To use these, suppose you had a C function like this : You could wrap it with SWIG as follows : - %include "typemaps.i" + %include double fadd(double *INPUT, double *INPUT); or you can use the %apply directive : - %include "typemaps.i" + %include %apply double *INPUT { double *a, double *b }; double fadd(double *a, double *b); @@ -121,12 +121,12 @@ returns the integer part in one of its parameters): You could wrap it with SWIG as follows : - %include "typemaps.i" + %include double modf(double x, double *OUTPUT); or you can use the %apply directive : - %include "typemaps.i" + %include %apply double *OUTPUT { double *ip }; double modf(double x, double *ip); @@ -201,12 +201,12 @@ For example, suppose you were trying to wrap the following function : You could wrap it with SWIG as follows : - %include "typemaps.i" + %include void neg(double *INOUT); or you can use the %apply directive : - %include "typemaps.i" + %include %apply double *INOUT { double *x }; void neg(double *x); diff --git a/Lib/guile/guile.i b/Lib/guile/guile.i index 262cae420..96c3a1885 100644 --- a/Lib/guile/guile.i +++ b/Lib/guile/guile.i @@ -26,4 +26,4 @@ #define GUILE_APPEND_RESULT SWIG_APPEND_VALUE -%include "typemaps.i" +%include diff --git a/Lib/guile/guile_gh.swg b/Lib/guile/guile_gh.swg index 53ccd3860..186cd645a 100644 --- a/Lib/guile/guile_gh.swg +++ b/Lib/guile/guile_gh.swg @@ -7,7 +7,7 @@ %runtime "swigrun.swg" %runtime "guile_gh_run.swg" -%include "guile.i" +%include %runtime %{ diff --git a/Lib/guile/guile_scm.swg b/Lib/guile/guile_scm.swg index 870dd11a1..0ca98e818 100644 --- a/Lib/guile/guile_scm.swg +++ b/Lib/guile/guile_scm.swg @@ -8,8 +8,8 @@ %runtime "swigrun.swg" // Common C API type-checking code %runtime "guile_scm_run.swg" -%include "ghinterface.i" -%include "guile.i" +%include +%include %runtime %{ diff --git a/Lib/guile/std_pair.i b/Lib/guile/std_pair.i index 1709bf3ab..c4229d2da 100644 --- a/Lib/guile/std_pair.i +++ b/Lib/guile/std_pair.i @@ -5,8 +5,8 @@ // // Guile implementation -%include std_common.i -%include exception.i +%include +%include // ------------------------------------------------------------------------ // std::pair diff --git a/Lib/guile/std_string.i b/Lib/guile/std_string.i index e30b0fdda..c23c88d29 100644 --- a/Lib/guile/std_string.i +++ b/Lib/guile/std_string.i @@ -12,7 +12,7 @@ // However, I think I'll wait until someone asks for it... // ------------------------------------------------------------------------ -%include exception.i +%include %{ #include diff --git a/Lib/java/arrays_java.i b/Lib/java/arrays_java.i index ec75a8687..81bbf0f40 100644 --- a/Lib/java/arrays_java.i +++ b/Lib/java/arrays_java.i @@ -7,7 +7,7 @@ Example usage: Wrapping: - %include "arrays_java.i" + %include %inline %{ short FiddleSticks[3]; %} diff --git a/Lib/java/java.swg b/Lib/java/java.swg index 70ca33460..174f3a98b 100644 --- a/Lib/java/java.swg +++ b/Lib/java/java.swg @@ -5,7 +5,7 @@ * ----------------------------------------------------------------------------- */ -%include "javahead.swg" +%include /* The jni, jtype and jstype typemaps work together and so there should be one of each. * The jni typemap contains the JNI type used in the JNI (C/C++) code. @@ -1192,8 +1192,8 @@ SWIG_PROXY_CONSTRUCTOR(true, true, SWIGTYPE) %apply unsigned long { size_t }; /* java keywords */ -%include "javakw.swg" +%include // Default enum handling -%include "enumtypesafe.swg" +%include diff --git a/Lib/java/std_pair.i b/Lib/java/std_pair.i index 7445348eb..98c239cde 100644 --- a/Lib/java/std_pair.i +++ b/Lib/java/std_pair.i @@ -5,8 +5,8 @@ // // Common implementation -%include std_common.i -%include exception.i +%include +%include // ------------------------------------------------------------------------ // std::pair diff --git a/Lib/java/typemaps.i b/Lib/java/typemaps.i index 030f8efe2..a5c3bbfc6 100644 --- a/Lib/java/typemaps.i +++ b/Lib/java/typemaps.i @@ -44,12 +44,12 @@ To use these, suppose you had a C function like this : You could wrap it with SWIG as follows : - %include "typemaps.i" + %include double fadd(double *INPUT, double *INPUT); or you can use the %apply directive : - %include "typemaps.i" + %include %apply double *INPUT { double *a, double *b }; double fadd(double *a, double *b); @@ -57,7 +57,7 @@ In Java you could then use it like this: double answer = modulename.fadd(10.0, 20.0); There are no char *INPUT typemaps, however you can apply the signed char * typemaps instead: - %include "typemaps.i" + %include %apply signed char *INPUT {char *input}; void f(char *input); */ @@ -174,12 +174,12 @@ returns the integer part in one of its parameters): You could wrap it with SWIG as follows : - %include "typemaps.i" + %include double modf(double x, double *OUTPUT); or you can use the %apply directive : - %include "typemaps.i" + %include %apply double *OUTPUT { double *ip }; double modf(double x, double *ip); @@ -190,7 +190,7 @@ value in the single element array. In Java you would use it like this: double fraction = modulename.modf(5.0,ptr); There are no char *OUTPUT typemaps, however you can apply the signed char * typemaps instead: - %include "typemaps.i" + %include %apply signed char *OUTPUT {char *output}; void f(char *output); */ @@ -310,12 +310,12 @@ For example, suppose you were trying to wrap the following function : You could wrap it with SWIG as follows : - %include "typemaps.i" + %include void neg(double *INOUT); or you can use the %apply directive : - %include "typemaps.i" + %include %apply double *INOUT { double *x }; void neg(double *x); @@ -332,7 +332,7 @@ languages in that other languages will return the output value as part of the function return value. This difference is due to Java being a typed language. There are no char *INOUT typemaps, however you can apply the signed char * typemaps instead: - %include "typemaps.i" + %include %apply signed char *INOUT {char *inout}; void f(char *inout); */ diff --git a/Lib/lua/std_except.i b/Lib/lua/std_except.i index 3425bd152..26930bd40 100644 --- a/Lib/lua/std_except.i +++ b/Lib/lua/std_except.i @@ -5,7 +5,7 @@ %{ #include %} -%include "exception.i" +%include %typemap(throws) std::out_of_range %{ SWIG_exception(SWIG_IndexError, $1.what()); %} diff --git a/Lib/modula3/modula3.swg b/Lib/modula3/modula3.swg index 93e27863b..c3f30d2ee 100644 --- a/Lib/modula3/modula3.swg +++ b/Lib/modula3/modula3.swg @@ -4,7 +4,7 @@ * Modula3 typemaps * ----------------------------------------------------------------------------- */ -%include "modula3head.swg" +%include /* The ctype, m3rawtype and m3wraptype typemaps work together and so there should be one of each. * The ctype typemap contains the C type used in the signature of C wrappers for C++ functions. diff --git a/Lib/mzscheme/mzscheme.swg b/Lib/mzscheme/mzscheme.swg index 4748577b3..12ff5794f 100644 --- a/Lib/mzscheme/mzscheme.swg +++ b/Lib/mzscheme/mzscheme.swg @@ -19,7 +19,7 @@ #define SCM_VALIDATE_LIST(argnum, value) (void)0 /* Read in standard typemaps. */ -%include "typemaps.i" +%include %insert(init) "swiginit.swg" diff --git a/Lib/mzscheme/std_pair.i b/Lib/mzscheme/std_pair.i index 1339780bd..d0e8b12ea 100644 --- a/Lib/mzscheme/std_pair.i +++ b/Lib/mzscheme/std_pair.i @@ -5,8 +5,8 @@ // // MzScheme implementation -%include std_common.i -%include exception.i +%include +%include // ------------------------------------------------------------------------ diff --git a/Lib/mzscheme/std_string.i b/Lib/mzscheme/std_string.i index fe70e9ab5..7885e7ef8 100644 --- a/Lib/mzscheme/std_string.i +++ b/Lib/mzscheme/std_string.i @@ -12,7 +12,7 @@ // However, I think I'll wait until someone asks for it... // ------------------------------------------------------------------------ -%include exception.i +%include %{ #include diff --git a/Lib/ocaml/cstring.i b/Lib/ocaml/cstring.i index e61568323..67ed0e490 100644 --- a/Lib/ocaml/cstring.i +++ b/Lib/ocaml/cstring.i @@ -11,7 +11,7 @@ * some way. */ -%include "fragments.i" +%include /* %cstring_input_binary(TYPEMAP, SIZE) * diff --git a/Lib/ocaml/ocaml.i b/Lib/ocaml/ocaml.i index 272545725..13f5f376d 100644 --- a/Lib/ocaml/ocaml.i +++ b/Lib/ocaml/ocaml.i @@ -41,8 +41,8 @@ #define SWIG_free(mem) free(mem) /* Read in standard typemaps. */ -%include "swig.swg" -%include "typemaps.i" -%include "typecheck.i" -%include "exception.i" -%include "preamble.swg" +%include +%include +%include +%include +%include diff --git a/Lib/ocaml/ocaml.swg b/Lib/ocaml/ocaml.swg index e71944ba9..69b07c955 100644 --- a/Lib/ocaml/ocaml.swg +++ b/Lib/ocaml/ocaml.swg @@ -605,4 +605,4 @@ extern "C" { /* still we include the file, but the warning says that the offending name will be properly renamed. Just to let the user to know about it. */ -%include "ocamlkw.swg" +%include diff --git a/Lib/ocaml/std_deque.i b/Lib/ocaml/std_deque.i index 499549cbf..4e6f71e21 100644 --- a/Lib/ocaml/std_deque.i +++ b/Lib/ocaml/std_deque.i @@ -20,4 +20,4 @@ } }; -%include "_std_deque.i" +%include <_std_deque.i> diff --git a/Lib/ocaml/std_pair.i b/Lib/ocaml/std_pair.i index 7445348eb..98c239cde 100644 --- a/Lib/ocaml/std_pair.i +++ b/Lib/ocaml/std_pair.i @@ -5,8 +5,8 @@ // // Common implementation -%include std_common.i -%include exception.i +%include +%include // ------------------------------------------------------------------------ // std::pair diff --git a/Lib/ocaml/std_string.i b/Lib/ocaml/std_string.i index cca4ecfd0..046766984 100644 --- a/Lib/ocaml/std_string.i +++ b/Lib/ocaml/std_string.i @@ -13,7 +13,7 @@ // However, I think I'll wait until someone asks for it... // ------------------------------------------------------------------------ -%include exception.i +%include %{ #include @@ -22,7 +22,7 @@ using std::vector; %} -%include std_vector.i +%include namespace std { template class basic_string { diff --git a/Lib/ocaml/std_vector.i b/Lib/ocaml/std_vector.i index edd6fc29e..cb5e5a002 100644 --- a/Lib/ocaml/std_vector.i +++ b/Lib/ocaml/std_vector.i @@ -6,7 +6,7 @@ // // Ocaml implementation -%include std_common.i +%include // ------------------------------------------------------------------------ // std::vector diff --git a/Lib/ocaml/typemaps.i b/Lib/ocaml/typemaps.i index b7a908fd4..556cfa702 100644 --- a/Lib/ocaml/typemaps.i +++ b/Lib/ocaml/typemaps.i @@ -206,7 +206,7 @@ SIMPLE_MAP(unsigned long long,caml_val_ulong,caml_long_val); } #if 0 -%include "carray.i" +%include #endif /* Handle char arrays as strings */ diff --git a/Lib/perl5/perltypemaps.swg b/Lib/perl5/perltypemaps.swg index 0645babb1..efed330c8 100644 --- a/Lib/perl5/perltypemaps.swg +++ b/Lib/perl5/perltypemaps.swg @@ -22,7 +22,7 @@ %include /* Look for user fragments file. */ -%include "perlfragments.swg" +%include /* Perl fragments for primitive types */ %include diff --git a/Lib/perl5/std_list.i b/Lib/perl5/std_list.i index 47dead085..93591cf79 100644 --- a/Lib/perl5/std_list.i +++ b/Lib/perl5/std_list.i @@ -6,8 +6,8 @@ // Perl implementation -%include std_common.i -%include exception.i +%include +%include // containers diff --git a/Lib/perl5/std_pair.i b/Lib/perl5/std_pair.i index 488648883..bff9c91b0 100644 --- a/Lib/perl5/std_pair.i +++ b/Lib/perl5/std_pair.i @@ -5,8 +5,8 @@ // // Common implementation -%include std_common.i -%include exception.i +%include +%include // ------------------------------------------------------------------------ // std::pair diff --git a/Lib/php4/php4.swg b/Lib/php4/php4.swg index 1c8c0b02f..2ff5fd668 100644 --- a/Lib/php4/php4.swg +++ b/Lib/php4/php4.swg @@ -8,10 +8,10 @@ %runtime "swigrun.swg" // Common C API type-checking code %runtime "php4run.swg" // Php4 runtime functions -%include "php4init.swg" // Php4 initialization routine. +%include // Php4 initialization routine. -%include "globalvar.i" // Global variables. -%include "const.i" +%include // Global variables. +%include // use %init %{ "/*code goes here*/ " %} // or %minit %{ "/* code goes here*/ " %} to @@ -33,7 +33,7 @@ /* Typemaps for input parameters by value */ -%include "utils.i" +%include %pass_by_val(bool,CONVERT_BOOL_IN); @@ -293,4 +293,4 @@ /* php keywords */ -%include "php4kw.swg" +%include diff --git a/Lib/php4/std_pair.i b/Lib/php4/std_pair.i index 7445348eb..98c239cde 100644 --- a/Lib/php4/std_pair.i +++ b/Lib/php4/std_pair.i @@ -5,8 +5,8 @@ // // Common implementation -%include std_common.i -%include exception.i +%include +%include // ------------------------------------------------------------------------ // std::pair diff --git a/Lib/php4/std_string.i b/Lib/php4/std_string.i index 2b9336950..94759a448 100644 --- a/Lib/php4/std_string.i +++ b/Lib/php4/std_string.i @@ -13,7 +13,7 @@ // However, I think I'll wait until someone asks for it... // ------------------------------------------------------------------------ -%include exception.i +%include %{ #include diff --git a/Lib/pike/pike.swg b/Lib/pike/pike.swg index f804e80a5..9a17a6baf 100644 --- a/Lib/pike/pike.swg +++ b/Lib/pike/pike.swg @@ -11,9 +11,9 @@ #ifdef __cplusplus extern "C" { #endif -#include "global.h" -#include "module.h" -#include "interpret.h" +#include +#include +#include #ifdef __cplusplus } #endif @@ -336,4 +336,4 @@ PIKE_MODULE_INIT %} /* pike keywords */ -%include "pikekw.swg" +%include diff --git a/Lib/python/pycontainer.swg b/Lib/python/pycontainer.swg index 5a4c12e7e..2b02eae9b 100644 --- a/Lib/python/pycontainer.swg +++ b/Lib/python/pycontainer.swg @@ -22,7 +22,7 @@ #include %} -%include std_except.i +%include diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index fcd56a85d..ec1e4e308 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -46,6 +46,16 @@ #define SWIG_Error(code, msg) PyErr_SetString(SWIG_Python_ErrorType(code), msg) #define SWIG_fail goto fail +/* + Helper for static pointer initialization for both C and C++ code, for example + static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); +*/ +#ifdef __cplusplus +#define SWIG_STATIC_POINTER(var) var +#else +#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var +#endif + /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */ diff --git a/Lib/python/pytypemaps.swg b/Lib/python/pytypemaps.swg index feb3f5bab..d378e8519 100644 --- a/Lib/python/pytypemaps.swg +++ b/Lib/python/pytypemaps.swg @@ -13,7 +13,7 @@ %include /* Look for user fragments file. */ -%include "pyfragments.swg" +%include /* Python fragments for fundamental types */ %include diff --git a/Lib/ruby/rubytypemaps.swg b/Lib/ruby/rubytypemaps.swg index 7510b257e..3ce94d931 100644 --- a/Lib/ruby/rubytypemaps.swg +++ b/Lib/ruby/rubytypemaps.swg @@ -9,7 +9,7 @@ %include /* Look for user fragments file. */ -%include "rubyfragments.swg" +%include /* Ruby fragments for primitive types */ %include diff --git a/Lib/ruby/std_deque.i b/Lib/ruby/std_deque.i index 9cf0dd81b..696d92c9a 100644 --- a/Lib/ruby/std_deque.i +++ b/Lib/ruby/std_deque.i @@ -9,4 +9,4 @@ %alias std::deque::push_back "<<"; %alias std::deque::size "length"; -%include "_std_deque.i" +%include <_std_deque.i> diff --git a/Lib/ruby/std_pair.i b/Lib/ruby/std_pair.i index 61b388cae..0cfea0728 100644 --- a/Lib/ruby/std_pair.i +++ b/Lib/ruby/std_pair.i @@ -5,8 +5,8 @@ // // Ruby implementation -%include std_common.i -%include exception.i +%include +%include // ------------------------------------------------------------------------ // std::pair diff --git a/Lib/std/std_except.i b/Lib/std/std_except.i index 9965c3481..5d9bf65b5 100644 --- a/Lib/std/std_except.i +++ b/Lib/std/std_except.i @@ -14,7 +14,7 @@ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentException, $1.what(), ""); return $null; %} #else - %include "exception.i" + %include %typemap(throws) std::out_of_range %{ SWIG_exception(SWIG_IndexError, $1.what()); %} #endif diff --git a/Lib/std_deque.i b/Lib/std_deque.i index c580c72d6..86e614ace 100644 --- a/Lib/std_deque.i +++ b/Lib/std_deque.i @@ -2,4 +2,4 @@ %module std_deque /* Include implementation specific code */ -%include "_std_deque.i" +%include <_std_deque.i> diff --git a/Lib/stl.i b/Lib/stl.i index 33ab91dfa..02754d22e 100644 --- a/Lib/stl.i +++ b/Lib/stl.i @@ -6,9 +6,9 @@ // the %include directives below will fetch the files from the // appropriate language directory -%include std_common.i -%include std_string.i -%include std_vector.i -%include std_map.i -%include std_pair.i +%include +%include +%include +%include +%include diff --git a/Lib/swiglabels.swg b/Lib/swiglabels.swg index 4dee3cd2a..aa1f8b849 100644 --- a/Lib/swiglabels.swg +++ b/Lib/swiglabels.swg @@ -68,18 +68,3 @@ # endif #endif - -/* - Use this label for initialize a static pointer, as in - - int a; - int b; - static PyObject *SWIG_SATIC_POINTER(MyVar) = NewSomething(..); - ... - -*/ -#ifdef __cplusplus -#define SWIG_STATIC_POINTER(var) var -#else -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var -#endif diff --git a/Lib/tcl/std_pair.i b/Lib/tcl/std_pair.i index 7445348eb..98c239cde 100644 --- a/Lib/tcl/std_pair.i +++ b/Lib/tcl/std_pair.i @@ -5,8 +5,8 @@ // // Common implementation -%include std_common.i -%include exception.i +%include +%include // ------------------------------------------------------------------------ // std::pair diff --git a/Lib/tcl/tclsh.i b/Lib/tcl/tclsh.i index 6301b2024..cec34758b 100644 --- a/Lib/tcl/tclsh.i +++ b/Lib/tcl/tclsh.i @@ -15,7 +15,7 @@ both static and dynamic loading, put something like this in your interface file : #ifdef STATIC - %include tclsh.i + %include #endif %} #endif diff --git a/Lib/tcl/tcltypemaps.swg b/Lib/tcl/tcltypemaps.swg index 1bd937054..8db4cbe3e 100644 --- a/Lib/tcl/tcltypemaps.swg +++ b/Lib/tcl/tcltypemaps.swg @@ -19,7 +19,7 @@ %include /* Look for user fragments file. */ -%include "tclfragments.swg" +%include /* Tcl fragments for primitve types */ %include diff --git a/Lib/tcl/wish.i b/Lib/tcl/wish.i index 5d9e036b4..e11ca2f77 100644 --- a/Lib/tcl/wish.i +++ b/Lib/tcl/wish.i @@ -7,6 +7,9 @@ // /* Revision History * $Log$ + * Revision 1.4 2005/11/26 09:28:20 wsfulton + * Use the system angle brackets for %include + * * Revision 1.3 2002/11/30 22:10:09 beazley * *** empty log message *** * @@ -37,7 +40,7 @@ both static and dynamic loading, put something like this in your interface file : #ifdef STATIC - %include wish.i + %include #endif A startup file may be specified by defining the symbol SWIG_RcFileName diff --git a/Lib/xml/typemaps.i b/Lib/xml/typemaps.i index f6235ee8f..e604e97ca 100644 --- a/Lib/xml/typemaps.i +++ b/Lib/xml/typemaps.i @@ -13,7 +13,7 @@ #ifdef AUTODOC %section "Typemap Library (Perl 5)",info,after,pre,nosort,skip=1,chop_left=3,chop_right=0,chop_top=0,chop_bottom=0 %text %{ -%include typemaps.i +%include The SWIG typemap library provides a language independent mechanism for supporting output arguments, input values, and other C function @@ -62,12 +62,12 @@ To use these, suppose you had a C function like this : You could wrap it with SWIG as follows : - %include typemaps.i + %include double fadd(double *INPUT, double *INPUT); or you can use the %apply directive : - %include typemaps.i + %include %apply double *INPUT { double *a, double *b }; double fadd(double *a, double *b); @@ -156,12 +156,12 @@ returns the integer part in one of its parameters).K: You could wrap it with SWIG as follows : - %include typemaps.i + %include double modf(double x, double *OUTPUT); or you can use the %apply directive : - %include typemaps.i + %include %apply double *OUTPUT { double *ip }; double modf(double x, double *ip); @@ -246,12 +246,12 @@ For example, suppose you were trying to wrap the following function : You could wrap it with SWIG as follows : - %include typemaps.i + %include void neg(double *BOTH); or you can use the %apply directive : - %include typemaps.i + %include %apply double *BOTH { double *x }; void neg(double *x); @@ -318,12 +318,12 @@ For example, suppose you were trying to wrap the following function : You could wrap it with SWIG as follows : - %include typemaps.i + %include void neg(double *REFERENCE); or you can use the %apply directive : - %include typemaps.i + %include %apply double *REFERENCE { double *x }; void neg(double *x);