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
This commit is contained in:
William S Fulton 2005-11-26 09:28:20 +00:00
commit cfdad24993
52 changed files with 132 additions and 134 deletions

View file

@ -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 <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>
#endif //__Lib_allkw_swg__

View file

@ -7,7 +7,7 @@
/* chicken.h has to appear first. */
%insert(runtime) %{
#include "chicken.h"
#include <chicken.h>
%}
%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 <chickenkw.swg>
/* TinyCLOS <--> Low-level CHICKEN */

View file

@ -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 <typemaps.i>
double fadd(double *INPUT, double *INPUT);
or you can use the %apply directive :
%include typemaps.i
%include <typemaps.i>
%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 <typemaps.i>
double modf(double x, double *OUTPUT);
or you can use the %apply directive :
%include typemaps.i
%include <typemaps.i>
%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 <typemaps.i>
void neg(double *INOUT);
or you can use the %apply directive :
%include typemaps.i
%include <typemaps.i>
%apply double *INOUT { double *x };
void neg(double *x);
As well, you can wrap variables with :
%include typemaps.i
%include <typemaps.i>
%apply double *INOUT { double *y };
extern double *y;

View file

@ -9,7 +9,7 @@
#ifdef AUTODOC
%text %{
%include constraints.i
%include <constraints.i>
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 <exception.i>
#ifdef SWIGCSHARP
// Required attribute for C# exception handling

View file

@ -4,7 +4,7 @@
* CSharp typemaps
* ----------------------------------------------------------------------------- */
%include "csharphead.swg"
%include <csharphead.swg>
/* 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 <csharpkw.swg>
// Default enum handling
%include "enums.swg"
%include <enums.swg>
/*
// Alternative char * typemaps.

View file

@ -5,8 +5,8 @@
//
// Common implementation
%include std_common.i
%include exception.i
%include <std_common.i>
%include <exception.i>
// ------------------------------------------------------------------------
// std::pair

View file

@ -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 <std_string.i>

View file

@ -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 <typemaps.i>
double fadd(double *INPUT, double *INPUT);
or you can use the %apply directive :
%include "typemaps.i"
%include <typemaps.i>
%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 <typemaps.i>
double modf(double x, double *OUTPUT);
or you can use the %apply directive :
%include "typemaps.i"
%include <typemaps.i>
%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 <typemaps.i>
void neg(double *INOUT);
or you can use the %apply directive :
%include "typemaps.i"
%include <typemaps.i>
%apply double *INOUT { double *x };
void neg(double *x);

View file

@ -26,4 +26,4 @@
#define GUILE_APPEND_RESULT SWIG_APPEND_VALUE
%include "typemaps.i"
%include <typemaps.i>

View file

@ -7,7 +7,7 @@
%runtime "swigrun.swg"
%runtime "guile_gh_run.swg"
%include "guile.i"
%include <guile.i>
%runtime %{

View file

@ -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 <ghinterface.i>
%include <guile.i>
%runtime %{

View file

@ -5,8 +5,8 @@
//
// Guile implementation
%include std_common.i
%include exception.i
%include <std_common.i>
%include <exception.i>
// ------------------------------------------------------------------------
// std::pair

View file

@ -12,7 +12,7 @@
// However, I think I'll wait until someone asks for it...
// ------------------------------------------------------------------------
%include exception.i
%include <exception.i>
%{
#include <string>

View file

@ -7,7 +7,7 @@
Example usage:
Wrapping:
%include "arrays_java.i"
%include <arrays_java.i>
%inline %{
short FiddleSticks[3];
%}

View file

@ -5,7 +5,7 @@
* ----------------------------------------------------------------------------- */
%include "javahead.swg"
%include <javahead.swg>
/* 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 <javakw.swg>
// Default enum handling
%include "enumtypesafe.swg"
%include <enumtypesafe.swg>

View file

@ -5,8 +5,8 @@
//
// Common implementation
%include std_common.i
%include exception.i
%include <std_common.i>
%include <exception.i>
// ------------------------------------------------------------------------
// std::pair

View file

@ -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 <typemaps.i>
double fadd(double *INPUT, double *INPUT);
or you can use the %apply directive :
%include "typemaps.i"
%include <typemaps.i>
%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 <typemaps.i>
%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 <typemaps.i>
double modf(double x, double *OUTPUT);
or you can use the %apply directive :
%include "typemaps.i"
%include <typemaps.i>
%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 <typemaps.i>
%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 <typemaps.i>
void neg(double *INOUT);
or you can use the %apply directive :
%include "typemaps.i"
%include <typemaps.i>
%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 <typemaps.i>
%apply signed char *INOUT {char *inout};
void f(char *inout);
*/

View file

@ -5,7 +5,7 @@
%{
#include <stdexcept>
%}
%include "exception.i"
%include <exception.i>
%typemap(throws) std::out_of_range %{
SWIG_exception(SWIG_IndexError, $1.what()); %}

View file

@ -4,7 +4,7 @@
* Modula3 typemaps
* ----------------------------------------------------------------------------- */
%include "modula3head.swg"
%include <modula3head.swg>
/* 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.

View file

@ -19,7 +19,7 @@
#define SCM_VALIDATE_LIST(argnum, value) (void)0
/* Read in standard typemaps. */
%include "typemaps.i"
%include <typemaps.i>
%insert(init) "swiginit.swg"

View file

@ -5,8 +5,8 @@
//
// MzScheme implementation
%include std_common.i
%include exception.i
%include <std_common.i>
%include <exception.i>
// ------------------------------------------------------------------------

View file

@ -12,7 +12,7 @@
// However, I think I'll wait until someone asks for it...
// ------------------------------------------------------------------------
%include exception.i
%include <exception.i>
%{
#include <string>

View file

@ -11,7 +11,7 @@
* some way.
*/
%include "fragments.i"
%include <fragments.i>
/* %cstring_input_binary(TYPEMAP, SIZE)
*

View file

@ -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 <swig.swg>
%include <typemaps.i>
%include <typecheck.i>
%include <exception.i>
%include <preamble.swg>

View file

@ -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 <ocamlkw.swg>

View file

@ -20,4 +20,4 @@
}
};
%include "_std_deque.i"
%include <_std_deque.i>

View file

@ -5,8 +5,8 @@
//
// Common implementation
%include std_common.i
%include exception.i
%include <std_common.i>
%include <exception.i>
// ------------------------------------------------------------------------
// std::pair

View file

@ -13,7 +13,7 @@
// However, I think I'll wait until someone asks for it...
// ------------------------------------------------------------------------
%include exception.i
%include <exception.i>
%{
#include <string>
@ -22,7 +22,7 @@
using std::vector;
%}
%include std_vector.i
%include <std_vector.i>
namespace std {
template <class charT> class basic_string {

View file

@ -6,7 +6,7 @@
//
// Ocaml implementation
%include std_common.i
%include <std_common.i>
// ------------------------------------------------------------------------
// std::vector

View file

@ -206,7 +206,7 @@ SIMPLE_MAP(unsigned long long,caml_val_ulong,caml_long_val);
}
#if 0
%include "carray.i"
%include <carray.i>
#endif
/* Handle char arrays as strings */

View file

@ -22,7 +22,7 @@
%include <typemaps/fragments.swg>
/* Look for user fragments file. */
%include "perlfragments.swg"
%include <perlfragments.swg>
/* Perl fragments for primitive types */
%include <perlprimtypes.swg>

View file

@ -6,8 +6,8 @@
// Perl implementation
%include std_common.i
%include exception.i
%include <std_common.i>
%include <exception.i>
// containers

View file

@ -5,8 +5,8 @@
//
// Common implementation
%include std_common.i
%include exception.i
%include <std_common.i>
%include <exception.i>
// ------------------------------------------------------------------------
// std::pair

View file

@ -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 <php4init.swg> // Php4 initialization routine.
%include "globalvar.i" // Global variables.
%include "const.i"
%include <globalvar.i> // Global variables.
%include <const.i>
// 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 <utils.i>
%pass_by_val(bool,CONVERT_BOOL_IN);
@ -293,4 +293,4 @@
/* php keywords */
%include "php4kw.swg"
%include <php4kw.swg>

View file

@ -5,8 +5,8 @@
//
// Common implementation
%include std_common.i
%include exception.i
%include <std_common.i>
%include <exception.i>
// ------------------------------------------------------------------------
// std::pair

View file

@ -13,7 +13,7 @@
// However, I think I'll wait until someone asks for it...
// ------------------------------------------------------------------------
%include exception.i
%include <exception.i>
%{
#include <string>

View file

@ -11,9 +11,9 @@
#ifdef __cplusplus
extern "C" {
#endif
#include "global.h"
#include "module.h"
#include "interpret.h"
#include <global.h>
#include <module.h>
#include <interpret.h>
#ifdef __cplusplus
}
#endif
@ -336,4 +336,4 @@ PIKE_MODULE_INIT
%}
/* pike keywords */
%include "pikekw.swg"
%include <pikekw.swg>

View file

@ -22,7 +22,7 @@
#include <stdexcept>
%}
%include std_except.i
%include <std_except.i>

View file

@ -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
* ----------------------------------------------------------------------------- */

View file

@ -13,7 +13,7 @@
%include <typemaps/fragments.swg>
/* Look for user fragments file. */
%include "pyfragments.swg"
%include <pyfragments.swg>
/* Python fragments for fundamental types */
%include <pyprimtypes.swg>

View file

@ -9,7 +9,7 @@
%include <typemaps/fragments.swg>
/* Look for user fragments file. */
%include "rubyfragments.swg"
%include <rubyfragments.swg>
/* Ruby fragments for primitive types */
%include <rubyprimtypes.swg>

View file

@ -9,4 +9,4 @@
%alias std::deque::push_back "<<";
%alias std::deque::size "length";
%include "_std_deque.i"
%include <_std_deque.i>

View file

@ -5,8 +5,8 @@
//
// Ruby implementation
%include std_common.i
%include exception.i
%include <std_common.i>
%include <exception.i>
// ------------------------------------------------------------------------
// std::pair

View file

@ -14,7 +14,7 @@
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentException, $1.what(), "");
return $null; %}
#else
%include "exception.i"
%include <exception.i>
%typemap(throws) std::out_of_range %{
SWIG_exception(SWIG_IndexError, $1.what()); %}
#endif

View file

@ -2,4 +2,4 @@
%module std_deque
/* Include implementation specific code */
%include "_std_deque.i"
%include <_std_deque.i>

View file

@ -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 <std_common.i>
%include <std_string.i>
%include <std_vector.i>
%include <std_map.i>
%include <std_pair.i>

View file

@ -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

View file

@ -5,8 +5,8 @@
//
// Common implementation
%include std_common.i
%include exception.i
%include <std_common.i>
%include <exception.i>
// ------------------------------------------------------------------------
// std::pair

View file

@ -15,7 +15,7 @@ both static and dynamic loading, put something like this in your
interface file :
#ifdef STATIC
%include tclsh.i
%include <tclsh.i>
#endif
%}
#endif

View file

@ -19,7 +19,7 @@
%include <typemaps/fragments.swg>
/* Look for user fragments file. */
%include "tclfragments.swg"
%include <tclfragments.swg>
/* Tcl fragments for primitve types */
%include <tclprimtypes.swg>

View file

@ -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 <wish.i>
#endif
A startup file may be specified by defining the symbol SWIG_RcFileName

View file

@ -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 <typemaps.i>
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 <typemaps.i>
double fadd(double *INPUT, double *INPUT);
or you can use the %apply directive :
%include typemaps.i
%include <typemaps.i>
%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 <typemaps.i>
double modf(double x, double *OUTPUT);
or you can use the %apply directive :
%include typemaps.i
%include <typemaps.i>
%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 <typemaps.i>
void neg(double *BOTH);
or you can use the %apply directive :
%include typemaps.i
%include <typemaps.i>
%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 <typemaps.i>
void neg(double *REFERENCE);
or you can use the %apply directive :
%include typemaps.i
%include <typemaps.i>
%apply double *REFERENCE { double *x };
void neg(double *x);