Use the system angle brackets for %include
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7871 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
79aedd92d7
commit
e013e7ff5a
52 changed files with 132 additions and 134 deletions
|
|
@ -16,16 +16,16 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
%include "chicken/chickenkw.swg"
|
%include <chicken/chickenkw.swg>
|
||||||
%include "csharp/csharpkw.swg"
|
%include <csharp/csharpkw.swg>
|
||||||
%include "java/javakw.swg"
|
%include <java/javakw.swg>
|
||||||
%include "php4/php4kw.swg"
|
%include <php4/php4kw.swg>
|
||||||
%include "pike/pikekw.swg"
|
%include <pike/pikekw.swg>
|
||||||
%include "python/pythonkw.swg"
|
%include <python/pythonkw.swg>
|
||||||
%include "ocaml/ocamlkw.swg"
|
%include <ocaml/ocamlkw.swg>
|
||||||
%include "ruby/rubykw.swg"
|
%include <ruby/rubykw.swg>
|
||||||
%include "tcl/tclkw.swg"
|
%include <tcl/tclkw.swg>
|
||||||
%include "perl5/perlkw.swg"
|
%include <perl5/perlkw.swg>
|
||||||
|
|
||||||
|
|
||||||
#endif //__Lib_allkw_swg__
|
#endif //__Lib_allkw_swg__
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
/* chicken.h has to appear first. */
|
/* chicken.h has to appear first. */
|
||||||
|
|
||||||
%insert(runtime) %{
|
%insert(runtime) %{
|
||||||
#include "chicken.h"
|
#include <chicken.h>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%insert(runtime) "swigrun.swg"; // Common C API type-checking code
|
%insert(runtime) "swigrun.swg"; // Common C API type-checking code
|
||||||
|
|
@ -695,7 +695,7 @@ $result = C_SCHEME_UNDEFINED;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/* Warnings for certain CHICKEN keywords */
|
/* Warnings for certain CHICKEN keywords */
|
||||||
%include "chickenkw.swg"
|
%include <chickenkw.swg>
|
||||||
|
|
||||||
/* TinyCLOS <--> Low-level CHICKEN */
|
/* TinyCLOS <--> Low-level CHICKEN */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,12 +53,12 @@ To use these, suppose you had a C function like this :
|
||||||
|
|
||||||
You could wrap it with SWIG as follows :
|
You could wrap it with SWIG as follows :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
double fadd(double *INPUT, double *INPUT);
|
double fadd(double *INPUT, double *INPUT);
|
||||||
|
|
||||||
or you can use the %apply directive :
|
or you can use the %apply directive :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
%apply double *INPUT { double *a, double *b };
|
%apply double *INPUT { double *a, double *b };
|
||||||
double fadd(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 :
|
You could wrap it with SWIG as follows :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
double modf(double x, double *OUTPUT);
|
double modf(double x, double *OUTPUT);
|
||||||
|
|
||||||
or you can use the %apply directive :
|
or you can use the %apply directive :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
%apply double *OUTPUT { double *ip };
|
%apply double *OUTPUT { double *ip };
|
||||||
double modf(double x, 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 :
|
You could wrap it with SWIG as follows :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
void neg(double *INOUT);
|
void neg(double *INOUT);
|
||||||
|
|
||||||
or you can use the %apply directive :
|
or you can use the %apply directive :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
%apply double *INOUT { double *x };
|
%apply double *INOUT { double *x };
|
||||||
void neg(double *x);
|
void neg(double *x);
|
||||||
|
|
||||||
As well, you can wrap variables with :
|
As well, you can wrap variables with :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
%apply double *INOUT { double *y };
|
%apply double *INOUT { double *y };
|
||||||
extern double *y;
|
extern double *y;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#ifdef AUTODOC
|
#ifdef AUTODOC
|
||||||
%text %{
|
%text %{
|
||||||
%include constraints.i
|
%include <constraints.i>
|
||||||
|
|
||||||
This library provides support for applying constraints to function
|
This library provides support for applying constraints to function
|
||||||
arguments. Using a constraint, you can restrict arguments to be
|
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
|
#endif
|
||||||
|
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
#ifdef SWIGCSHARP
|
#ifdef SWIGCSHARP
|
||||||
// Required attribute for C# exception handling
|
// Required attribute for C# exception handling
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
* CSharp typemaps
|
* 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, 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.
|
* 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 };
|
%apply unsigned long { size_t };
|
||||||
|
|
||||||
/* csharp keywords */
|
/* csharp keywords */
|
||||||
%include "csharpkw.swg"
|
%include <csharpkw.swg>
|
||||||
|
|
||||||
// Default enum handling
|
// Default enum handling
|
||||||
%include "enums.swg"
|
%include <enums.swg>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// Alternative char * typemaps.
|
// Alternative char * typemaps.
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
//
|
//
|
||||||
// Common implementation
|
// Common implementation
|
||||||
|
|
||||||
%include std_common.i
|
%include <std_common.i>
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// std::pair
|
// std::pair
|
||||||
|
|
|
||||||
|
|
@ -358,6 +358,6 @@ SWIG_STD_VECTOR_SPECIALIZE(long, long long)
|
||||||
SWIG_STD_VECTOR_SPECIALIZE(ulong, unsigned long long)
|
SWIG_STD_VECTOR_SPECIALIZE(ulong, unsigned long long)
|
||||||
SWIG_STD_VECTOR_SPECIALIZE(float, float)
|
SWIG_STD_VECTOR_SPECIALIZE(float, float)
|
||||||
SWIG_STD_VECTOR_SPECIALIZE(double, double)
|
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>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,12 +43,12 @@ To use these, suppose you had a C function like this :
|
||||||
|
|
||||||
You could wrap it with SWIG as follows :
|
You could wrap it with SWIG as follows :
|
||||||
|
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
double fadd(double *INPUT, double *INPUT);
|
double fadd(double *INPUT, double *INPUT);
|
||||||
|
|
||||||
or you can use the %apply directive :
|
or you can use the %apply directive :
|
||||||
|
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
%apply double *INPUT { double *a, double *b };
|
%apply double *INPUT { double *a, double *b };
|
||||||
double fadd(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 :
|
You could wrap it with SWIG as follows :
|
||||||
|
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
double modf(double x, double *OUTPUT);
|
double modf(double x, double *OUTPUT);
|
||||||
|
|
||||||
or you can use the %apply directive :
|
or you can use the %apply directive :
|
||||||
|
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
%apply double *OUTPUT { double *ip };
|
%apply double *OUTPUT { double *ip };
|
||||||
double modf(double x, 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 :
|
You could wrap it with SWIG as follows :
|
||||||
|
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
void neg(double *INOUT);
|
void neg(double *INOUT);
|
||||||
|
|
||||||
or you can use the %apply directive :
|
or you can use the %apply directive :
|
||||||
|
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
%apply double *INOUT { double *x };
|
%apply double *INOUT { double *x };
|
||||||
void neg(double *x);
|
void neg(double *x);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,4 @@
|
||||||
|
|
||||||
#define GUILE_APPEND_RESULT SWIG_APPEND_VALUE
|
#define GUILE_APPEND_RESULT SWIG_APPEND_VALUE
|
||||||
|
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
%runtime "swigrun.swg"
|
%runtime "swigrun.swg"
|
||||||
%runtime "guile_gh_run.swg"
|
%runtime "guile_gh_run.swg"
|
||||||
%include "guile.i"
|
%include <guile.i>
|
||||||
|
|
||||||
%runtime %{
|
%runtime %{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
%runtime "swigrun.swg" // Common C API type-checking code
|
%runtime "swigrun.swg" // Common C API type-checking code
|
||||||
|
|
||||||
%runtime "guile_scm_run.swg"
|
%runtime "guile_scm_run.swg"
|
||||||
%include "ghinterface.i"
|
%include <ghinterface.i>
|
||||||
%include "guile.i"
|
%include <guile.i>
|
||||||
|
|
||||||
%runtime %{
|
%runtime %{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
//
|
//
|
||||||
// Guile implementation
|
// Guile implementation
|
||||||
|
|
||||||
%include std_common.i
|
%include <std_common.i>
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// std::pair
|
// std::pair
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
// However, I think I'll wait until someone asks for it...
|
// However, I think I'll wait until someone asks for it...
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
Example usage:
|
Example usage:
|
||||||
Wrapping:
|
Wrapping:
|
||||||
|
|
||||||
%include "arrays_java.i"
|
%include <arrays_java.i>
|
||||||
%inline %{
|
%inline %{
|
||||||
short FiddleSticks[3];
|
short FiddleSticks[3];
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -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, 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.
|
* 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 };
|
%apply unsigned long { size_t };
|
||||||
|
|
||||||
/* java keywords */
|
/* java keywords */
|
||||||
%include "javakw.swg"
|
%include <javakw.swg>
|
||||||
|
|
||||||
// Default enum handling
|
// Default enum handling
|
||||||
%include "enumtypesafe.swg"
|
%include <enumtypesafe.swg>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
//
|
//
|
||||||
// Common implementation
|
// Common implementation
|
||||||
|
|
||||||
%include std_common.i
|
%include <std_common.i>
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// std::pair
|
// std::pair
|
||||||
|
|
|
||||||
|
|
@ -44,12 +44,12 @@ To use these, suppose you had a C function like this :
|
||||||
|
|
||||||
You could wrap it with SWIG as follows :
|
You could wrap it with SWIG as follows :
|
||||||
|
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
double fadd(double *INPUT, double *INPUT);
|
double fadd(double *INPUT, double *INPUT);
|
||||||
|
|
||||||
or you can use the %apply directive :
|
or you can use the %apply directive :
|
||||||
|
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
%apply double *INPUT { double *a, double *b };
|
%apply double *INPUT { double *a, double *b };
|
||||||
double fadd(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);
|
double answer = modulename.fadd(10.0, 20.0);
|
||||||
|
|
||||||
There are no char *INPUT typemaps, however you can apply the signed char * typemaps instead:
|
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};
|
%apply signed char *INPUT {char *input};
|
||||||
void f(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 :
|
You could wrap it with SWIG as follows :
|
||||||
|
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
double modf(double x, double *OUTPUT);
|
double modf(double x, double *OUTPUT);
|
||||||
|
|
||||||
or you can use the %apply directive :
|
or you can use the %apply directive :
|
||||||
|
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
%apply double *OUTPUT { double *ip };
|
%apply double *OUTPUT { double *ip };
|
||||||
double modf(double x, 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);
|
double fraction = modulename.modf(5.0,ptr);
|
||||||
|
|
||||||
There are no char *OUTPUT typemaps, however you can apply the signed char * typemaps instead:
|
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};
|
%apply signed char *OUTPUT {char *output};
|
||||||
void f(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 :
|
You could wrap it with SWIG as follows :
|
||||||
|
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
void neg(double *INOUT);
|
void neg(double *INOUT);
|
||||||
|
|
||||||
or you can use the %apply directive :
|
or you can use the %apply directive :
|
||||||
|
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
%apply double *INOUT { double *x };
|
%apply double *INOUT { double *x };
|
||||||
void neg(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.
|
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:
|
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};
|
%apply signed char *INOUT {char *inout};
|
||||||
void f(char *inout);
|
void f(char *inout);
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
%{
|
%{
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
%}
|
%}
|
||||||
%include "exception.i"
|
%include <exception.i>
|
||||||
|
|
||||||
%typemap(throws) std::out_of_range %{
|
%typemap(throws) std::out_of_range %{
|
||||||
SWIG_exception(SWIG_IndexError, $1.what()); %}
|
SWIG_exception(SWIG_IndexError, $1.what()); %}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
* Modula3 typemaps
|
* 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, 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.
|
* The ctype typemap contains the C type used in the signature of C wrappers for C++ functions.
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#define SCM_VALIDATE_LIST(argnum, value) (void)0
|
#define SCM_VALIDATE_LIST(argnum, value) (void)0
|
||||||
|
|
||||||
/* Read in standard typemaps. */
|
/* Read in standard typemaps. */
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
|
|
||||||
%insert(init) "swiginit.swg"
|
%insert(init) "swiginit.swg"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
//
|
//
|
||||||
// MzScheme implementation
|
// MzScheme implementation
|
||||||
|
|
||||||
%include std_common.i
|
%include <std_common.i>
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
// However, I think I'll wait until someone asks for it...
|
// However, I think I'll wait until someone asks for it...
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* some way.
|
* some way.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
%include "fragments.i"
|
%include <fragments.i>
|
||||||
|
|
||||||
/* %cstring_input_binary(TYPEMAP, SIZE)
|
/* %cstring_input_binary(TYPEMAP, SIZE)
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,8 @@
|
||||||
#define SWIG_free(mem) free(mem)
|
#define SWIG_free(mem) free(mem)
|
||||||
|
|
||||||
/* Read in standard typemaps. */
|
/* Read in standard typemaps. */
|
||||||
%include "swig.swg"
|
%include <swig.swg>
|
||||||
%include "typemaps.i"
|
%include <typemaps.i>
|
||||||
%include "typecheck.i"
|
%include <typecheck.i>
|
||||||
%include "exception.i"
|
%include <exception.i>
|
||||||
%include "preamble.swg"
|
%include <preamble.swg>
|
||||||
|
|
|
||||||
|
|
@ -605,4 +605,4 @@ extern "C" {
|
||||||
/* still we include the file, but the warning says that the offending
|
/* 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
|
name will be properly renamed. Just to let the user to know about
|
||||||
it. */
|
it. */
|
||||||
%include "ocamlkw.swg"
|
%include <ocamlkw.swg>
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,4 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
%include "_std_deque.i"
|
%include <_std_deque.i>
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
//
|
//
|
||||||
// Common implementation
|
// Common implementation
|
||||||
|
|
||||||
%include std_common.i
|
%include <std_common.i>
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// std::pair
|
// std::pair
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
// However, I think I'll wait until someone asks for it...
|
// However, I think I'll wait until someone asks for it...
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
using std::vector;
|
using std::vector;
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%include std_vector.i
|
%include <std_vector.i>
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
template <class charT> class basic_string {
|
template <class charT> class basic_string {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
//
|
//
|
||||||
// Ocaml implementation
|
// Ocaml implementation
|
||||||
|
|
||||||
%include std_common.i
|
%include <std_common.i>
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// std::vector
|
// std::vector
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,7 @@ SIMPLE_MAP(unsigned long long,caml_val_ulong,caml_long_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
%include "carray.i"
|
%include <carray.i>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Handle char arrays as strings */
|
/* Handle char arrays as strings */
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
%include <typemaps/fragments.swg>
|
%include <typemaps/fragments.swg>
|
||||||
|
|
||||||
/* Look for user fragments file. */
|
/* Look for user fragments file. */
|
||||||
%include "perlfragments.swg"
|
%include <perlfragments.swg>
|
||||||
|
|
||||||
/* Perl fragments for primitive types */
|
/* Perl fragments for primitive types */
|
||||||
%include <perlprimtypes.swg>
|
%include <perlprimtypes.swg>
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
// Perl implementation
|
// Perl implementation
|
||||||
|
|
||||||
%include std_common.i
|
%include <std_common.i>
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
// containers
|
// containers
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
//
|
//
|
||||||
// Common implementation
|
// Common implementation
|
||||||
|
|
||||||
%include std_common.i
|
%include <std_common.i>
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// std::pair
|
// std::pair
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@
|
||||||
%runtime "swigrun.swg" // Common C API type-checking code
|
%runtime "swigrun.swg" // Common C API type-checking code
|
||||||
%runtime "php4run.swg" // Php4 runtime functions
|
%runtime "php4run.swg" // Php4 runtime functions
|
||||||
|
|
||||||
%include "php4init.swg" // Php4 initialization routine.
|
%include <php4init.swg> // Php4 initialization routine.
|
||||||
|
|
||||||
%include "globalvar.i" // Global variables.
|
%include <globalvar.i> // Global variables.
|
||||||
%include "const.i"
|
%include <const.i>
|
||||||
|
|
||||||
// use %init %{ "/*code goes here*/ " %}
|
// use %init %{ "/*code goes here*/ " %}
|
||||||
// or %minit %{ "/* code goes here*/ " %} to
|
// or %minit %{ "/* code goes here*/ " %} to
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
/* Typemaps for input parameters by value */
|
/* Typemaps for input parameters by value */
|
||||||
|
|
||||||
%include "utils.i"
|
%include <utils.i>
|
||||||
|
|
||||||
%pass_by_val(bool,CONVERT_BOOL_IN);
|
%pass_by_val(bool,CONVERT_BOOL_IN);
|
||||||
|
|
||||||
|
|
@ -293,4 +293,4 @@
|
||||||
|
|
||||||
|
|
||||||
/* php keywords */
|
/* php keywords */
|
||||||
%include "php4kw.swg"
|
%include <php4kw.swg>
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
//
|
//
|
||||||
// Common implementation
|
// Common implementation
|
||||||
|
|
||||||
%include std_common.i
|
%include <std_common.i>
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// std::pair
|
// std::pair
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
// However, I think I'll wait until someone asks for it...
|
// However, I think I'll wait until someone asks for it...
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#include "global.h"
|
#include <global.h>
|
||||||
#include "module.h"
|
#include <module.h>
|
||||||
#include "interpret.h"
|
#include <interpret.h>
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -336,4 +336,4 @@ PIKE_MODULE_INIT
|
||||||
%}
|
%}
|
||||||
|
|
||||||
/* pike keywords */
|
/* pike keywords */
|
||||||
%include "pikekw.swg"
|
%include <pikekw.swg>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%include std_except.i
|
%include <std_except.i>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,16 @@
|
||||||
#define SWIG_Error(code, msg) PyErr_SetString(SWIG_Python_ErrorType(code), msg)
|
#define SWIG_Error(code, msg) PyErr_SetString(SWIG_Python_ErrorType(code), msg)
|
||||||
#define SWIG_fail goto fail
|
#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
|
* Pointer declarations
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
%include <typemaps/fragments.swg>
|
%include <typemaps/fragments.swg>
|
||||||
|
|
||||||
/* Look for user fragments file. */
|
/* Look for user fragments file. */
|
||||||
%include "pyfragments.swg"
|
%include <pyfragments.swg>
|
||||||
|
|
||||||
/* Python fragments for fundamental types */
|
/* Python fragments for fundamental types */
|
||||||
%include <pyprimtypes.swg>
|
%include <pyprimtypes.swg>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
%include <typemaps/fragments.swg>
|
%include <typemaps/fragments.swg>
|
||||||
|
|
||||||
/* Look for user fragments file. */
|
/* Look for user fragments file. */
|
||||||
%include "rubyfragments.swg"
|
%include <rubyfragments.swg>
|
||||||
|
|
||||||
/* Ruby fragments for primitive types */
|
/* Ruby fragments for primitive types */
|
||||||
%include <rubyprimtypes.swg>
|
%include <rubyprimtypes.swg>
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@
|
||||||
%alias std::deque::push_back "<<";
|
%alias std::deque::push_back "<<";
|
||||||
%alias std::deque::size "length";
|
%alias std::deque::size "length";
|
||||||
|
|
||||||
%include "_std_deque.i"
|
%include <_std_deque.i>
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
//
|
//
|
||||||
// Ruby implementation
|
// Ruby implementation
|
||||||
|
|
||||||
%include std_common.i
|
%include <std_common.i>
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// std::pair
|
// std::pair
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentException, $1.what(), "");
|
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentException, $1.what(), "");
|
||||||
return $null; %}
|
return $null; %}
|
||||||
#else
|
#else
|
||||||
%include "exception.i"
|
%include <exception.i>
|
||||||
%typemap(throws) std::out_of_range %{
|
%typemap(throws) std::out_of_range %{
|
||||||
SWIG_exception(SWIG_IndexError, $1.what()); %}
|
SWIG_exception(SWIG_IndexError, $1.what()); %}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,4 @@
|
||||||
%module std_deque
|
%module std_deque
|
||||||
|
|
||||||
/* Include implementation specific code */
|
/* Include implementation specific code */
|
||||||
%include "_std_deque.i"
|
%include <_std_deque.i>
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@
|
||||||
// the %include directives below will fetch the files from the
|
// the %include directives below will fetch the files from the
|
||||||
// appropriate language directory
|
// appropriate language directory
|
||||||
|
|
||||||
%include std_common.i
|
%include <std_common.i>
|
||||||
%include std_string.i
|
%include <std_string.i>
|
||||||
%include std_vector.i
|
%include <std_vector.i>
|
||||||
%include std_map.i
|
%include <std_map.i>
|
||||||
%include std_pair.i
|
%include <std_pair.i>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,18 +68,3 @@
|
||||||
# endif
|
# endif
|
||||||
#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
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
//
|
//
|
||||||
// Common implementation
|
// Common implementation
|
||||||
|
|
||||||
%include std_common.i
|
%include <std_common.i>
|
||||||
%include exception.i
|
%include <exception.i>
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// std::pair
|
// std::pair
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ both static and dynamic loading, put something like this in your
|
||||||
interface file :
|
interface file :
|
||||||
|
|
||||||
#ifdef STATIC
|
#ifdef STATIC
|
||||||
%include tclsh.i
|
%include <tclsh.i>
|
||||||
#endif
|
#endif
|
||||||
%}
|
%}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
%include <typemaps/fragments.swg>
|
%include <typemaps/fragments.swg>
|
||||||
|
|
||||||
/* Look for user fragments file. */
|
/* Look for user fragments file. */
|
||||||
%include "tclfragments.swg"
|
%include <tclfragments.swg>
|
||||||
|
|
||||||
/* Tcl fragments for primitve types */
|
/* Tcl fragments for primitve types */
|
||||||
%include <tclprimtypes.swg>
|
%include <tclprimtypes.swg>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,9 @@
|
||||||
//
|
//
|
||||||
/* Revision History
|
/* Revision History
|
||||||
* $Log$
|
* $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
|
* Revision 1.3 2002/11/30 22:10:09 beazley
|
||||||
* *** empty log message ***
|
* *** empty log message ***
|
||||||
*
|
*
|
||||||
|
|
@ -37,7 +40,7 @@ both static and dynamic loading, put something like this in your
|
||||||
interface file :
|
interface file :
|
||||||
|
|
||||||
#ifdef STATIC
|
#ifdef STATIC
|
||||||
%include wish.i
|
%include <wish.i>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
A startup file may be specified by defining the symbol SWIG_RcFileName
|
A startup file may be specified by defining the symbol SWIG_RcFileName
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
#ifdef AUTODOC
|
#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
|
%section "Typemap Library (Perl 5)",info,after,pre,nosort,skip=1,chop_left=3,chop_right=0,chop_top=0,chop_bottom=0
|
||||||
%text %{
|
%text %{
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
|
|
||||||
The SWIG typemap library provides a language independent mechanism for
|
The SWIG typemap library provides a language independent mechanism for
|
||||||
supporting output arguments, input values, and other C function
|
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 :
|
You could wrap it with SWIG as follows :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
double fadd(double *INPUT, double *INPUT);
|
double fadd(double *INPUT, double *INPUT);
|
||||||
|
|
||||||
or you can use the %apply directive :
|
or you can use the %apply directive :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
%apply double *INPUT { double *a, double *b };
|
%apply double *INPUT { double *a, double *b };
|
||||||
double fadd(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 :
|
You could wrap it with SWIG as follows :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
double modf(double x, double *OUTPUT);
|
double modf(double x, double *OUTPUT);
|
||||||
|
|
||||||
or you can use the %apply directive :
|
or you can use the %apply directive :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
%apply double *OUTPUT { double *ip };
|
%apply double *OUTPUT { double *ip };
|
||||||
double modf(double x, 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 :
|
You could wrap it with SWIG as follows :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
void neg(double *BOTH);
|
void neg(double *BOTH);
|
||||||
|
|
||||||
or you can use the %apply directive :
|
or you can use the %apply directive :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
%apply double *BOTH { double *x };
|
%apply double *BOTH { double *x };
|
||||||
void neg(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 :
|
You could wrap it with SWIG as follows :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
void neg(double *REFERENCE);
|
void neg(double *REFERENCE);
|
||||||
|
|
||||||
or you can use the %apply directive :
|
or you can use the %apply directive :
|
||||||
|
|
||||||
%include typemaps.i
|
%include <typemaps.i>
|
||||||
%apply double *REFERENCE { double *x };
|
%apply double *REFERENCE { double *x };
|
||||||
void neg(double *x);
|
void neg(double *x);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue