Removed ability to share type information by C linking
All type sharing happens through a global variable in the target language. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6390 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
02cffc8047
commit
75e462baa8
50 changed files with 204 additions and 1162 deletions
|
|
@ -1,6 +1,18 @@
|
||||||
Version 1.3.23 (in progress)
|
Version 1.3.23 (in progress)
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
10/16/2004: wuzzeb (John Lenz)
|
||||||
|
- Remove the ability to share type information by using c linking.
|
||||||
|
All type sharing happens through a global variable in the target language.
|
||||||
|
+ Remove SWIG_NOIMPORT, SWIG_RUNTIME, and related defines.
|
||||||
|
+ Depreciate -runtime, -noruntime command line options
|
||||||
|
+ Update test-suite common.mk to correctly build multicpptest
|
||||||
|
+ Remove reference to precommon.swg
|
||||||
|
+ Update the guile_gh interface to share data by a global var instead
|
||||||
|
of c linkage.
|
||||||
|
|
||||||
|
- Remove Advanced.html, since everything in it is now obsolete
|
||||||
|
|
||||||
10/09/2004: mmatus
|
10/09/2004: mmatus
|
||||||
- Split the python std/STL C++ library files, now
|
- Split the python std/STL C++ library files, now
|
||||||
all the language independent definitions are under
|
all the language independent definitions are under
|
||||||
|
|
|
||||||
|
|
@ -1,458 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
||||||
<!-- Published by Quadralay WebWorks HTML Lite 1.5.1 -->
|
|
||||||
<!-- And munged by Dave's special Python script -->
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Advanced Topics</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body bgcolor="#ffffff">
|
|
||||||
<H1><a name="Advanced"></a>30 Advanced Topics</H1>
|
|
||||||
<!-- INDEX -->
|
|
||||||
<ul>
|
|
||||||
<li><a href="#Advanced_nn2">Creating multi-module packages</a>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#Advanced_nn3">Runtime support (and potential problems)</a>
|
|
||||||
<li><a href="#Advanced_nn4">Why doesn't C++ inheritance work between modules?</a>
|
|
||||||
<li><a href="#Advanced_nn5">The SWIG runtime library</a>
|
|
||||||
<li><a href="#Advanced_nn6">A few dynamic loading gotchas</a>
|
|
||||||
</ul>
|
|
||||||
<li><a href="#Advanced_nn7">Dynamic Loading of C++ modules</a>
|
|
||||||
<li><a href="#Advanced_nn8">Inside the SWIG type-checker</a>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#Advanced_nn9">Type equivalence</a>
|
|
||||||
<li><a href="#Advanced_nn10">Type casting</a>
|
|
||||||
<li><a href="#Advanced_nn11">Why a name based approach?</a>
|
|
||||||
<li><a href="#Advanced_nn12">Performance of the type-checker</a>
|
|
||||||
</ul>
|
|
||||||
</ul>
|
|
||||||
<!-- INDEX -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<b>Caution: This chapter is under repair!</b>
|
|
||||||
|
|
||||||
<H2><a name="Advanced_nn2"></a>30.1 Creating multi-module packages</H2>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
SWIG can be used to create packages consisting of many different modules. However, there are some technical aspects of doing this and techniques for managing the problem.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This chapter doesn't apply to those languages that use static type checking, rather than runtime type checking, such as Java and C#.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<H3><a name="Advanced_nn3"></a>30.1.1 Runtime support (and potential problems)</H3>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Most SWIG generated modules rely upon a small collection of functions that are used during run-time.
|
|
||||||
These functions are primarily used for pointer type-checking, exception handling, and so on.
|
|
||||||
When you run SWIG, these functions are included in the wrapper file (and declared as static).
|
|
||||||
If you create a system consisting of many modules, each one will have an identical copy of these runtime libraries :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<center><img src="ch11.1.png" alt="Modules 1-N each have their own identical runtime library"></center>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This duplication of runtime libraries is usually harmless since there are no namespace conflicts and memory overhead is minimal. However, there is serious problem related to the fact that modules do not share type-information. This is particularly a problem when working with C++ (as described next).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<H3><a name="Advanced_nn4"></a>30.1.2 Why doesn't C++ inheritance work between modules?</H3>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Consider for a moment the following two interface files :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
// File : a.i
|
|
||||||
%module a
|
|
||||||
|
|
||||||
// Here is a base class
|
|
||||||
class a {
|
|
||||||
public:
|
|
||||||
a();
|
|
||||||
virtual ~a();
|
|
||||||
void foo(double);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// File : b.i
|
|
||||||
%module b
|
|
||||||
|
|
||||||
// Here is a derived class
|
|
||||||
%import a.i // Gets definition of base class
|
|
||||||
|
|
||||||
class b : public a {
|
|
||||||
public:
|
|
||||||
bar();
|
|
||||||
};
|
|
||||||
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When compiled into two separate modules, the code does not work properly. In fact, you get a type error such as the following:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
[beazley@guinness shadow]$ <b>python</b>
|
|
||||||
Python 1.4 (Jan 16 1997) [GCC 2.7.2]
|
|
||||||
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
|
|
||||||
>>> <b>from a import *</b>
|
|
||||||
>>> <b>from b import *</b>
|
|
||||||
>>> <b># Create a new "b"</b>
|
|
||||||
>>> <b>b = new_b()</b>
|
|
||||||
>>> <b># Call a function in the base class</b>
|
|
||||||
...
|
|
||||||
>>> <b>a_foo(b,3)</b>
|
|
||||||
Traceback (innermost last):
|
|
||||||
File "<stdin>", line 1, in ?
|
|
||||||
TypeError: Type error in argument 1 of a_foo. Expected _a_p.
|
|
||||||
>>>
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
However, from our class definitions we know that "b" is an "a" by inheritance and there should be no type-error. This problem is directly due to the lack of type-sharing between modules. If we look closely at the module modules created here, they look like this :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<center><img src="ch11.2.png" alt="a accepts a, b accepts a and b, b accepts b"></center>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The type information listed shows the acceptable values for various C datatypes. In the "a" module, we see that "a" can only accept instances of itself. In the "b" module, we see that "a" can accept both "a" and "b" instances--which is correct given that a "b" is an "a" by inheritance.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Unfortunately, this problem is inherent in the method by which SWIG makes modules. When we made the "a" module, we had no idea what derived classes might be used at a later time. However, it's impossible to produce the proper type information until after we know all of the derived classes. A nice problem to be sure, but one that can be fixed by making all modules share a single copy of the SWIG run-time library.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<H3><a name="Advanced_nn5"></a>30.1.3 The SWIG runtime library</H3>
|
|
||||||
|
|
||||||
|
|
||||||
To reduce overhead and to fix type-handling problems, it is possible to share the SWIG run-time functions between multiple modules.
|
|
||||||
The <a href="Modules.html#Modules">Working with Modules</a> chapter describes this in further detail and how to build the SWIG runtime library. The steps can be summarised as follows:
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li> Build the SWIG run-time libraries. </li>
|
|
||||||
<li> Compile all SWIG modules using the <tt>-noruntime</tt> option. </li>
|
|
||||||
<li> Build SWIG modules by linking against the appropriate runtime libraries. </li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When completed you should now end up with a collection of modules like this:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<center><img src="ch11.3.png" alt="Modules 1-N using single runtime"></center>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
In this configuration, the runtime library manages all datatypes and other information between modules. This management process is dynamic in nature--when new modules are loaded, they contribute information to the run-time system. In the C++ world, one could incrementally load classes as needed. As this process occurs, type information is updated and base-classes learn about derived classes as needed.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<b>Compatibility Note:</b> In SWIG-1.3.19 and earlier releases, SWIG built the runtime libraries by default and attempted to install them with the SWIG installation. This had numerous limitations, not least, the version of the target language was tied to what was detected at installation time and would not necessarily be the version the user required.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<H3><a name="Advanced_nn6"></a>30.1.4 A few dynamic loading gotchas</H3>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When working with dynamic loading, it is critical to check that only one copy of the run-time library is being loaded into the system. When working with <tt>.a</tt> library files, problems can sometimes occur so there are a few approaches to the problem.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
1. Rebuild the scripting language executable with the SWIG runtime library attached to it. This is actually, fairly easy to do using SWIG. For example :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
%module mytclsh
|
|
||||||
%{
|
|
||||||
|
|
||||||
static void *__embedfunc(void *a) { return a};
|
|
||||||
%}
|
|
||||||
|
|
||||||
void *__embedfunc(void *);
|
|
||||||
%include tclsh.i
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Now, assuming you have built the <a href="Modules.html#Modules">runtime library</a> as <tt>swigruntcl</tt>, run SWIG and compile as follows:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
% <b>swig -c -tcl mytclsh.i</b>
|
|
||||||
% <b>gcc mytclsh_wrap.c -I/usr/local/include -L/usr/local/lib -ltcl -lswigruntcl -ldl -lm \
|
|
||||||
-o tclsh</b>
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This produces a new executable "<tt>tclsh</tt>" that contains a copy of the SWIG runtime library. The weird <tt>__embedfunc()</tt> function is needed to force the functions in the runtime library to be included in the final executable.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To make new dynamically loadable SWIG modules, simply compile as follows :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
% <b>swig -c -tcl example.i</b>
|
|
||||||
% <b>gcc -c example_wrap.c -I/usr/local/include</b>
|
|
||||||
% <b>ld -shared example_wrap.o -o example.so</b>
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Linking against the <tt>swigruntcl</tt> library is no longer necessary as all of the functions are now included in the <tt>tclsh</tt> executable and will be resolved when your module is loaded.
|
|
||||||
However, some operating systems, like Windows, will still require linking with the libraries so that there are no unresolved symbols.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
2. Using shared library versions of the runtime library
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If supported on your machine, the runtime libraries will be built as shared libraries (for example a <tt>.so</tt>, <tt>.sl</tt>, or .<tt>dll</tt> suffix). To compile using the runtime libraries, your link process should look something like this:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
% <b>ld -shared example_wrap.o -o libexample.so</b> # Irix
|
|
||||||
% <b>gcc -shared example_wrap.o -o libexample.so</b> # Linux
|
|
||||||
% <b>ld -G example_wrap.o -o libexample.so</b> # Solaris
|
|
||||||
> <b>cl /LD example_wrap.obj /o example.dll swigruntcl.lib tcl83.lib
|
|
||||||
/link /LIBPATH:PathToRuntimeLibrary /LIBPATH:c:\Tcl\lib</b> # Windows VC++
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
In order for the <tt>libexample.so</tt> library to work, it needs to be placed in a location where the dynamic loader can find it.
|
|
||||||
Typically this is a system library directory (eg. <tt>/usr/local/lib</tt> or <tt>/usr/lib</tt>).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When running with the shared libary version, you may get error messages such as the following:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
Unable to locate libexample.so
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This indicates that the loader was unable to find the shared libary at run-time.
|
|
||||||
To find shared libaries, the loader looks through a collection of predetermined paths.
|
|
||||||
If the shared library file is not in any of these directories, it results in an error.
|
|
||||||
On most machines, you can change the loader search path by changing the path (Windows) or environment variable <tt>LD_LIBRARY_PATH</tt> (Unix), e.g.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
% <b>setenv LD_LIBRARY_PATH .:/home/beazley/packages/lib</b>
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
A somewhat better approach is to link your module with the proper path encoded. This is typically done using the `<tt>-rpath</tt>' or `<tt>-R</tt>' option to your linker on Unix (see the man page). For example:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
% <b>ld -shared example_wrap.o example.o -rpath /home/beazley/packages/lib \
|
|
||||||
-L/home/beazley/packages/lib -lswigruntcl.so -o example.so</b>
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The <tt>-rpath</tt> option encodes the location of shared libraries into your modules and gets around having to set the <tt>LD_LIBRARY_PATH</tt> variable.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If all else fails, pull up the man pages for your linker and start playing around.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<H2><a name="Advanced_nn7"></a>30.2 Dynamic Loading of C++ modules</H2>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Dynamic loading of C++ modules presents a special problem for many systems. This is because C++ modules often need additional supporting code for proper initialization and operation. Static constructors are also a bit of a problem.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
While the process of building C++ modules is, by no means, and exact science, here are a few rules of thumb to follow :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Don't use static constructors if at all possible (not always avoidable).
|
|
||||||
<li>Try linking your module with the C++ compiler using a command like `c++ -shared'. This often solves alot of problems.
|
|
||||||
<li>Sometimes it is necessary to link against special libraries. For example, modules compiled with g++ often need to be linked against the <tt>libgcc.a</tt>, <tt>libg++.a</tt>, and <tt>libstdc++.a</tt> libraries.
|
|
||||||
<li>Read the compiler and linker man pages over and over until you have them memorized (this may not help in some cases however).
|
|
||||||
<li>Search articles on Usenet, particularly in <tt>comp.lang.tcl</tt>, <tt>comp.lang.perl</tt>, <tt>comp.lang.python</tt> and <tt>comp.lang.ruby</tt>. Building C++ modules is a common problem.
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The SWIG distribution contains some additional documentation about C++ modules in the Doc directory as well.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<H2><a name="Advanced_nn8"></a>30.3 Inside the SWIG type-checker</H2>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The SWIG runtime type-checker plays a critical role in the correct operation of SWIG modules. It not only checks the validity of pointer types, but also manages C++ inheritance, and performs proper type-casting of pointers when necessary. This section provides some insight into what it does, how it works, and why it is the way it is.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<H3><a name="Advanced_nn9"></a>30.3.1 Type equivalence</H3>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
SWIG uses a name-based approach to managing pointer datatypes. For example, if you are using a pointer like "<tt>double *</tt>", the type-checker will look for a particular string representation of that datatype such as "<tt>_double_p</tt>". If no match is found, a type-error is reported.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
However, the matching process is complicated by the fact that datatypes may use a variety of different names. For example, the following declarations
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
typedef double Real;
|
|
||||||
typedef Real * RealPtr;
|
|
||||||
typedef double Float;
|
|
||||||
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
define two sets of equivalent types :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
{double, Real, Float}
|
|
||||||
{RealPtr, Real *}
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
All of the types in each set are freely interchangable and the type-checker knows about the relationships by managing a table of equivalences such as the following :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
double => { Real, Float }
|
|
||||||
Real => { double, Float }
|
|
||||||
Float => { double, Real }
|
|
||||||
RealPtr => { Real * }
|
|
||||||
Real * => { RealPtr }
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When you declare a function such as the following :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
void foo(Real *a);
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
SWIG first checks to see if the argument passed is a "<tt>Real *</tt>". If not, it checks to see if it is any of the other equivalent types (<tt>double *</tt>, <tt>RealPtr</tt>, <tt>Float *</tt>). If so, the value is accepted and no error occurs.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Derived versions of the various datatypes are also legal. For example, if you had a function like this,
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
void bar(Float ***a);
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The type-checker will accept pointers of type <tt>double ***</tt> and <tt>Real ***.</tt> However, the type-checker does not always capture the full-range of possibilities. For example, a datatype of `<tt>RealPtr **</tt>' is equivalent to a `<tt>Float ***</tt>' but would be flagged as a type error. If you encounter this kind of problem, you can manually force SWIG to make an equivalence as follows:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
// Tell the type checker that `Float_ppp' and `RealPtr_pp' are equivalent.
|
|
||||||
%init %{
|
|
||||||
SWIG_RegisterMapping("Float_ppp","RealPtr_pp",0);
|
|
||||||
%}
|
|
||||||
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Doing this should hardly ever be necessary (I have never encountered a case where this was necessary), but if all else fails, you can force the run-time type checker into doing what you want.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Type-equivalence of C++ classes is handled in a similar manner, but is encoded in a manner to support inheritance. For example, consider the following classes hierarchy :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
class A { };
|
|
||||||
class B : public A { };
|
|
||||||
class C : public B { };
|
|
||||||
class D {};
|
|
||||||
class E : public C, public D {};
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The type-checker encodes this into the following sets :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
A => { B, C, E } "B isa A, C isa A, E isa A"
|
|
||||||
B => { C, E } "C isa B, E isa B"
|
|
||||||
C => { E } "E isa C"
|
|
||||||
D => { E } "E isa D"
|
|
||||||
E => { }
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The encoding reflects the class hierarchy. For example, any object of type "A" will also accept objects of type B,C, and E because these are all derived from A. However, it is not legal to go the other way. For example, a function operating on a object from class E will not accept an object from class A.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<H3><a name="Advanced_nn10"></a>30.3.2 Type casting</H3>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When working with C++ classes, SWIG needs to perform proper typecasting between derived and base classes. This is particularly important when working with multiple inheritance. To do this, conversion functions are created such as the following :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<blockquote><pre>
|
|
||||||
void *EtoA(void *ptr) {
|
|
||||||
E *in = (E *) ptr;
|
|
||||||
A *out = (A *) in; // Cast using C++
|
|
||||||
return (void *) out;
|
|
||||||
}
|
|
||||||
|
|
||||||
</pre></blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
All pointers are internally represented as void *, but conversion functions are always invoked when pointer values are converted between base and derived classes in a C++ class hierarchy.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<H3><a name="Advanced_nn11"></a>30.3.3 Why a name based approach?</H3>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
SWIG uses a name-based approach to type-checking for a number of reasons :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>One of SWIG's main uses is code development and debugging. In this environment, the type name of an object turns out to be a useful piece of information in tracking down problems.
|
|
||||||
<li>In languages like Perl, the name of a datatype is used to determine things like packages and classes. By using datatype names we get a natural mapping between C and Perl.
|
|
||||||
<li>I believe using the original names of datatypes is more intuitive than munging them into something completely different.
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
An alternative to a name based scheme would be to generate type-signatures based on the structure of a datatype. Such a scheme would result in perfect type-checking, but I think it would also result in a very confusing scripting language module. For this reason, I see SWIG sticking with the name-based approach--at least for the foreseeable future.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<H3><a name="Advanced_nn12"></a>30.3.4 Performance of the type-checker</H3>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The type-checker performs the following steps when matching a datatype :
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>1. Check a pointer against the type supplied in the original C declaration. If there is a perfect match, we're done.
|
|
||||||
<dt>2. Check the supplied pointer against a cache of recently used datatypes.
|
|
||||||
<dt>3. Search for a match against the full list of equivalent datatypes.
|
|
||||||
<dt>4. If not found, report an error.
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Most well-structured C codes will find an exact match on the first attempt, providing the best possible performance. For C++ codes, it is quite common to be passing various objects of a common base-class around between functions. When base-class functions are invoked, it almost always results in a miscompare (because the type-checker is looking for the base-type). In this case, we drop down to a small cache of recently used datatypes. If we've used a pointer of the same type recently, it will be in the cache and we can match against it. For tight loops, this results in about 10-15% overhead over finding a match on the first try. Finally, as a last resort, we need to search the internal pointer tables for a match. This involves a combination of hash table lookup and linear search. If a match is found, it is placed into the cache and the result returned. If not, we finally report a type-mismatch.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
As a rule of thumb, C++ programs require somewhat more processing than C programs, but this seems to be avoidable. Also, keep in mind that performance penalties in the type-checker don't necessarily translate into big penalties in the overall application. Performance is most greatly affected by the efficiency of the target scripting language and the types of operations your C code is performing.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -27,4 +27,3 @@ Python.html
|
||||||
Ruby.html
|
Ruby.html
|
||||||
Tcl.html
|
Tcl.html
|
||||||
Extending.html
|
Extending.html
|
||||||
Advanced.html
|
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
%module clientdata_prop_runtime
|
|
||||||
|
|
@ -35,7 +35,7 @@ TARGETPREFIX =
|
||||||
TARGETSUFFIX =
|
TARGETSUFFIX =
|
||||||
SWIGOPT = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$(LANGUAGE) -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)
|
SWIGOPT = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$(LANGUAGE) -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)
|
||||||
INCLUDES = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$(LANGUAGE) -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)
|
INCLUDES = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$(LANGUAGE) -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)
|
||||||
LIBS = -L. -l$*_runtime
|
LIBS = -L.
|
||||||
LIBPREFIX = lib
|
LIBPREFIX = lib
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
@ -369,15 +369,10 @@ swig_and_compile_c = \
|
||||||
$(LANGUAGE)$(VARIANT)
|
$(LANGUAGE)$(VARIANT)
|
||||||
|
|
||||||
swig_and_compile_multi_cpp = \
|
swig_and_compile_multi_cpp = \
|
||||||
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile CXXSRCS="$(CXXSRCS)" \
|
|
||||||
SWIG_LIB="$(SWIG_LIB)" SWIG="$(SWIG)" LIBPREFIX='$(LIBPREFIX)' \
|
|
||||||
INCLUDES="$(INCLUDES)" SWIGOPT="-runtime $(SWIGOPT)" NOLINK=true \
|
|
||||||
TARGET="$(TARGETPREFIX)$*$(TARGETSUFFIX)_runtime" INTERFACE="$*_runtime.i" \
|
|
||||||
$(LANGUAGE)$(VARIANT)_cpp && \
|
|
||||||
for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list` ; do \
|
for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list` ; do \
|
||||||
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile CXXSRCS="$(CXXSRCS)" \
|
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile CXXSRCS="$(CXXSRCS)" \
|
||||||
SWIG_LIB="$(SWIG_LIB)" SWIG="$(SWIG)" LIBS='$(LIBS)' \
|
SWIG_LIB="$(SWIG_LIB)" SWIG="$(SWIG)" LIBS='$(LIBS)' \
|
||||||
INCLUDES="$(INCLUDES)" SWIGOPT="-noruntime $(SWIGOPT)" NOLINK=true \
|
INCLUDES="$(INCLUDES)" SWIGOPT="$(SWIGOPT)" NOLINK=true \
|
||||||
TARGET="$(TARGETPREFIX)$${f}$(TARGETSUFFIX)" INTERFACE="$$f.i" \
|
TARGET="$(TARGETPREFIX)$${f}$(TARGETSUFFIX)" INTERFACE="$$f.i" \
|
||||||
$(LANGUAGE)$(VARIANT)_cpp; \
|
$(LANGUAGE)$(VARIANT)_cpp; \
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
// Empty module for building the runtime library
|
|
||||||
%module imports_runtime
|
|
||||||
|
|
||||||
|
|
@ -42,7 +42,7 @@ C_TEST_CASES += \
|
||||||
include $(srcdir)/../common.mk
|
include $(srcdir)/../common.mk
|
||||||
|
|
||||||
# Overridden variables here
|
# Overridden variables here
|
||||||
LIBS = -L. -l_$*_runtime
|
LIBS = -L.
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
// Empty module for building the runtime library
|
|
||||||
%module template_typedef_import_runtime
|
|
||||||
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
#include "chicken.h"
|
#include "chicken.h"
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%insert(runtime) "precommon.swg"
|
|
||||||
%insert(runtime) "common.swg"; // Common type-checking code
|
%insert(runtime) "common.swg"; // Common type-checking code
|
||||||
%insert(runtime) "chickenrun.swg"; // CHICKEN run-time code
|
%insert(runtime) "chickenrun.swg"; // CHICKEN run-time code
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
/*************************************************************** -*- c -*-
|
|
||||||
* chicken/precommon.swg
|
|
||||||
*
|
|
||||||
* Rename all exported symbols from common.swg, to avoid symbol
|
|
||||||
* clashes if multiple interpreters are included
|
|
||||||
*
|
|
||||||
************************************************************************/
|
|
||||||
|
|
||||||
#define SWIG_TypeRegister SWIG_Chicken_TypeRegister
|
|
||||||
#define SWIG_TypeCheck SWIG_Chicken_TypeCheck
|
|
||||||
#define SWIG_TypeCast SWIG_Chicken_TypeCast
|
|
||||||
#define SWIG_TypeDynamicCast SWIG_Chicken_TypeDynamicCast
|
|
||||||
#define SWIG_TypeName SWIG_Chicken_TypeName
|
|
||||||
#define SWIG_TypePrettyName SWIG_Chicken_TypePrettyName
|
|
||||||
#define SWIG_TypeQuery SWIG_Chicken_TypeQuery
|
|
||||||
#define SWIG_TypeClientData SWIG_Chicken_TypeClientData
|
|
||||||
#define SWIG_PackData SWIG_Chicken_PackData
|
|
||||||
#define SWIG_UnpackData SWIG_Chicken_UnpackData
|
|
||||||
|
|
||||||
|
|
@ -25,13 +25,7 @@
|
||||||
# define SWIGEXPORT(a) a
|
# define SWIGEXPORT(a) a
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SWIGIMPORT(a) a
|
#define SWIGRUNTIME(x) static x
|
||||||
|
|
||||||
#ifdef SWIG_GLOBAL
|
|
||||||
# define SWIGRUNTIME(a) SWIGEXPORT(a)
|
|
||||||
#else
|
|
||||||
# define SWIGRUNTIME(a) static a
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
@ -50,27 +44,11 @@ typedef struct swig_type_info {
|
||||||
struct swig_type_info *prev;
|
struct swig_type_info *prev;
|
||||||
} swig_type_info;
|
} swig_type_info;
|
||||||
|
|
||||||
#ifdef SWIG_NOINCLUDE
|
|
||||||
|
|
||||||
SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
|
|
||||||
SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
|
|
||||||
SWIGIMPORT(void *) SWIG_TypeCast(swig_type_info *, void *);
|
|
||||||
SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
|
|
||||||
SWIGIMPORT(const char *) SWIG_TypeName(const swig_type_info *);
|
|
||||||
SWIGIMPORT(const char *) SWIG_TypePrettyName(const swig_type_info *);
|
|
||||||
SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
|
|
||||||
SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *);
|
|
||||||
SWIGIMPORT(char *) SWIG_PackData(char *, void *, int);
|
|
||||||
SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int);
|
|
||||||
SWIGIMPORT(void) SWIG_PropagateClientData(swig_type_info *type);
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
static swig_type_info *swig_type_list = 0;
|
static swig_type_info *swig_type_list = 0;
|
||||||
static swig_type_info **swig_type_list_handle = &swig_type_list;
|
static swig_type_info **swig_type_list_handle = &swig_type_list;
|
||||||
|
|
||||||
/* Register a type mapping with the type-checking */
|
/* Register a type mapping with the type-checking */
|
||||||
SWIGRUNTIME(swig_type_info *)
|
static swig_type_info *
|
||||||
SWIG_TypeRegister(swig_type_info *ti) {
|
SWIG_TypeRegister(swig_type_info *ti) {
|
||||||
swig_type_info *tc, *head, *ret, *next;
|
swig_type_info *tc, *head, *ret, *next;
|
||||||
/* Check to see if this type has already been registered */
|
/* Check to see if this type has already been registered */
|
||||||
|
|
@ -110,7 +88,7 @@ SWIG_TypeRegister(swig_type_info *ti) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check the typename */
|
/* Check the typename */
|
||||||
SWIGRUNTIME(swig_type_info *)
|
static swig_type_info *
|
||||||
SWIG_TypeCheck(char *c, swig_type_info *ty) {
|
SWIG_TypeCheck(char *c, swig_type_info *ty) {
|
||||||
swig_type_info *s;
|
swig_type_info *s;
|
||||||
if (!ty) return 0; /* Void pointer */
|
if (!ty) return 0; /* Void pointer */
|
||||||
|
|
@ -136,14 +114,14 @@ SWIG_TypeCheck(char *c, swig_type_info *ty) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Cast a pointer up an inheritance hierarchy */
|
/* Cast a pointer up an inheritance hierarchy */
|
||||||
SWIGRUNTIME(void *)
|
static inline void *
|
||||||
SWIG_TypeCast(swig_type_info *ty, void *ptr) {
|
SWIG_TypeCast(swig_type_info *ty, void *ptr) {
|
||||||
if ((!ty) || (!ty->converter)) return ptr;
|
if ((!ty) || (!ty->converter)) return ptr;
|
||||||
return (*ty->converter)(ptr);
|
return (*ty->converter)(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dynamic pointer casting. Down an inheritance hierarchy */
|
/* Dynamic pointer casting. Down an inheritance hierarchy */
|
||||||
SWIGRUNTIME(swig_type_info *)
|
static swig_type_info *
|
||||||
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
|
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
|
||||||
swig_type_info *lastty = ty;
|
swig_type_info *lastty = ty;
|
||||||
if (!ty || !ty->dcast) return ty;
|
if (!ty || !ty->dcast) return ty;
|
||||||
|
|
@ -155,7 +133,7 @@ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the name associated with this type */
|
/* Return the name associated with this type */
|
||||||
SWIGRUNTIME(const char *)
|
static inline const char *
|
||||||
SWIG_TypeName(const swig_type_info *ty) {
|
SWIG_TypeName(const swig_type_info *ty) {
|
||||||
return ty->name;
|
return ty->name;
|
||||||
}
|
}
|
||||||
|
|
@ -163,7 +141,7 @@ SWIG_TypeName(const swig_type_info *ty) {
|
||||||
/* Return the pretty name associated with this type,
|
/* Return the pretty name associated with this type,
|
||||||
that is an unmangled type name in a form presentable to the user.
|
that is an unmangled type name in a form presentable to the user.
|
||||||
*/
|
*/
|
||||||
SWIGRUNTIME(const char *)
|
static const char *
|
||||||
SWIG_TypePrettyName(const swig_type_info *type) {
|
SWIG_TypePrettyName(const swig_type_info *type) {
|
||||||
/* The "str" field contains the equivalent pretty names of the
|
/* The "str" field contains the equivalent pretty names of the
|
||||||
type, separated by vertical-bar characters. We choose
|
type, separated by vertical-bar characters. We choose
|
||||||
|
|
@ -218,7 +196,7 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
|
||||||
|
|
||||||
|
|
||||||
/* Search for a swig_type_info structure */
|
/* Search for a swig_type_info structure */
|
||||||
SWIGRUNTIME(swig_type_info *)
|
static swig_type_info *
|
||||||
SWIG_TypeQuery(const char *name) {
|
SWIG_TypeQuery(const char *name) {
|
||||||
swig_type_info *ty = *swig_type_list_handle;
|
swig_type_info *ty = *swig_type_list_handle;
|
||||||
while (ty) {
|
while (ty) {
|
||||||
|
|
@ -230,7 +208,7 @@ SWIG_TypeQuery(const char *name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the clientdata field for a type */
|
/* Set the clientdata field for a type */
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
||||||
swig_type_info *tc, *equiv;
|
swig_type_info *tc, *equiv;
|
||||||
if (ti->clientdata == clientdata) return;
|
if (ti->clientdata == clientdata) return;
|
||||||
|
|
@ -250,7 +228,7 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pack binary data into a string */
|
/* Pack binary data into a string */
|
||||||
SWIGRUNTIME(char *)
|
static char *
|
||||||
SWIG_PackData(char *c, void *ptr, size_t sz) {
|
SWIG_PackData(char *c, void *ptr, size_t sz) {
|
||||||
static char hex[17] = "0123456789abcdef";
|
static char hex[17] = "0123456789abcdef";
|
||||||
unsigned char *u = (unsigned char *) ptr;
|
unsigned char *u = (unsigned char *) ptr;
|
||||||
|
|
@ -265,7 +243,7 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unpack binary data from a string */
|
/* Unpack binary data from a string */
|
||||||
SWIGRUNTIME(char *)
|
static char *
|
||||||
SWIG_UnpackData(char *c, void *ptr, size_t sz) {
|
SWIG_UnpackData(char *c, void *ptr, size_t sz) {
|
||||||
register unsigned char uu = 0;
|
register unsigned char uu = 0;
|
||||||
register int d;
|
register int d;
|
||||||
|
|
@ -292,7 +270,7 @@ SWIG_UnpackData(char *c, void *ptr, size_t sz) {
|
||||||
* of equivalent types. It is like calling
|
* of equivalent types. It is like calling
|
||||||
* SWIG_TypeClientData(type, clientdata) a second time.
|
* SWIG_TypeClientData(type, clientdata) a second time.
|
||||||
*/
|
*/
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_PropagateClientData(swig_type_info *type) {
|
SWIG_PropagateClientData(swig_type_info *type) {
|
||||||
swig_type_info *equiv = type->next;
|
swig_type_info *equiv = type->next;
|
||||||
swig_type_info *tc;
|
swig_type_info *tc;
|
||||||
|
|
@ -310,8 +288,6 @@ SWIG_PropagateClientData(swig_type_info *type) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,9 @@
|
||||||
static int _swig_init = 0;
|
static int _swig_init = 0;
|
||||||
|
|
||||||
if (!_swig_init) {
|
if (!_swig_init) {
|
||||||
|
SWIG_Guile_Init();
|
||||||
SWIG_Guile_RegisterTypes(swig_types, swig_types_initial);
|
SWIG_Guile_RegisterTypes(swig_types, swig_types_initial);
|
||||||
_swig_init = 1;
|
_swig_init = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIG_Guile_Init();
|
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -36,14 +36,6 @@ extern "C" {
|
||||||
(char *) FUNC_NAME, (char *) msg, \
|
(char *) FUNC_NAME, (char *) msg, \
|
||||||
SCM_EOL, SCM_BOOL_F); else
|
SCM_EOL, SCM_BOOL_F); else
|
||||||
|
|
||||||
#if defined(SWIG_NOINCLUDE)
|
|
||||||
# define SWIGSTATIC
|
|
||||||
#elif defined(SWIG_GLOBAL)
|
|
||||||
# define SWIGSTATIC
|
|
||||||
#else
|
|
||||||
# define SWIGSTATIC static
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define GH_NOT_PASSED SCM_UNDEFINED
|
#define GH_NOT_PASSED SCM_UNDEFINED
|
||||||
#define GH_UNSPECIFIED SCM_UNSPECIFIED
|
#define GH_UNSPECIFIED SCM_UNSPECIFIED
|
||||||
|
|
||||||
|
|
@ -121,7 +113,7 @@ typedef struct swig_type_info {
|
||||||
int dummy;
|
int dummy;
|
||||||
} swig_type_info;
|
} swig_type_info;
|
||||||
|
|
||||||
SWIGSTATIC void
|
static void
|
||||||
SWIG_Guile_RegisterTypes (swig_type_info **table,
|
SWIG_Guile_RegisterTypes (swig_type_info **table,
|
||||||
swig_type_info **init);
|
swig_type_info **init);
|
||||||
|
|
||||||
|
|
@ -131,17 +123,17 @@ SWIG_Guile_RegisterTypes (swig_type_info **table,
|
||||||
typically used to cast pointers from derived classes to base classes in
|
typically used to cast pointers from derived classes to base classes in
|
||||||
C++). */
|
C++). */
|
||||||
|
|
||||||
SWIGSTATIC void
|
static void
|
||||||
SWIG_RegisterMapping (const char *origtype, const char *newtype,
|
SWIG_RegisterMapping (const char *origtype, const char *newtype,
|
||||||
swig_converter_func cast);
|
swig_converter_func cast);
|
||||||
|
|
||||||
|
|
||||||
/* Dynamic pointer casting. Down an inheritance hierarchy */
|
/* Dynamic pointer casting. Down an inheritance hierarchy */
|
||||||
SWIGSTATIC swig_type_info *
|
static swig_type_info *
|
||||||
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr);
|
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr);
|
||||||
|
|
||||||
/* Register SWIG smobs with Guile. */
|
/* Register SWIG smobs with Guile. */
|
||||||
SWIGSTATIC void
|
static void
|
||||||
SWIG_Guile_Init();
|
SWIG_Guile_Init();
|
||||||
|
|
||||||
/* Initialization function for this SWIG module; actually renamed by a
|
/* Initialization function for this SWIG module; actually renamed by a
|
||||||
|
|
@ -150,21 +142,21 @@ SWIG_Guile_Init();
|
||||||
|
|
||||||
/* Get a pointer value from a smob. If there is a type-mismatch,
|
/* Get a pointer value from a smob. If there is a type-mismatch,
|
||||||
return nonzero; on success, return 0. */
|
return nonzero; on success, return 0. */
|
||||||
SWIGSTATIC int
|
static int
|
||||||
SWIG_Guile_GetPtr (SCM s, void **result, swig_type_info *type);
|
SWIG_Guile_GetPtr (SCM s, void **result, swig_type_info *type);
|
||||||
|
|
||||||
/* Get a pointer value from a smob. If there is a type-mismatch,
|
/* Get a pointer value from a smob. If there is a type-mismatch,
|
||||||
signal a wrong-type-arg error for the given argument number. */
|
signal a wrong-type-arg error for the given argument number. */
|
||||||
SWIGSTATIC void *
|
static void *
|
||||||
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
|
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
|
||||||
int argnum, const char *func_name);
|
int argnum, const char *func_name);
|
||||||
|
|
||||||
/* Make a smob from a pointer and typeinfo. */
|
/* Make a smob from a pointer and typeinfo. */
|
||||||
SWIGSTATIC SCM
|
static SCM
|
||||||
SWIG_Guile_MakePtr (void *ptr, swig_type_info *type);
|
SWIG_Guile_MakePtr (void *ptr, swig_type_info *type);
|
||||||
|
|
||||||
/* Get arguments from an argument list */
|
/* Get arguments from an argument list */
|
||||||
SWIGSTATIC int
|
static int
|
||||||
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
|
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
|
||||||
int reqargs, int optargs,
|
int reqargs, int optargs,
|
||||||
const char *procname);
|
const char *procname);
|
||||||
|
|
@ -175,11 +167,6 @@ typedef SCM (*swig_guile_proc)();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* guiledec.swg ends here */
|
|
||||||
|
|
||||||
#ifndef SWIG_NOINCLUDE
|
|
||||||
/* SWIG pointer structure */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -197,19 +184,21 @@ struct SwigPtrType {
|
||||||
struct SwigCast *cast; /* List of compatible types */
|
struct SwigCast *cast; /* List of compatible types */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Some variables */
|
struct swig_module_info {
|
||||||
|
int PtrMax;/* Max entries that can be held *//* (may be adjusted dynamically) */
|
||||||
static int SwigPtrMax = 64; /* Max entries that can be held */
|
int PtrN;/* Current number of entries */
|
||||||
/* (may be adjusted dynamically) */
|
int PtrSort;/* Status flag indicating sort */
|
||||||
static int SwigPtrN = 0; /* Current number of entries */
|
SwigPtrType *PtrList; /* Table containing types and
|
||||||
static int SwigPtrSort = 0; /* Status flag indicating sort */
|
|
||||||
|
|
||||||
/* Pointer table */
|
|
||||||
static SwigPtrType *SwigPtrList = 0; /* Table containing types and
|
|
||||||
equivalences; items will only
|
equivalences; items will only
|
||||||
be appended */
|
be appended */
|
||||||
static size_t *SwigPtrTbl = 0; /* Sorted indirect table; items will
|
size_t *PtrTbl;/* Sorted indirect table; items will be inserted */
|
||||||
be inserted */
|
|
||||||
|
unsigned long swig_tag;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct swig_module_info SwigModuleLocal = {64,0,0,0,0,0};
|
||||||
|
static struct swig_module_info *SwigModule = &SwigModuleLocal;
|
||||||
|
|
||||||
/* Sort comparison function */
|
/* Sort comparison function */
|
||||||
static int
|
static int
|
||||||
|
|
@ -217,34 +206,34 @@ swigsort (const void *data1, const void *data2)
|
||||||
{
|
{
|
||||||
size_t index1 = * (size_t *) data1;
|
size_t index1 = * (size_t *) data1;
|
||||||
size_t index2 = * (size_t *) data2;
|
size_t index2 = * (size_t *) data2;
|
||||||
return strcmp(SwigPtrList[index1].name, SwigPtrList[index2].name);
|
return strcmp(SwigModule->PtrList[index1].name, SwigModule->PtrList[index2].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Register a new datatype with the type-checker */
|
/* Register a new datatype with the type-checker */
|
||||||
SWIGSTATIC size_t
|
static size_t
|
||||||
SWIG_RegisterType (const char *type, const char *prettyname)
|
SWIG_RegisterType (const char *type, const char *prettyname)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Allocate the pointer table if necessary */
|
/* Allocate the pointer table if necessary */
|
||||||
if (!SwigPtrList) {
|
if (!SwigModule->PtrList) {
|
||||||
SwigPtrList = (SwigPtrType *) malloc(SwigPtrMax*sizeof(SwigPtrType));
|
SwigModule->PtrList = (SwigPtrType *) malloc(SwigModule->PtrMax*sizeof(SwigPtrType));
|
||||||
SwigPtrTbl = (size_t *) malloc(SwigPtrMax*sizeof(size_t));
|
SwigModule->PtrTbl = (size_t *) malloc(SwigModule->PtrMax*sizeof(size_t));
|
||||||
SwigPtrN = 0;
|
SwigModule->PtrN = 0;
|
||||||
}
|
}
|
||||||
/* Grow the table if necessary */
|
/* Grow the table if necessary */
|
||||||
if (SwigPtrN >= SwigPtrMax) {
|
if (SwigModule->PtrN >= SwigModule->PtrMax) {
|
||||||
SwigPtrMax = 2*SwigPtrMax;
|
SwigModule->PtrMax = 2*SwigModule->PtrMax;
|
||||||
SwigPtrList = (SwigPtrType *) realloc((char *) SwigPtrList,
|
SwigModule->PtrList = (SwigPtrType *) realloc((char *) SwigModule->PtrList,
|
||||||
SwigPtrMax*sizeof(SwigPtrType));
|
SwigModule->PtrMax*sizeof(SwigPtrType));
|
||||||
SwigPtrTbl = (size_t *) realloc((char *) SwigPtrTbl,
|
SwigModule->PtrTbl = (size_t *) realloc((char *) SwigModule->PtrTbl,
|
||||||
SwigPtrMax*sizeof(size_t));
|
SwigModule->PtrMax*sizeof(size_t));
|
||||||
}
|
}
|
||||||
/* Look up type */
|
/* Look up type */
|
||||||
for (i = 0; i < SwigPtrN; i++)
|
for (i = 0; i < SwigModule->PtrN; i++)
|
||||||
if (strcmp(SwigPtrList[i].name,type) == 0) {
|
if (strcmp(SwigModule->PtrList[i].name,type) == 0) {
|
||||||
if (prettyname!=NULL)
|
if (prettyname!=NULL)
|
||||||
SwigPtrList[i].prettyname = prettyname;
|
SwigModule->PtrList[i].prettyname = prettyname;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -253,20 +242,20 @@ SWIG_RegisterType (const char *type, const char *prettyname)
|
||||||
#if 0
|
#if 0
|
||||||
fprintf(stderr, "New type: %s\n", type);
|
fprintf(stderr, "New type: %s\n", type);
|
||||||
#endif
|
#endif
|
||||||
tag = SwigPtrTbl[SwigPtrN] = SwigPtrN;
|
tag = SwigModule->PtrTbl[SwigModule->PtrN] = SwigModule->PtrN;
|
||||||
t = &SwigPtrList[tag];
|
t = &SwigModule->PtrList[tag];
|
||||||
t->name = type;
|
t->name = type;
|
||||||
t->prettyname = prettyname;
|
t->prettyname = prettyname;
|
||||||
t->tag = SwigPtrN;
|
t->tag = SwigModule->PtrN;
|
||||||
t->cast = NULL;
|
t->cast = NULL;
|
||||||
SwigPtrN++;
|
SwigModule->PtrN++;
|
||||||
SwigPtrSort = 0;
|
SwigModule->PtrSort = 0;
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Register two data types and their mapping with the type checker. */
|
/* Register two data types and their mapping with the type checker. */
|
||||||
SWIGSTATIC void
|
static void
|
||||||
SWIG_RegisterMapping (const char *origtype, const char *newtype,
|
SWIG_RegisterMapping (const char *origtype, const char *newtype,
|
||||||
swig_converter_func cast)
|
swig_converter_func cast)
|
||||||
{
|
{
|
||||||
|
|
@ -276,7 +265,7 @@ SWIG_RegisterMapping (const char *origtype, const char *newtype,
|
||||||
size_t t1 = SWIG_RegisterType(newtype, NULL);
|
size_t t1 = SWIG_RegisterType(newtype, NULL);
|
||||||
struct SwigCast *c;
|
struct SwigCast *c;
|
||||||
/* Check for existing cast */
|
/* Check for existing cast */
|
||||||
for (c = SwigPtrList[t].cast; c && c->type!=t1; c=c->next) /* nothing */;
|
for (c = SwigModule->PtrList[t].cast; c && c->type!=t1; c=c->next) /* nothing */;
|
||||||
if (c) {
|
if (c) {
|
||||||
if (cast) c->cast = cast;
|
if (cast) c->cast = cast;
|
||||||
}
|
}
|
||||||
|
|
@ -284,8 +273,8 @@ SWIG_RegisterMapping (const char *origtype, const char *newtype,
|
||||||
c = (struct SwigCast *) malloc(sizeof(struct SwigCast));
|
c = (struct SwigCast *) malloc(sizeof(struct SwigCast));
|
||||||
c->type = t1;
|
c->type = t1;
|
||||||
c->cast = cast;
|
c->cast = cast;
|
||||||
c->next = SwigPtrList[t].cast;
|
c->next = SwigModule->PtrList[t].cast;
|
||||||
SwigPtrList[t].cast = c;
|
SwigModule->PtrList[t].cast = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -295,9 +284,9 @@ SWIG_RegisterMapping (const char *origtype, const char *newtype,
|
||||||
static void
|
static void
|
||||||
SWIG_SortTable (void)
|
SWIG_SortTable (void)
|
||||||
{
|
{
|
||||||
qsort ((void *) SwigPtrTbl, SwigPtrN, sizeof(size_t), swigsort);
|
qsort ((void *) SwigModule->PtrTbl, SwigModule->PtrN, sizeof(size_t), swigsort);
|
||||||
/* Indicate that everything is sorted */
|
/* Indicate that everything is sorted */
|
||||||
SwigPtrSort = 1;
|
SwigModule->PtrSort = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Look up pointer-type entry in table */
|
/* Look up pointer-type entry in table */
|
||||||
|
|
@ -307,16 +296,16 @@ swigcmp (const void *key, const void *data)
|
||||||
{
|
{
|
||||||
char *k = (char *) key;
|
char *k = (char *) key;
|
||||||
size_t index = *(size_t *)data;
|
size_t index = *(size_t *)data;
|
||||||
return strcmp(k, SwigPtrList[index].name);
|
return strcmp(k, SwigModule->PtrList[index].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SwigPtrType *
|
static SwigPtrType *
|
||||||
SWIG_GetPtrType (const char *_t)
|
SWIG_GetPtrType (const char *_t)
|
||||||
{
|
{
|
||||||
size_t *result;
|
size_t *result;
|
||||||
if (!SwigPtrSort) SWIG_SortTable();
|
if (!SwigModule->PtrSort) SWIG_SortTable();
|
||||||
result = (size_t *) bsearch(_t, SwigPtrTbl, SwigPtrN, sizeof(size_t), swigcmp);
|
result = (size_t *) bsearch(_t, SwigModule->PtrTbl, SwigModule->PtrN, sizeof(size_t), swigcmp);
|
||||||
if (result!=NULL) return SwigPtrList+*result;
|
if (result!=NULL) return SwigModule->PtrList+*result;
|
||||||
else return NULL;
|
else return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -331,7 +320,7 @@ SWIG_Cast (void *source, size_t source_type,
|
||||||
mapping table to figure out whether or not we can accept this
|
mapping table to figure out whether or not we can accept this
|
||||||
datatype. */
|
datatype. */
|
||||||
struct SwigCast *c;
|
struct SwigCast *c;
|
||||||
for (c = SwigPtrList[dest_type].cast;
|
for (c = SwigModule->PtrList[dest_type].cast;
|
||||||
c && c->type!=source_type; c = c->next) /* nothing */;
|
c && c->type!=source_type; c = c->next) /* nothing */;
|
||||||
if (c) {
|
if (c) {
|
||||||
/* Get pointer value. */
|
/* Get pointer value. */
|
||||||
|
|
@ -351,7 +340,7 @@ SWIG_Cast (void *source, size_t source_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dynamic pointer casting. Down an inheritance hierarchy */
|
/* Dynamic pointer casting. Down an inheritance hierarchy */
|
||||||
SWIGSTATIC swig_type_info *
|
static swig_type_info *
|
||||||
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
|
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
|
||||||
{
|
{
|
||||||
swig_type_info *lastty = ty;
|
swig_type_info *lastty = ty;
|
||||||
|
|
@ -365,18 +354,16 @@ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
|
||||||
|
|
||||||
/* Function for getting a pointer value */
|
/* Function for getting a pointer value */
|
||||||
|
|
||||||
static unsigned long swig_tag = 0;
|
static SCM
|
||||||
|
|
||||||
SWIGSTATIC SCM
|
|
||||||
SWIG_Guile_MakePtr (void *ptr, swig_type_info *type)
|
SWIG_Guile_MakePtr (void *ptr, swig_type_info *type)
|
||||||
{
|
{
|
||||||
if (ptr==NULL) return SCM_EOL;
|
if (ptr==NULL) return SCM_EOL;
|
||||||
SCM_RETURN_NEWSMOB((((unsigned long)type->tag << 16) | swig_tag),
|
SCM_RETURN_NEWSMOB((((unsigned long)type->tag << 16) | SwigModule->swig_tag),
|
||||||
ptr);
|
ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return 0 if successful. */
|
/* Return 0 if successful. */
|
||||||
SWIGSTATIC int
|
static int
|
||||||
SWIG_Guile_GetPtr(SCM s, void **result, swig_type_info *type)
|
SWIG_Guile_GetPtr(SCM s, void **result, swig_type_info *type)
|
||||||
{
|
{
|
||||||
if (SCM_NULLP(s)) {
|
if (SCM_NULLP(s)) {
|
||||||
|
|
@ -384,7 +371,7 @@ SWIG_Guile_GetPtr(SCM s, void **result, swig_type_info *type)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if (SCM_NIMP(s)
|
else if (SCM_NIMP(s)
|
||||||
&& (unsigned long) SCM_TYP16(s) == swig_tag) {
|
&& (unsigned long) SCM_TYP16(s) == SwigModule->swig_tag) {
|
||||||
if (type)
|
if (type)
|
||||||
return !SWIG_Cast((void *) SCM_CDR(s),
|
return !SWIG_Cast((void *) SCM_CDR(s),
|
||||||
(long) SCM_CAR(s) >> 16,
|
(long) SCM_CAR(s) >> 16,
|
||||||
|
|
@ -397,7 +384,7 @@ SWIG_Guile_GetPtr(SCM s, void **result, swig_type_info *type)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGSTATIC void *
|
static void *
|
||||||
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
|
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
|
||||||
int argnum, const char *func_name)
|
int argnum, const char *func_name)
|
||||||
{
|
{
|
||||||
|
|
@ -415,9 +402,9 @@ static int
|
||||||
print_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
|
print_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
|
||||||
{
|
{
|
||||||
scm_puts((char *) "#<swig ", port);
|
scm_puts((char *) "#<swig ", port);
|
||||||
if (SwigPtrList[(long) SCM_CAR(swig_smob) >> 16].prettyname != NULL)
|
if (SwigModule->PtrList[(long) SCM_CAR(swig_smob) >> 16].prettyname != NULL)
|
||||||
scm_puts((char*) SwigPtrList[(long) SCM_CAR(swig_smob) >> 16].prettyname, port);
|
scm_puts((char*) SwigModule->PtrList[(long) SCM_CAR(swig_smob) >> 16].prettyname, port);
|
||||||
else scm_puts((char*) SwigPtrList[(long) SCM_CAR(swig_smob) >> 16].name, port);
|
else scm_puts((char*) SwigModule->PtrList[(long) SCM_CAR(swig_smob) >> 16].name, port);
|
||||||
scm_puts((char *) " ", port);
|
scm_puts((char *) " ", port);
|
||||||
scm_intprint((long) SCM_CDR(swig_smob), 16, port);
|
scm_intprint((long) SCM_CDR(swig_smob), 16, port);
|
||||||
scm_puts((char *) ">", port);
|
scm_puts((char *) ">", port);
|
||||||
|
|
@ -434,18 +421,27 @@ equalp_swig (SCM A, SCM B)
|
||||||
else return SCM_BOOL_F;
|
else return SCM_BOOL_F;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGSTATIC void
|
static void
|
||||||
SWIG_Guile_Init (void)
|
SWIG_Guile_Init (void)
|
||||||
{
|
{
|
||||||
if (swig_tag == 0) {
|
SCM pointer;
|
||||||
swig_tag = scm_make_smob_type_mfpe((char *) "swig", 0, NULL, NULL,
|
|
||||||
|
pointer = gh_lookup("swig_runtime_data_type_pointer");
|
||||||
|
if (pointer == SCM_UNDEFINED) {
|
||||||
|
pointer = gh_ulong2scm((unsigned long)SwigModule);
|
||||||
|
gh_define("swig_runtime_data_type_pointer", pointer);
|
||||||
|
if (SwigModule->swig_tag == 0) {
|
||||||
|
SwigModule->swig_tag = scm_make_smob_type_mfpe((char *) "swig", 0, NULL, NULL,
|
||||||
print_swig, equalp_swig);
|
print_swig, equalp_swig);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
SwigModule = (struct swig_module_info *) gh_scm2ulong(pointer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert datatype table */
|
/* Convert datatype table */
|
||||||
|
|
||||||
SWIGSTATIC
|
static
|
||||||
void SWIG_Guile_RegisterTypes(swig_type_info **table,
|
void SWIG_Guile_RegisterTypes(swig_type_info **table,
|
||||||
swig_type_info **init)
|
swig_type_info **init)
|
||||||
{
|
{
|
||||||
|
|
@ -460,7 +456,7 @@ void SWIG_Guile_RegisterTypes(swig_type_info **table,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGSTATIC int
|
static int
|
||||||
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
|
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
|
||||||
int reqargs, int optargs,
|
int reqargs, int optargs,
|
||||||
const char *procname)
|
const char *procname)
|
||||||
|
|
@ -489,7 +485,3 @@ SWIG_Guile_GetArgs (SCM *dest, SCM rest,
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* guile.swg ends here */
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#define SWIGGUILE_SCM
|
#define SWIGGUILE_SCM
|
||||||
|
|
||||||
%runtime "precommon.swg"
|
|
||||||
%runtime "common.swg"
|
%runtime "common.swg"
|
||||||
|
|
||||||
%runtime "guile_scm_run.swg"
|
%runtime "guile_scm_run.swg"
|
||||||
|
|
|
||||||
|
|
@ -48,42 +48,7 @@ typedef struct swig_guile_clientdata {
|
||||||
(char *) FUNC_NAME, (char *) msg, \
|
(char *) FUNC_NAME, (char *) msg, \
|
||||||
SCM_EOL, SCM_BOOL_F); else
|
SCM_EOL, SCM_BOOL_F); else
|
||||||
|
|
||||||
#ifdef SWIG_NOINCLUDE
|
static char *
|
||||||
|
|
||||||
/* Interface helper function */
|
|
||||||
SWIGIMPORT(char *) SWIG_Guile_scm2newstr(SCM str, size_t *len);
|
|
||||||
|
|
||||||
/* Register SWIG smobs with Guile. */
|
|
||||||
SWIGIMPORT(void) SWIG_Guile_Init();
|
|
||||||
/* Get a pointer value from a smob. If there is a type-mismatch,
|
|
||||||
return nonzero; on success, return 0. */
|
|
||||||
SWIGIMPORT(int) SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags);
|
|
||||||
/* Get a pointer value from a smob. If there is a type-mismatch,
|
|
||||||
signal a wrong-type-arg error for the given argument number. */
|
|
||||||
SWIGIMPORT(void *) SWIG_Guile_MustGetPtr(SCM s, swig_type_info *type, int argnum, int flags, const char *func_name);
|
|
||||||
/* Make a smob from a pointer and typeinfo. */
|
|
||||||
SWIGIMPORT(SCM) SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner);
|
|
||||||
/* Get arguments from an argument list */
|
|
||||||
SWIGIMPORT(int) SWIG_Guile_GetArgs(SCM *dest, SCM rest, int reqargs, int optargs, const char *procname);
|
|
||||||
/* Make a pointer object non-collectable */
|
|
||||||
SWIGIMPORT(void)
|
|
||||||
SWIG_Guile_MarkPointerNoncollectable(SCM s);
|
|
||||||
/* Mark a pointer object destroyed */
|
|
||||||
SWIGIMPORT(void)
|
|
||||||
SWIG_Guile_MarkPointerDestroyed(SCM s);
|
|
||||||
/* Access type and address of a pointer object. */
|
|
||||||
SWIGIMPORT(unsigned long)
|
|
||||||
SWIG_Guile_PointerAddress(SCM object);
|
|
||||||
SWIGIMPORT(swig_type_info *)
|
|
||||||
SWIG_Guile_PointerType(SCM object);
|
|
||||||
SWIGIMPORT(int)
|
|
||||||
SWIG_Guile_IsPointer(SCM object);
|
|
||||||
SWIGIMPORT(int)
|
|
||||||
SWIG_Guile_IsPointerOfType(SCM object, swig_type_info *type);
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
SWIGRUNTIME(char *)
|
|
||||||
SWIG_Guile_scm2newstr(SCM str, size_t *len) {
|
SWIG_Guile_scm2newstr(SCM str, size_t *len) {
|
||||||
#define FUNC_NAME "SWIG_Guile_scm2newstr"
|
#define FUNC_NAME "SWIG_Guile_scm2newstr"
|
||||||
char *ret;
|
char *ret;
|
||||||
|
|
@ -114,7 +79,7 @@ static SCM swig_symbol = SCM_EOL;
|
||||||
( SCM_NNULLP(x) && SCM_INSTANCEP(x) && SCM_NFALSEP(scm_slot_exists_p(x, swig_symbol)) \
|
( SCM_NNULLP(x) && SCM_INSTANCEP(x) && SCM_NFALSEP(scm_slot_exists_p(x, swig_symbol)) \
|
||||||
? scm_slot_ref(x, swig_symbol) : (x) )
|
? scm_slot_ref(x, swig_symbol) : (x) )
|
||||||
|
|
||||||
SWIGRUNTIME(SCM)
|
static SCM
|
||||||
SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner)
|
SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner)
|
||||||
{
|
{
|
||||||
if (ptr == NULL)
|
if (ptr == NULL)
|
||||||
|
|
@ -143,7 +108,7 @@ SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(unsigned long)
|
static unsigned long
|
||||||
SWIG_Guile_PointerAddress(SCM object)
|
SWIG_Guile_PointerAddress(SCM object)
|
||||||
{
|
{
|
||||||
SCM smob = SWIG_Guile_GetSmob(object);
|
SCM smob = SWIG_Guile_GetSmob(object);
|
||||||
|
|
@ -156,7 +121,7 @@ SWIG_Guile_PointerAddress(SCM object)
|
||||||
else scm_wrong_type_arg("SWIG-Guile-PointerAddress", 1, object);
|
else scm_wrong_type_arg("SWIG-Guile-PointerAddress", 1, object);
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(swig_type_info *)
|
static swig_type_info *
|
||||||
SWIG_Guile_PointerType(SCM object)
|
SWIG_Guile_PointerType(SCM object)
|
||||||
{
|
{
|
||||||
SCM smob = SWIG_Guile_GetSmob(object);
|
SCM smob = SWIG_Guile_GetSmob(object);
|
||||||
|
|
@ -170,7 +135,7 @@ SWIG_Guile_PointerType(SCM object)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return 0 if successful. */
|
/* Return 0 if successful. */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
|
SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
|
||||||
{
|
{
|
||||||
swig_type_info *cast;
|
swig_type_info *cast;
|
||||||
|
|
@ -200,7 +165,7 @@ SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(void *)
|
static inline void *
|
||||||
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
|
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
|
||||||
int argnum, int flags, const char *func_name)
|
int argnum, int flags, const char *func_name)
|
||||||
{
|
{
|
||||||
|
|
@ -212,7 +177,7 @@ SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(int)
|
static inline int
|
||||||
SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type)
|
SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type)
|
||||||
{
|
{
|
||||||
void *result;
|
void *result;
|
||||||
|
|
@ -223,14 +188,14 @@ SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type)
|
||||||
else return 1;
|
else return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(int)
|
static inline int
|
||||||
SWIG_Guile_IsPointer (SCM s)
|
SWIG_Guile_IsPointer (SCM s)
|
||||||
{
|
{
|
||||||
return SWIG_Guile_IsPointerOfType (s, NULL);
|
return SWIG_Guile_IsPointerOfType (s, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mark a pointer object non-collectable */
|
/* Mark a pointer object non-collectable */
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Guile_MarkPointerNoncollectable(SCM s)
|
SWIG_Guile_MarkPointerNoncollectable(SCM s)
|
||||||
{
|
{
|
||||||
SCM smob = SWIG_Guile_GetSmob(s);
|
SCM smob = SWIG_Guile_GetSmob(s);
|
||||||
|
|
@ -243,7 +208,7 @@ SWIG_Guile_MarkPointerNoncollectable(SCM s)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mark a pointer object destroyed */
|
/* Mark a pointer object destroyed */
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Guile_MarkPointerDestroyed(SCM s)
|
SWIG_Guile_MarkPointerDestroyed(SCM s)
|
||||||
{
|
{
|
||||||
SCM smob = SWIG_Guile_GetSmob(s);
|
SCM smob = SWIG_Guile_GetSmob(s);
|
||||||
|
|
@ -339,7 +304,7 @@ ensure_smob_tag(SCM swig_module,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Guile_Init ()
|
SWIG_Guile_Init ()
|
||||||
{
|
{
|
||||||
SCM swig_module;
|
SCM swig_module;
|
||||||
|
|
@ -386,7 +351,7 @@ SWIG_Guile_Init ()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
|
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
|
||||||
int reqargs, int optargs,
|
int reqargs, int optargs,
|
||||||
const char *procname)
|
const char *procname)
|
||||||
|
|
@ -412,8 +377,6 @@ SWIG_Guile_GetArgs (SCM *dest, SCM rest,
|
||||||
return num_args_passed;
|
return num_args_passed;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
/*************************************************************** -*- c -*-
|
|
||||||
* guile/precommon.swg
|
|
||||||
*
|
|
||||||
* Rename all exported symbols from common.swg, to avoid symbol
|
|
||||||
* clashes if multiple interpreters are included
|
|
||||||
*
|
|
||||||
************************************************************************/
|
|
||||||
|
|
||||||
#define SWIG_TypeRegister SWIG_Guile_TypeRegister
|
|
||||||
#define SWIG_TypeCheck SWIG_Guile_TypeCheck
|
|
||||||
#define SWIG_TypeCast SWIG_Guile_TypeCast
|
|
||||||
#define SWIG_TypeDynamicCast SWIG_Guile_TypeDynamicCast
|
|
||||||
#define SWIG_TypeName SWIG_Guile_TypeName
|
|
||||||
#define SWIG_TypePrettyName SWIG_Guile_TypePrettyName
|
|
||||||
#define SWIG_TypeQuery SWIG_Guile_TypeQuery
|
|
||||||
#define SWIG_TypeClientData SWIG_Guile_TypeClientData
|
|
||||||
#define SWIG_PackData SWIG_Guile_PackData
|
|
||||||
#define SWIG_UnpackData SWIG_Guile_UnpackData
|
|
||||||
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
file. */
|
file. */
|
||||||
|
|
||||||
/* Include headers */
|
/* Include headers */
|
||||||
%runtime "precommon.swg"
|
|
||||||
%runtime "common.swg"
|
%runtime "common.swg"
|
||||||
%runtime "mzrun.swg"
|
%runtime "mzrun.swg"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
/*************************************************************** -*- c -*-
|
|
||||||
* mzscheme/precommon.swg
|
|
||||||
*
|
|
||||||
* Rename all exported symbols from common.swg, to avoid symbol
|
|
||||||
* clashes if multiple interpreters are included
|
|
||||||
*
|
|
||||||
************************************************************************/
|
|
||||||
|
|
||||||
#define SWIG_TypeRegister SWIG_MzScheme_TypeRegister
|
|
||||||
#define SWIG_TypeCheck SWIG_MzScheme_TypeCheck
|
|
||||||
#define SWIG_TypeCast SWIG_MzScheme_TypeCast
|
|
||||||
#define SWIG_TypeDynamicCast SWIG_MzScheme_TypeDynamicCast
|
|
||||||
#define SWIG_TypeName SWIG_MzScheme_TypeName
|
|
||||||
#define SWIG_TypePrettyName SWIG_MzScheme_TypePrettyName
|
|
||||||
#define SWIG_TypeQuery SWIG_MzScheme_TypeQuery
|
|
||||||
#define SWIG_TypeClientData SWIG_MzScheme_TypeClientData
|
|
||||||
#define SWIG_PackData SWIG_MzScheme_PackData
|
|
||||||
#define SWIG_UnpackData SWIG_MzScheme_UnpackData
|
|
||||||
|
|
||||||
|
|
@ -4,25 +4,6 @@
|
||||||
* Perl 5 configuration file
|
* Perl 5 configuration file
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
%runtime "precommon.swg"
|
|
||||||
%insert(runtime) %{
|
|
||||||
|
|
||||||
#ifndef SWIG_ALLOW_RUNTIME
|
|
||||||
/* -----------------------------------------------------------------------------
|
|
||||||
* Disable runtime library use, everything is used as static
|
|
||||||
* ----------------------------------------------------------------------------- */
|
|
||||||
#ifndef SWIG_DISABLE_RUNTIME
|
|
||||||
#define SWIG_DISABLE_RUNTIME
|
|
||||||
#endif
|
|
||||||
#ifdef SWIG_GLOBAL
|
|
||||||
#undef SWIG_GLOBAL
|
|
||||||
#endif
|
|
||||||
#ifdef SWIG_NOINCLUDE
|
|
||||||
#undef SWIG_NOINCLUDE
|
|
||||||
#endif
|
|
||||||
#endif /* SWIG_ALLOW_RUNTIME */
|
|
||||||
|
|
||||||
%}
|
|
||||||
%runtime "common.swg" // common type checking code
|
%runtime "common.swg" // common type checking code
|
||||||
%runtime "perlrun.swg" // Perl runtime functions
|
%runtime "perlrun.swg" // Perl runtime functions
|
||||||
%runtime "noembed.h" // undefine Perl5 macros
|
%runtime "noembed.h" // undefine Perl5 macros
|
||||||
|
|
@ -602,9 +583,7 @@ XS(SWIG_init) {
|
||||||
int i;
|
int i;
|
||||||
static int _init = 0;
|
static int _init = 0;
|
||||||
if (!_init) {
|
if (!_init) {
|
||||||
#ifdef SWIG_DISABLE_RUNTIME
|
|
||||||
SWIG_Perl_LookupTypePointer();
|
SWIG_Perl_LookupTypePointer();
|
||||||
#endif
|
|
||||||
for (i = 0; swig_types_initial[i]; i++) {
|
for (i = 0; swig_types_initial[i]; i++) {
|
||||||
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -185,19 +185,7 @@ static void SWIG_Perl_LookupTypePointer() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SWIG_NOINCLUDE
|
static swig_type_info *
|
||||||
|
|
||||||
SWIGIMPORT(int) SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *, void **, swig_type_info *, int flags);
|
|
||||||
SWIGIMPORT(void) SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *, void *, swig_type_info *, int flags);
|
|
||||||
SWIGIMPORT(SV *) SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *, swig_type_info *, int flags);
|
|
||||||
SWIGIMPORT(void) SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *, void *, int, swig_type_info *);
|
|
||||||
SWIGIMPORT(int) SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *, void *, int, swig_type_info *, int flags);
|
|
||||||
SWIGIMPORT(swig_type_info *) SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty);
|
|
||||||
SWIGIMPORT(SV *) SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT char *);
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
SWIGRUNTIME(swig_type_info *)
|
|
||||||
SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty) {
|
SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty) {
|
||||||
swig_type_info *s;
|
swig_type_info *s;
|
||||||
if (!ty) return 0; /* Void pointer */
|
if (!ty) return 0; /* Void pointer */
|
||||||
|
|
@ -224,7 +212,7 @@ SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty) {
|
||||||
|
|
||||||
/* Function for getting a pointer value */
|
/* Function for getting a pointer value */
|
||||||
|
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
|
SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
|
||||||
swig_type_info *tc;
|
swig_type_info *tc;
|
||||||
void *voidptr = (void *)0;
|
void *voidptr = (void *)0;
|
||||||
|
|
@ -285,7 +273,7 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
|
SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
|
||||||
if (ptr && (flags & SWIG_SHADOW)) {
|
if (ptr && (flags & SWIG_SHADOW)) {
|
||||||
SV *self;
|
SV *self;
|
||||||
|
|
@ -314,14 +302,14 @@ SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(SV *)
|
static inline SV *
|
||||||
SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
|
SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
|
||||||
SV *result = sv_newmortal();
|
SV *result = sv_newmortal();
|
||||||
SWIG_MakePtr(result, ptr, t, flags);
|
SWIG_MakePtr(result, ptr, t, flags);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
|
SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
|
||||||
char result[1024];
|
char result[1024];
|
||||||
char *r = result;
|
char *r = result;
|
||||||
|
|
@ -333,7 +321,7 @@ SWIGRUNTIME(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert a packed value value */
|
/* Convert a packed value value */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
|
SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
|
||||||
swig_type_info *tc;
|
swig_type_info *tc;
|
||||||
char *c = 0;
|
char *c = 0;
|
||||||
|
|
@ -351,17 +339,17 @@ SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(void)
|
static inline void
|
||||||
SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT const char *error) {
|
SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT const char *error) {
|
||||||
if (error) sv_setpv(perl_get_sv("@", TRUE), error);
|
if (error) sv_setpv(perl_get_sv("@", TRUE), error);
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(void)
|
static inline void
|
||||||
SWIG_Perl_SetErrorSV(SWIG_MAYBE_PERL_OBJECT SV *error) {
|
SWIG_Perl_SetErrorSV(SWIG_MAYBE_PERL_OBJECT SV *error) {
|
||||||
if (error) sv_setsv(perl_get_sv("@", TRUE), error);
|
if (error) sv_setsv(perl_get_sv("@", TRUE), error);
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(void)
|
static inline void
|
||||||
SWIG_Perl_SetErrorf(const char *fmt, ...) {
|
SWIG_Perl_SetErrorf(const char *fmt, ...) {
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
|
|
@ -369,8 +357,6 @@ SWIG_Perl_SetErrorf(const char *fmt, ...) {
|
||||||
va_end(args);
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Macros for low-level exception handling */
|
/* Macros for low-level exception handling */
|
||||||
#define SWIG_fail goto fail
|
#define SWIG_fail goto fail
|
||||||
#define SWIG_croak(x) { SWIG_SetError(x); goto fail; }
|
#define SWIG_croak(x) { SWIG_SetError(x); goto fail; }
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
/*************************************************************** -*- c -*-
|
|
||||||
* perl5/precommon.swg
|
|
||||||
*
|
|
||||||
* Rename all exported symbols from common.swg, to avoid symbol
|
|
||||||
* clashes if multiple interpreters are included
|
|
||||||
*
|
|
||||||
************************************************************************/
|
|
||||||
|
|
||||||
#define SWIG_TypeRegister SWIG_Perl_TypeRegister
|
|
||||||
#define SWIG_TypeCheck SWIG_Perl_TypeCheck
|
|
||||||
#define SWIG_TypeCast SWIG_Perl_TypeCast
|
|
||||||
#define SWIG_TypeDynamicCast SWIG_Perl_TypeDynamicCast
|
|
||||||
#define SWIG_TypeName SWIG_Perl_TypeName
|
|
||||||
#define SWIG_TypePrettyName SWIG_Perl_TypePrettyName
|
|
||||||
#define SWIG_TypeQuery SWIG_Perl_TypeQuery
|
|
||||||
#define SWIG_TypeClientData SWIG_Perl_TypeClientData
|
|
||||||
#define SWIG_PackData SWIG_Perl_PackData
|
|
||||||
#define SWIG_UnpackData SWIG_Perl_UnpackData
|
|
||||||
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
%runtime "precommon.swg"
|
|
||||||
%runtime "common.swg" // common type checking code
|
%runtime "common.swg" // common type checking code
|
||||||
%runtime "php4run.swg" // Php4 runtime functions
|
%runtime "php4run.swg" // Php4 runtime functions
|
||||||
%include "utils.i" // building blocks
|
%include "utils.i" // building blocks
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ static ZEND_RSRC_DTOR_FUNC(SWIG_landfill) {};
|
||||||
|
|
||||||
/* This one makes old swig style string pointers but the php module doesn't
|
/* This one makes old swig style string pointers but the php module doesn't
|
||||||
use these any more. This is just left here for old times sake and may go */
|
use these any more. This is just left here for old times sake and may go */
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_MakePtr(char *c, void *ptr, swig_type_info *ty) {
|
SWIG_MakePtr(char *c, void *ptr, swig_type_info *ty) {
|
||||||
static char hex[17] = "0123456789abcdef";
|
static char hex[17] = "0123456789abcdef";
|
||||||
unsigned long p, s;
|
unsigned long p, s;
|
||||||
|
|
@ -72,7 +72,7 @@ SWIG_MakePtr(char *c, void *ptr, swig_type_info *ty) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_SetPointerChar(char **c, void *ptr, swig_type_info *type) {
|
SWIG_SetPointerChar(char **c, void *ptr, swig_type_info *type) {
|
||||||
char data[512];
|
char data[512];
|
||||||
|
|
||||||
|
|
@ -82,7 +82,7 @@ SWIG_SetPointerChar(char **c, void *ptr, swig_type_info *type) {
|
||||||
|
|
||||||
#define SWIG_SetPointerZval(a,b,c,d) SWIG_ZTS_SetPointerZval(a,b,c,d, SWIG_module_entry TSRMLS_CC)
|
#define SWIG_SetPointerZval(a,b,c,d) SWIG_ZTS_SetPointerZval(a,b,c,d, SWIG_module_entry TSRMLS_CC)
|
||||||
|
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_ZTS_SetPointerZval(zval *z, void *ptr, swig_type_info *type, int newobject, zend_module_entry* module_entry TSRMLS_DC) {
|
SWIG_ZTS_SetPointerZval(zval *z, void *ptr, swig_type_info *type, int newobject, zend_module_entry* module_entry TSRMLS_DC) {
|
||||||
swig_object_wrapper *value=NULL;
|
swig_object_wrapper *value=NULL;
|
||||||
/* No need to call SWIG_MakePtr here! */
|
/* No need to call SWIG_MakePtr here! */
|
||||||
|
|
@ -102,7 +102,7 @@ SWIG_ZTS_SetPointerZval(zval *z, void *ptr, swig_type_info *type, int newobject,
|
||||||
/* This old-style routine converts an old string-pointer c into a real pointer
|
/* This old-style routine converts an old string-pointer c into a real pointer
|
||||||
ptr calling making appropriate casting functions according to ty
|
ptr calling making appropriate casting functions according to ty
|
||||||
We don't use this any more */
|
We don't use this any more */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_ConvertPtr_(char *c, void **ptr, swig_type_info *ty) {
|
SWIG_ConvertPtr_(char *c, void **ptr, swig_type_info *ty) {
|
||||||
register int d;
|
register int d;
|
||||||
unsigned long p;
|
unsigned long p;
|
||||||
|
|
@ -159,7 +159,7 @@ type_error:
|
||||||
SWIG_ZTS_ConvertResourcePtr which gets the type name from the resource
|
SWIG_ZTS_ConvertResourcePtr which gets the type name from the resource
|
||||||
and the registered zend destructors for which we have one per type each
|
and the registered zend destructors for which we have one per type each
|
||||||
with the type name hard wired in. */
|
with the type name hard wired in. */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_ZTS_ConvertResourceData(void * p, int type, const char *type_name, void **ptr, swig_type_info *ty TSRMLS_DC) {
|
SWIG_ZTS_ConvertResourceData(void * p, int type, const char *type_name, void **ptr, swig_type_info *ty TSRMLS_DC) {
|
||||||
swig_type_info *tc;
|
swig_type_info *tc;
|
||||||
|
|
||||||
|
|
@ -184,7 +184,7 @@ SWIG_ZTS_ConvertResourceData(void * p, int type, const char *type_name, void **p
|
||||||
/* This function fills ptr with a pointer of type ty by extracting the pointer
|
/* This function fills ptr with a pointer of type ty by extracting the pointer
|
||||||
and type info from the resource in z. z must be a resource
|
and type info from the resource in z. z must be a resource
|
||||||
It uses SWIG_ZTS_ConvertResourceData to do the real work. */
|
It uses SWIG_ZTS_ConvertResourceData to do the real work. */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_ZTS_ConvertResourcePtr(zval *z, void **ptr, swig_type_info *ty TSRMLS_DC) {
|
SWIG_ZTS_ConvertResourcePtr(zval *z, void **ptr, swig_type_info *ty TSRMLS_DC) {
|
||||||
swig_object_wrapper *value;
|
swig_object_wrapper *value;
|
||||||
void *p;
|
void *p;
|
||||||
|
|
@ -208,7 +208,7 @@ SWIG_ZTS_ConvertResourcePtr(zval *z, void **ptr, swig_type_info *ty TSRMLS_DC) {
|
||||||
/* We allow passing of a STRING or RESOURCE pointing to the object
|
/* We allow passing of a STRING or RESOURCE pointing to the object
|
||||||
or an OBJECT whose _cPtr is a string or resource pointing to the object
|
or an OBJECT whose _cPtr is a string or resource pointing to the object
|
||||||
STRING pointers are very depracated */
|
STRING pointers are very depracated */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_ZTS_ConvertPtr(zval *z, void **ptr, swig_type_info *ty TSRMLS_DC) {
|
SWIG_ZTS_ConvertPtr(zval *z, void **ptr, swig_type_info *ty TSRMLS_DC) {
|
||||||
char *c;
|
char *c;
|
||||||
zval *val;
|
zval *val;
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
/*************************************************************** -*- c -*-
|
|
||||||
* php4/precommon.swg
|
|
||||||
*
|
|
||||||
* Rename all exported symbols from common.swg, to avoid symbol
|
|
||||||
* clashes if multiple interpreters are included
|
|
||||||
*
|
|
||||||
************************************************************************/
|
|
||||||
|
|
||||||
#define SWIG_TypeRegister SWIG_PHP4_TypeRegister
|
|
||||||
#define SWIG_TypeCheck SWIG_PHP4_TypeCheck
|
|
||||||
#define SWIG_TypeCast SWIG_PHP4_TypeCast
|
|
||||||
#define SWIG_TypeDynamicCast SWIG_PHP4_TypeDynamicCast
|
|
||||||
#define SWIG_TypeName SWIG_PHP4_TypeName
|
|
||||||
#define SWIG_TypePrettyName SWIG_PHP4_TypePrettyName
|
|
||||||
#define SWIG_TypeQuery SWIG_PHP4_TypeQuery
|
|
||||||
#define SWIG_TypeClientData SWIG_PHP4_TypeClientData
|
|
||||||
#define SWIG_PackData SWIG_PHP4_PackData
|
|
||||||
#define SWIG_UnpackData SWIG_PHP4_UnpackData
|
|
||||||
|
|
||||||
|
|
@ -30,15 +30,8 @@ typedef struct swig_object_wrapper {
|
||||||
#define SWIG_ConvertPtr SWIG_Pike_ConvertPtr
|
#define SWIG_ConvertPtr SWIG_Pike_ConvertPtr
|
||||||
#define SWIG_NewPointerObj SWIG_Pike_NewPointerObj
|
#define SWIG_NewPointerObj SWIG_Pike_NewPointerObj
|
||||||
|
|
||||||
#ifdef SWIG_NOINCLUDE
|
|
||||||
|
|
||||||
SWIGEXPORT(int) SWIG_Pike_ConvertPtr(struct object *, void **, swig_type_info *, int);
|
|
||||||
SWIGEXPORT(struct object *) SWIG_Pike_NewPointerObj(void *, swig_type_info *, int);
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
/* Convert a pointer value */
|
/* Convert a pointer value */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Pike_ConvertPtr(struct object *obj, void **ptr, swig_type_info *ty, int flags) {
|
SWIG_Pike_ConvertPtr(struct object *obj, void **ptr, swig_type_info *ty, int flags) {
|
||||||
char *storage;
|
char *storage;
|
||||||
struct program *pr;
|
struct program *pr;
|
||||||
|
|
@ -54,9 +47,7 @@ SWIG_Pike_ConvertPtr(struct object *obj, void **ptr, swig_type_info *ty, int fla
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a new pointer object */
|
/* Create a new pointer object */
|
||||||
SWIGRUNTIME(struct object *)
|
static struct object *
|
||||||
SWIG_Pike_NewPointerObj(void *ptr, swig_type_info *type, int own) {
|
SWIG_Pike_NewPointerObj(void *ptr, swig_type_info *type, int own) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
/*************************************************************** -*- c -*-
|
|
||||||
* pike/precommon.swg
|
|
||||||
*
|
|
||||||
* Rename all exported symbols from common.swg, to avoid symbol
|
|
||||||
* clashes if multiple interpreters are included
|
|
||||||
*
|
|
||||||
************************************************************************/
|
|
||||||
|
|
||||||
#define SWIG_TypeRegister SWIG_Pike_TypeRegister
|
|
||||||
#define SWIG_TypeCheck SWIG_Pike_TypeCheck
|
|
||||||
#define SWIG_TypeCast SWIG_Pike_TypeCast
|
|
||||||
#define SWIG_TypeDynamicCast SWIG_Pike_TypeDynamicCast
|
|
||||||
#define SWIG_TypeName SWIG_Pike_TypeName
|
|
||||||
#define SWIG_TypePrettyName SWIG_Pike_TypePrettyName
|
|
||||||
#define SWIG_TypeQuery SWIG_Pike_TypeQuery
|
|
||||||
#define SWIG_TypeClientData SWIG_Pike_TypeClientData
|
|
||||||
#define SWIG_PackData SWIG_Pike_PackData
|
|
||||||
#define SWIG_UnpackData SWIG_Pike_UnpackData
|
|
||||||
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
/*************************************************************** -*- c -*-
|
|
||||||
* python/precommon.swg
|
|
||||||
*
|
|
||||||
* Rename all exported symbols from common.swg, to avoid symbol
|
|
||||||
* clashes if multiple interpreters are included
|
|
||||||
*
|
|
||||||
************************************************************************/
|
|
||||||
|
|
||||||
#define SWIG_TypeRegister SWIG_Python_TypeRegister
|
|
||||||
#define SWIG_TypeCheck SWIG_Python_TypeCheck
|
|
||||||
#define SWIG_TypeCast SWIG_Python_TypeCast
|
|
||||||
#define SWIG_TypeDynamicCast SWIG_Python_TypeDynamicCast
|
|
||||||
#define SWIG_TypeName SWIG_Python_TypeName
|
|
||||||
#define SWIG_TypePrettyName SWIG_Python_TypePrettyName
|
|
||||||
#define SWIG_TypeQuery SWIG_Python_TypeQuery
|
|
||||||
#define SWIG_TypeClientData SWIG_Python_TypeClientData
|
|
||||||
#define SWIG_PackData SWIG_Python_PackData
|
|
||||||
#define SWIG_UnpackData SWIG_Python_UnpackData
|
|
||||||
|
|
||||||
|
|
@ -22,9 +22,7 @@ SWIGEXPORT(void) SWIG_init(void) {
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
|
|
||||||
if (!typeinit) {
|
if (!typeinit) {
|
||||||
#ifdef SWIG_DISABLE_RUNTIME
|
|
||||||
SWIG_Python_LookupTypePointer(&swig_type_list_handle);
|
SWIG_Python_LookupTypePointer(&swig_type_list_handle);
|
||||||
#endif
|
|
||||||
for (i = 0; swig_types_initial[i]; i++) {
|
for (i = 0; swig_types_initial[i]; i++) {
|
||||||
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,37 +12,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef SWIG_NOINCLUDE
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
|
||||||
* SWIG extern declarations
|
|
||||||
* ----------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
|
|
||||||
SWIGIMPORT(int) SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int);
|
|
||||||
SWIGIMPORT(PyObject *) SWIG_Python_NewPointerObj(void *, swig_type_info *,int own);
|
|
||||||
SWIGIMPORT(void *) SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int);
|
|
||||||
SWIGIMPORT(PyObject *) SWIG_Python_newvarlink(void);
|
|
||||||
SWIGIMPORT(void) SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
|
|
||||||
SWIGIMPORT(int) SWIG_Python_ConvertPacked(PyObject *, void *, size_t sz, swig_type_info *, int);
|
|
||||||
SWIGIMPORT(PyObject *) SWIG_Python_NewPackedObj(void *, size_t sz, swig_type_info *);
|
|
||||||
SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]);
|
|
||||||
SWIGIMPORT(char *) SWIG_Python_PointerStr(char *buff, void *ptr, const char *name, size_t bsz);
|
|
||||||
SWIGIMPORT(void) SWIG_Python_FixMethods(PyMethodDef *methods,
|
|
||||||
swig_const_info *const_table,
|
|
||||||
swig_type_info **types,
|
|
||||||
swig_type_info **types_initial);
|
|
||||||
|
|
||||||
SWIGIMPORT(int) SWIG_Python_AddErrMesg(const char* mesg, int infront);
|
|
||||||
SWIGIMPORT(int) SWIG_Python_ArgFail(int argnum);
|
|
||||||
SWIGIMPORT(void) SWIG_Python_TypeError(const char *type, PyObject *obj);
|
|
||||||
SWIGIMPORT(void) SWIG_Python_NullRef(const char *type);
|
|
||||||
|
|
||||||
SWIGRUNTIME(void) SWIG_Python_LookupTypePointer(swig_type_info ***type_list_handle);
|
|
||||||
|
|
||||||
#else /* SWIG_NOINCLUDE */
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* global variable support code.
|
* global variable support code.
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
@ -166,7 +135,7 @@ static PyTypeObject varlinktype = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Create a variable linking object for use later */
|
/* Create a variable linking object for use later */
|
||||||
SWIGRUNTIME(PyObject *)
|
static PyObject *
|
||||||
SWIG_Python_newvarlink(void) {
|
SWIG_Python_newvarlink(void) {
|
||||||
swig_varlinkobject *result = 0;
|
swig_varlinkobject *result = 0;
|
||||||
result = PyMem_NEW(swig_varlinkobject,1);
|
result = PyMem_NEW(swig_varlinkobject,1);
|
||||||
|
|
@ -178,7 +147,7 @@ SWIG_Python_newvarlink(void) {
|
||||||
return ((PyObject*) result);
|
return ((PyObject*) result);
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
|
SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
|
||||||
swig_varlinkobject *v;
|
swig_varlinkobject *v;
|
||||||
swig_globalvar *gv;
|
swig_globalvar *gv;
|
||||||
|
|
@ -196,7 +165,7 @@ SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int
|
||||||
* errors manipulation
|
* errors manipulation
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Python_TypeError(const char *type, PyObject *obj)
|
SWIG_Python_TypeError(const char *type, PyObject *obj)
|
||||||
{
|
{
|
||||||
const char *otype = (obj ? obj->ob_type->tp_name : 0);
|
const char *otype = (obj ? obj->ob_type->tp_name : 0);
|
||||||
|
|
@ -212,7 +181,7 @@ SWIG_Python_TypeError(const char *type, PyObject *obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(void)
|
static inline void
|
||||||
SWIG_Python_NullRef(const char *type)
|
SWIG_Python_NullRef(const char *type)
|
||||||
{
|
{
|
||||||
if (type) {
|
if (type) {
|
||||||
|
|
@ -222,7 +191,7 @@ SWIG_Python_NullRef(const char *type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Python_AddErrMesg(const char* mesg, int infront)
|
SWIG_Python_AddErrMesg(const char* mesg, int infront)
|
||||||
{
|
{
|
||||||
if (PyErr_Occurred()) {
|
if (PyErr_Occurred()) {
|
||||||
|
|
@ -247,7 +216,7 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Python_ArgFail(int argnum)
|
SWIG_Python_ArgFail(int argnum)
|
||||||
{
|
{
|
||||||
if (PyErr_Occurred()) {
|
if (PyErr_Occurred()) {
|
||||||
|
|
@ -266,7 +235,7 @@ SWIG_Python_ArgFail(int argnum)
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* Convert a pointer value */
|
/* Convert a pointer value */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
|
SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
|
||||||
swig_type_info *tc;
|
swig_type_info *tc;
|
||||||
char *c = 0;
|
char *c = 0;
|
||||||
|
|
@ -376,7 +345,7 @@ type_error:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert a pointer value, signal an exception on a type mismatch */
|
/* Convert a pointer value, signal an exception on a type mismatch */
|
||||||
SWIGRUNTIME(void *)
|
static inline void *
|
||||||
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
|
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
|
||||||
void *result;
|
void *result;
|
||||||
if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
|
if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
|
||||||
|
|
@ -390,7 +359,7 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert a packed value value */
|
/* Convert a packed value value */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty, int flags) {
|
SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty, int flags) {
|
||||||
swig_type_info *tc;
|
swig_type_info *tc;
|
||||||
char *c = 0;
|
char *c = 0;
|
||||||
|
|
@ -420,7 +389,7 @@ type_error:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a new pointer string */
|
/* Create a new pointer string */
|
||||||
SWIGRUNTIME(char *)
|
static char *
|
||||||
SWIG_Python_PointerStr(char *buff, void *ptr, const char *name, size_t bsz) {
|
SWIG_Python_PointerStr(char *buff, void *ptr, const char *name, size_t bsz) {
|
||||||
char *r = buff;
|
char *r = buff;
|
||||||
if ((2*sizeof(void *) + 2) > bsz) return 0;
|
if ((2*sizeof(void *) + 2) > bsz) return 0;
|
||||||
|
|
@ -433,7 +402,7 @@ SWIG_Python_PointerStr(char *buff, void *ptr, const char *name, size_t bsz) {
|
||||||
|
|
||||||
|
|
||||||
/* Create a new pointer object */
|
/* Create a new pointer object */
|
||||||
SWIGRUNTIME(PyObject *)
|
static PyObject *
|
||||||
SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
|
SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
|
||||||
PyObject *robj;
|
PyObject *robj;
|
||||||
if (!ptr) {
|
if (!ptr) {
|
||||||
|
|
@ -466,7 +435,7 @@ SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
|
||||||
return robj;
|
return robj;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(PyObject *)
|
static PyObject *
|
||||||
SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
|
SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
|
||||||
char result[1024];
|
char result[1024];
|
||||||
char *r = result;
|
char *r = result;
|
||||||
|
|
@ -483,7 +452,7 @@ SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* Install Constants */
|
/* Install Constants */
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
|
SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
|
||||||
int i;
|
int i;
|
||||||
PyObject *obj;
|
PyObject *obj;
|
||||||
|
|
@ -521,7 +490,7 @@ SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fix SwigMethods to carry the callback ptrs when needed */
|
/* Fix SwigMethods to carry the callback ptrs when needed */
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Python_FixMethods(PyMethodDef *methods,
|
SWIG_Python_FixMethods(PyMethodDef *methods,
|
||||||
swig_const_info *const_table,
|
swig_const_info *const_table,
|
||||||
swig_type_info **types,
|
swig_type_info **types,
|
||||||
|
|
@ -563,7 +532,7 @@ SWIG_Python_FixMethods(PyMethodDef *methods,
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* Lookup type pointer
|
* Lookup type pointer
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Python_LookupTypePointer(swig_type_info ***type_list_handle) {
|
SWIG_Python_LookupTypePointer(swig_type_info ***type_list_handle) {
|
||||||
PyObject *module, *pointer;
|
PyObject *module, *pointer;
|
||||||
void *type_pointer;
|
void *type_pointer;
|
||||||
|
|
@ -583,9 +552,6 @@ SWIG_Python_LookupTypePointer(swig_type_info ***type_list_handle) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SWIG_NOINCLUDE */
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -4,25 +4,6 @@
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%insert(runtime) "precommon.swg";
|
|
||||||
%insert(runtime) %{
|
|
||||||
|
|
||||||
#ifndef SWIG_ALLOW_RUNTIME
|
|
||||||
/* -----------------------------------------------------------------------------
|
|
||||||
* Disable runtime library use, everything is used as static
|
|
||||||
* ----------------------------------------------------------------------------- */
|
|
||||||
#ifndef SWIG_DISABLE_RUNTIME
|
|
||||||
#define SWIG_DISABLE_RUNTIME
|
|
||||||
#endif
|
|
||||||
#ifdef SWIG_GLOBAL
|
|
||||||
#undef SWIG_GLOBAL
|
|
||||||
#endif
|
|
||||||
#ifdef SWIG_NOINCLUDE
|
|
||||||
#undef SWIG_NOINCLUDE
|
|
||||||
#endif
|
|
||||||
#endif /* SWIG_ALLOW_RUNTIME */
|
|
||||||
|
|
||||||
%}
|
|
||||||
%insert(runtime) "common.swg"; /* Common type-checking code */
|
%insert(runtime) "common.swg"; /* Common type-checking code */
|
||||||
%insert(runtime) "pyapi.swg"; /* SWIG/Pyton API */
|
%insert(runtime) "pyapi.swg"; /* SWIG/Pyton API */
|
||||||
%insert(runtime) "pyrun.swg"; /* Python run-time code */
|
%insert(runtime) "pyrun.swg"; /* Python run-time code */
|
||||||
|
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
/*************************************************************** -*- c -*-
|
|
||||||
* ruby/precommon.swg
|
|
||||||
*
|
|
||||||
* Rename all exported symbols from common.swg, to avoid symbol
|
|
||||||
* clashes if multiple interpreters are included
|
|
||||||
*
|
|
||||||
************************************************************************/
|
|
||||||
|
|
||||||
#define SWIG_TypeRegister SWIG_Ruby_TypeRegister
|
|
||||||
#define SWIG_TypeCheck SWIG_Ruby_TypeCheck
|
|
||||||
#define SWIG_TypeCast SWIG_Ruby_TypeCast
|
|
||||||
#define SWIG_TypeDynamicCast SWIG_Ruby_TypeDynamicCast
|
|
||||||
#define SWIG_TypeName SWIG_Ruby_TypeName
|
|
||||||
#define SWIG_TypePrettyName SWIG_Ruby_TypePrettyName
|
|
||||||
#define SWIG_TypeQuery SWIG_Ruby_TypeQuery
|
|
||||||
#define SWIG_TypeClientData SWIG_Ruby_TypeClientData
|
|
||||||
#define SWIG_PackData SWIG_Ruby_PackData
|
|
||||||
#define SWIG_UnpackData SWIG_Ruby_UnpackData
|
|
||||||
|
|
||||||
/* Also rename all exported symbols from rubydef.swig */
|
|
||||||
|
|
||||||
/* Common SWIG API */
|
|
||||||
#define SWIG_ConvertPtr(obj, pp, type, flags) \
|
|
||||||
SWIG_Ruby_ConvertPtr(obj, pp, type, flags)
|
|
||||||
#define SWIG_NewPointerObj(p, type, flags) \
|
|
||||||
SWIG_Ruby_NewPointerObj(p, type, flags)
|
|
||||||
#define SWIG_MustGetPtr(p, type, argnum, flags) \
|
|
||||||
SWIG_Ruby_MustGetPtr(p, type, argnum, flags)
|
|
||||||
|
|
||||||
/* Ruby-specific SWIG API */
|
|
||||||
|
|
||||||
#define SWIG_InitRuntime() \
|
|
||||||
SWIG_Ruby_InitRuntime()
|
|
||||||
#define SWIG_define_class(ty) \
|
|
||||||
SWIG_Ruby_define_class(ty)
|
|
||||||
#define SWIG_NewClassInstance(value, ty) \
|
|
||||||
SWIG_Ruby_NewClassInstance(value, ty)
|
|
||||||
#define SWIG_MangleStr(value) \
|
|
||||||
SWIG_Ruby_MangleStr(value)
|
|
||||||
#define SWIG_CheckConvert(value, ty) \
|
|
||||||
SWIG_Ruby_CheckConvert(value, ty)
|
|
||||||
#define SWIG_NewPackedObj(ptr, sz, ty) \
|
|
||||||
SWIG_Ruby_NewPackedObj(ptr, sz, ty)
|
|
||||||
#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
|
|
||||||
SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
|
|
||||||
|
|
||||||
|
|
@ -5,38 +5,8 @@
|
||||||
* ---------------------------------------------------------------------- */
|
* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
%runtime "rubyhead.swg"
|
%runtime "rubyhead.swg"
|
||||||
%runtime "precommon.swg"
|
|
||||||
%insert(runtime) %{
|
|
||||||
|
|
||||||
#ifndef SWIG_ALLOW_RUNTIME
|
|
||||||
/* -----------------------------------------------------------------------------
|
|
||||||
* Disable runtime library use, everything is used as static
|
|
||||||
* ----------------------------------------------------------------------------- */
|
|
||||||
#ifndef SWIG_DISABLE_RUNTIME
|
|
||||||
#define SWIG_DISABLE_RUNTIME
|
|
||||||
#endif
|
|
||||||
#ifdef SWIG_GLOBAL
|
|
||||||
#undef SWIG_GLOBAL
|
|
||||||
#endif
|
|
||||||
#ifdef SWIG_NOINCLUDE
|
|
||||||
#undef SWIG_NOINCLUDE
|
|
||||||
#endif
|
|
||||||
#endif /* SWIG_ALLOW_RUNTIME */
|
|
||||||
|
|
||||||
%}
|
|
||||||
%runtime "common.swg"
|
%runtime "common.swg"
|
||||||
|
|
||||||
%insert(runtime) %{
|
|
||||||
#ifdef SWIG_NOINCLUDE
|
|
||||||
%}
|
|
||||||
%runtime "rubydec.swg"
|
|
||||||
%insert(runtime) %{
|
|
||||||
#else
|
|
||||||
%}
|
|
||||||
%runtime "rubydef.swg"
|
%runtime "rubydef.swg"
|
||||||
%insert(runtime) %{
|
|
||||||
#endif
|
|
||||||
%}
|
|
||||||
|
|
||||||
#define %alias %feature("alias")
|
#define %alias %feature("alias")
|
||||||
#define %freefunc %feature("freefunc")
|
#define %freefunc %feature("freefunc")
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
/* rubydec.swg -*- c -*- */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SWIGIMPORT(void) SWIG_Ruby_InitRuntime(void);
|
|
||||||
SWIGIMPORT(void) SWIG_Ruby_define_class(swig_type_info *);
|
|
||||||
SWIGIMPORT(VALUE) SWIG_Ruby_NewPointerObj(void *, swig_type_info *, int);
|
|
||||||
SWIGIMPORT(VALUE) SWIG_Ruby_NewClassInstance(VALUE, swig_type_info *);
|
|
||||||
SWIGIMPORT(char *) SWIG_Ruby_MangleStr(VALUE);
|
|
||||||
SWIGIMPORT(int) SWIG_Ruby_ConvertPtr(VALUE, void**, swig_type_info *, int);
|
|
||||||
SWIGIMPORT(void *) SWIG_Ruby_MustGetPtr(VALUE, swig_type_info *, int, int);
|
|
||||||
SWIGIMPORT(int) SWIG_Ruby_CheckConvert(VALUE, swig_type_info *);
|
|
||||||
SWIGIMPORT(VALUE) SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type);
|
|
||||||
SWIGIMPORT(void) SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty, int flags);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,3 +1,28 @@
|
||||||
|
/* Common SWIG API */
|
||||||
|
#define SWIG_ConvertPtr(obj, pp, type, flags) \
|
||||||
|
SWIG_Ruby_ConvertPtr(obj, pp, type, flags)
|
||||||
|
#define SWIG_NewPointerObj(p, type, flags) \
|
||||||
|
SWIG_Ruby_NewPointerObj(p, type, flags)
|
||||||
|
#define SWIG_MustGetPtr(p, type, argnum, flags) \
|
||||||
|
SWIG_Ruby_MustGetPtr(p, type, argnum, flags)
|
||||||
|
|
||||||
|
/* Ruby-specific SWIG API */
|
||||||
|
|
||||||
|
#define SWIG_InitRuntime() \
|
||||||
|
SWIG_Ruby_InitRuntime()
|
||||||
|
#define SWIG_define_class(ty) \
|
||||||
|
SWIG_Ruby_define_class(ty)
|
||||||
|
#define SWIG_NewClassInstance(value, ty) \
|
||||||
|
SWIG_Ruby_NewClassInstance(value, ty)
|
||||||
|
#define SWIG_MangleStr(value) \
|
||||||
|
SWIG_Ruby_MangleStr(value)
|
||||||
|
#define SWIG_CheckConvert(value, ty) \
|
||||||
|
SWIG_Ruby_CheckConvert(value, ty)
|
||||||
|
#define SWIG_NewPackedObj(ptr, sz, ty) \
|
||||||
|
SWIG_Ruby_NewPackedObj(ptr, sz, ty)
|
||||||
|
#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
|
||||||
|
SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
|
||||||
|
|
||||||
/* rubydef.swg */
|
/* rubydef.swg */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
@ -8,7 +33,7 @@ static VALUE _cSWIG_Pointer = Qnil;
|
||||||
static VALUE swig_runtime_data_type_pointer = Qnil;
|
static VALUE swig_runtime_data_type_pointer = Qnil;
|
||||||
|
|
||||||
/* Initialize Ruby runtime support */
|
/* Initialize Ruby runtime support */
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Ruby_InitRuntime(void)
|
SWIG_Ruby_InitRuntime(void)
|
||||||
{
|
{
|
||||||
VALUE pointer;
|
VALUE pointer;
|
||||||
|
|
@ -17,7 +42,6 @@ SWIG_Ruby_InitRuntime(void)
|
||||||
_mSWIG = rb_define_module("SWIG");
|
_mSWIG = rb_define_module("SWIG");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SWIG_DISABLE_RUNTIME
|
|
||||||
/* first check if pointer already created */
|
/* first check if pointer already created */
|
||||||
pointer = rb_gv_get("$swig_runtime_data_type_pointer");
|
pointer = rb_gv_get("$swig_runtime_data_type_pointer");
|
||||||
if (pointer != Qnil) {
|
if (pointer != Qnil) {
|
||||||
|
|
@ -29,11 +53,10 @@ SWIG_Ruby_InitRuntime(void)
|
||||||
swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, swig_type_list_handle);
|
swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, swig_type_list_handle);
|
||||||
rb_define_readonly_variable("$swig_runtime_data_type_pointer", &swig_runtime_data_type_pointer);
|
rb_define_readonly_variable("$swig_runtime_data_type_pointer", &swig_runtime_data_type_pointer);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Define Ruby class for C type */
|
/* Define Ruby class for C type */
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Ruby_define_class(swig_type_info *type)
|
SWIG_Ruby_define_class(swig_type_info *type)
|
||||||
{
|
{
|
||||||
VALUE klass;
|
VALUE klass;
|
||||||
|
|
@ -48,7 +71,7 @@ SWIG_Ruby_define_class(swig_type_info *type)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a new pointer object */
|
/* Create a new pointer object */
|
||||||
SWIGRUNTIME(VALUE)
|
static VALUE
|
||||||
SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int own)
|
SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int own)
|
||||||
{
|
{
|
||||||
char *klass_name;
|
char *klass_name;
|
||||||
|
|
@ -74,7 +97,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int own)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a new class instance (always owned) */
|
/* Create a new class instance (always owned) */
|
||||||
SWIGRUNTIME(VALUE)
|
static VALUE
|
||||||
SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
|
SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
|
||||||
{
|
{
|
||||||
VALUE obj;
|
VALUE obj;
|
||||||
|
|
@ -85,7 +108,7 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get type mangle from class name */
|
/* Get type mangle from class name */
|
||||||
SWIGRUNTIME(char *)
|
static char *
|
||||||
SWIG_Ruby_MangleStr(VALUE obj)
|
SWIG_Ruby_MangleStr(VALUE obj)
|
||||||
{
|
{
|
||||||
VALUE stype = rb_iv_get(obj, "__swigtype__");
|
VALUE stype = rb_iv_get(obj, "__swigtype__");
|
||||||
|
|
@ -93,7 +116,7 @@ SWIG_Ruby_MangleStr(VALUE obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert a pointer value */
|
/* Convert a pointer value */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Ruby_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags)
|
SWIG_Ruby_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags)
|
||||||
{
|
{
|
||||||
char *c;
|
char *c;
|
||||||
|
|
@ -135,7 +158,7 @@ SWIG_Ruby_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert a pointer value, signal an exception on a type mismatch */
|
/* Convert a pointer value, signal an exception on a type mismatch */
|
||||||
SWIGRUNTIME(void *)
|
static inline void *
|
||||||
SWIG_Ruby_MustGetPtr(VALUE obj, swig_type_info *ty, int argnum, int flags)
|
SWIG_Ruby_MustGetPtr(VALUE obj, swig_type_info *ty, int argnum, int flags)
|
||||||
{
|
{
|
||||||
void *result;
|
void *result;
|
||||||
|
|
@ -144,7 +167,7 @@ SWIG_Ruby_MustGetPtr(VALUE obj, swig_type_info *ty, int argnum, int flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check convert */
|
/* Check convert */
|
||||||
SWIGRUNTIME(int)
|
static inline int
|
||||||
SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
|
SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
|
||||||
{
|
{
|
||||||
char *c = SWIG_MangleStr(obj);
|
char *c = SWIG_MangleStr(obj);
|
||||||
|
|
@ -153,7 +176,7 @@ SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
|
||||||
return SWIG_TypeCheck(c,ty) != 0;
|
return SWIG_TypeCheck(c,ty) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(VALUE)
|
static VALUE
|
||||||
SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
|
SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
|
||||||
char result[1024];
|
char result[1024];
|
||||||
char *r = result;
|
char *r = result;
|
||||||
|
|
@ -165,7 +188,7 @@ SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert a packed value value */
|
/* Convert a packed value value */
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty, int flags) {
|
SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty, int flags) {
|
||||||
swig_type_info *tc;
|
swig_type_info *tc;
|
||||||
char *c;
|
char *c;
|
||||||
|
|
|
||||||
10
Lib/swig.swg
10
Lib/swig.swg
|
|
@ -271,16 +271,6 @@ namespace std {
|
||||||
%define SWIG_TYPECHECK_STRING_ARRAY 1140 %enddef
|
%define SWIG_TYPECHECK_STRING_ARRAY 1140 %enddef
|
||||||
%define SWIG_TYPECHECK_OBJECT_ARRAY 1150 %enddef
|
%define SWIG_TYPECHECK_OBJECT_ARRAY 1150 %enddef
|
||||||
|
|
||||||
/* Switch to enable runtime mode */
|
|
||||||
|
|
||||||
#ifndef SWIGSEXP
|
|
||||||
#ifdef SWIG_RUNTIME_MODE
|
|
||||||
%insert("runtime") %{
|
|
||||||
#define SWIG_GLOBAL 1
|
|
||||||
%}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This template wrapper is used to handle C++ objects that are passed or
|
* This template wrapper is used to handle C++ objects that are passed or
|
||||||
* returned by value. This is necessary to handle objects that define
|
* returned by value. This is necessary to handle objects that define
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
/*************************************************************** -*- c -*-
|
|
||||||
* Tcl/precommon.swg
|
|
||||||
*
|
|
||||||
* Rename all exported symbols from common.swg, to avoid symbol
|
|
||||||
* clashes if multiple interpreters are included
|
|
||||||
*
|
|
||||||
************************************************************************/
|
|
||||||
|
|
||||||
#define SWIG_TypeRegister SWIG_Tcl_TypeRegister
|
|
||||||
#define SWIG_TypeCheck SWIG_Tcl_TypeCheck
|
|
||||||
#define SWIG_TypeCast SWIG_Tcl_TypeCast
|
|
||||||
#define SWIG_TypeDynamicCast SWIG_Tcl_TypeDynamicCast
|
|
||||||
#define SWIG_TypeName SWIG_Tcl_TypeName
|
|
||||||
#define SWIG_TypePrettyName SWIG_Tcl_TypePrettyName
|
|
||||||
#define SWIG_TypeQuery SWIG_Tcl_TypeQuery
|
|
||||||
#define SWIG_TypeClientData SWIG_Tcl_TypeClientData
|
|
||||||
#define SWIG_PackData SWIG_Tcl_PackData
|
|
||||||
#define SWIG_UnpackData SWIG_Tcl_UnpackData
|
|
||||||
|
|
||||||
|
|
@ -122,35 +122,12 @@ SWIG_Tcl_LookupTypePointer(Tcl_Interp *interp) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef SWIG_NOINCLUDE
|
|
||||||
|
|
||||||
SWIGIMPORT(int) SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *, char *, void **, swig_type_info *,int flags);
|
|
||||||
SWIGIMPORT(int) SWIG_Tcl_ConvertPtr(Tcl_Interp *, Tcl_Obj *, void **, swig_type_info *, int flags);
|
|
||||||
SWIGIMPORT(int) SWIG_Tcl_ConvertPacked(Tcl_Interp *, Tcl_Obj *, void *, int sz, swig_type_info *, int flags);
|
|
||||||
SWIGIMPORT(void) SWIG_Tcl_MakePtr(char *, void *, swig_type_info *, int flags);
|
|
||||||
SWIGIMPORT(Tcl_Obj *) SWIG_Tcl_NewPointerObj(void *, swig_type_info *, int flags);
|
|
||||||
SWIGIMPORT(Tcl_Obj *) SWIG_Tcl_NewPackedObj(void *, int sz, swig_type_info *, int flags);
|
|
||||||
SWIGIMPORT(int) SWIG_Tcl_GetArgs(Tcl_Interp *, int, Tcl_Obj *CONST [], const char *, ...);
|
|
||||||
SWIGIMPORT(char *) SWIG_Tcl_PointerTypeFromString(char *c);
|
|
||||||
SWIGIMPORT(void) SWIG_Tcl_Acquire(void *ptr);
|
|
||||||
SWIGIMPORT(int) SWIG_Tcl_Disown(void *ptr);
|
|
||||||
SWIGIMPORT(int) SWIG_Tcl_Thisown(void *ptr);
|
|
||||||
SWIGIMPORT(void) SWIG_Tcl_InstallConstants(Tcl_Interp *interp, struct swig_const_info constants[]);
|
|
||||||
SWIGIMPORT(Tcl_Obj *) SWIG_Tcl_GetConstant(const char *key);
|
|
||||||
SWIGIMPORT(Tcl_Obj *) SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *, swig_type_info *, int flags);
|
|
||||||
SWIGIMPORT(int) SWIG_Tcl_ObjectConstructor(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]);
|
|
||||||
SWIGIMPORT(int) SWIG_Tcl_MethodCommand(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]);
|
|
||||||
SWIGIMPORT(void) SWIG_Tcl_ObjectDelete(ClientData);
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
/* Object support */
|
/* Object support */
|
||||||
static Tcl_HashTable swigobjectTable;
|
static Tcl_HashTable swigobjectTable;
|
||||||
static int swigobjectTableinit = 0;
|
static int swigobjectTableinit = 0;
|
||||||
|
|
||||||
/* Acquire ownership of a pointer */
|
/* Acquire ownership of a pointer */
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Tcl_Acquire(void *ptr) {
|
SWIG_Tcl_Acquire(void *ptr) {
|
||||||
Tcl_HashEntry *entryPtr;
|
Tcl_HashEntry *entryPtr;
|
||||||
int newobj;
|
int newobj;
|
||||||
|
|
@ -162,7 +139,7 @@ SWIG_Tcl_Acquire(void *ptr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disown a pointer. Returns 1 if we owned it to begin with */
|
/* Disown a pointer. Returns 1 if we owned it to begin with */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Tcl_Disown(void *ptr) {
|
SWIG_Tcl_Disown(void *ptr) {
|
||||||
Tcl_HashEntry *entryPtr;
|
Tcl_HashEntry *entryPtr;
|
||||||
if (!swigobjectTableinit) return 0;
|
if (!swigobjectTableinit) return 0;
|
||||||
|
|
@ -174,7 +151,7 @@ SWIG_Tcl_Disown(void *ptr) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(int)
|
static inline int
|
||||||
SWIG_Tcl_Thisown(void *ptr) {
|
SWIG_Tcl_Thisown(void *ptr) {
|
||||||
if (!swigobjectTableinit) return 0;
|
if (!swigobjectTableinit) return 0;
|
||||||
if (Tcl_FindHashEntry(&swigobjectTable, (char *) ptr)) {
|
if (Tcl_FindHashEntry(&swigobjectTable, (char *) ptr)) {
|
||||||
|
|
@ -184,7 +161,7 @@ SWIG_Tcl_Thisown(void *ptr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert a pointer value */
|
/* Convert a pointer value */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, char *c, void **ptr, swig_type_info *ty, int flags) {
|
SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, char *c, void **ptr, swig_type_info *ty, int flags) {
|
||||||
swig_type_info *tc;
|
swig_type_info *tc;
|
||||||
/* Pointer values must start with leading underscore */
|
/* Pointer values must start with leading underscore */
|
||||||
|
|
@ -223,13 +200,13 @@ SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, char *c, void **ptr, swig_type
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert a pointer value */
|
/* Convert a pointer value */
|
||||||
SWIGRUNTIME(int)
|
static inline int
|
||||||
SWIG_Tcl_ConvertPtr(Tcl_Interp *interp, Tcl_Obj *oc, void **ptr, swig_type_info *ty, int flags) {
|
SWIG_Tcl_ConvertPtr(Tcl_Interp *interp, Tcl_Obj *oc, void **ptr, swig_type_info *ty, int flags) {
|
||||||
return SWIG_Tcl_ConvertPtrFromString(interp, Tcl_GetStringFromObj(oc,NULL), ptr, ty, flags);
|
return SWIG_Tcl_ConvertPtrFromString(interp, Tcl_GetStringFromObj(oc,NULL), ptr, ty, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert a pointer value */
|
/* Convert a pointer value */
|
||||||
SWIGRUNTIME(char *)
|
static char *
|
||||||
SWIG_Tcl_PointerTypeFromString(char *c) {
|
SWIG_Tcl_PointerTypeFromString(char *c) {
|
||||||
char d;
|
char d;
|
||||||
/* Pointer values must start with leading underscore. NULL has no type */
|
/* Pointer values must start with leading underscore. NULL has no type */
|
||||||
|
|
@ -246,7 +223,7 @@ SWIG_Tcl_PointerTypeFromString(char *c) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert a packed value value */
|
/* Convert a packed value value */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Tcl_ConvertPacked(Tcl_Interp *interp, Tcl_Obj *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
|
SWIG_Tcl_ConvertPacked(Tcl_Interp *interp, Tcl_Obj *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
|
||||||
swig_type_info *tc;
|
swig_type_info *tc;
|
||||||
char *c;
|
char *c;
|
||||||
|
|
@ -280,7 +257,7 @@ type_error:
|
||||||
|
|
||||||
|
|
||||||
/* Take a pointer and convert it to a string */
|
/* Take a pointer and convert it to a string */
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int flags) {
|
SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int flags) {
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
*(c++) = '_';
|
*(c++) = '_';
|
||||||
|
|
@ -293,7 +270,7 @@ SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int flags) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a new pointer object */
|
/* Create a new pointer object */
|
||||||
SWIGRUNTIME(Tcl_Obj *)
|
static Tcl_Obj *
|
||||||
SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
|
SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
|
||||||
Tcl_Obj *robj;
|
Tcl_Obj *robj;
|
||||||
char result[512];
|
char result[512];
|
||||||
|
|
@ -302,7 +279,7 @@ SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
|
||||||
return robj;
|
return robj;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(Tcl_Obj *)
|
static Tcl_Obj *
|
||||||
SWIG_Tcl_NewPackedObj(void *ptr, int sz, swig_type_info *type, int flags) {
|
SWIG_Tcl_NewPackedObj(void *ptr, int sz, swig_type_info *type, int flags) {
|
||||||
char result[1024];
|
char result[1024];
|
||||||
char *r = result;
|
char *r = result;
|
||||||
|
|
@ -318,7 +295,7 @@ static Tcl_HashTable swigconstTable;
|
||||||
static int swigconstTableinit = 0;
|
static int swigconstTableinit = 0;
|
||||||
|
|
||||||
/* Install Constants */
|
/* Install Constants */
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
|
SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
|
||||||
int i;
|
int i;
|
||||||
Tcl_Obj *obj;
|
Tcl_Obj *obj;
|
||||||
|
|
@ -358,7 +335,7 @@ SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(Tcl_Obj *)
|
static Tcl_Obj *
|
||||||
SWIG_Tcl_GetConstant(const char *key) {
|
SWIG_Tcl_GetConstant(const char *key) {
|
||||||
Tcl_HashEntry *entryPtr;
|
Tcl_HashEntry *entryPtr;
|
||||||
if (!swigconstTableinit) return 0;
|
if (!swigconstTableinit) return 0;
|
||||||
|
|
@ -371,7 +348,7 @@ SWIG_Tcl_GetConstant(const char *key) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get arguments */
|
/* Get arguments */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fmt, ...) {
|
SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fmt, ...) {
|
||||||
int argno = 0, opt = 0;
|
int argno = 0, opt = 0;
|
||||||
long tempi;
|
long tempi;
|
||||||
|
|
@ -468,7 +445,7 @@ SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGRUNTIME(void)
|
static void
|
||||||
SWIG_Tcl_ObjectDelete(ClientData clientData) {
|
SWIG_Tcl_ObjectDelete(ClientData clientData) {
|
||||||
swig_instance *si = (swig_instance *) clientData;
|
swig_instance *si = (swig_instance *) clientData;
|
||||||
if ((si) && (si->destroy) && (SWIG_Disown(si->thisvalue))) {
|
if ((si) && (si->destroy) && (SWIG_Disown(si->thisvalue))) {
|
||||||
|
|
@ -481,7 +458,7 @@ SWIG_Tcl_ObjectDelete(ClientData clientData) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Function to invoke object methods given an instance */
|
/* Function to invoke object methods given an instance */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST _objv[]) {
|
SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST _objv[]) {
|
||||||
char *method, *attrname;
|
char *method, *attrname;
|
||||||
swig_instance *inst = (swig_instance *) clientData;
|
swig_instance *inst = (swig_instance *) clientData;
|
||||||
|
|
@ -650,7 +627,7 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Function to create objects */
|
/* Function to create objects */
|
||||||
SWIGRUNTIME(int)
|
static int
|
||||||
SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
|
SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
|
||||||
Tcl_Obj *newObj = 0;
|
Tcl_Obj *newObj = 0;
|
||||||
void *thisvalue = 0;
|
void *thisvalue = 0;
|
||||||
|
|
@ -729,7 +706,7 @@ SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc,
|
||||||
|
|
||||||
|
|
||||||
/* This function takes the current result and turns it into an object command */
|
/* This function takes the current result and turns it into an object command */
|
||||||
SWIGRUNTIME(Tcl_Obj *)
|
static Tcl_Obj *
|
||||||
SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *type, int flags) {
|
SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *type, int flags) {
|
||||||
Tcl_Obj *robj = SWIG_NewPointerObj(thisvalue, type,0);
|
Tcl_Obj *robj = SWIG_NewPointerObj(thisvalue, type,0);
|
||||||
/* Check to see if this pointer belongs to a class or not */
|
/* Check to see if this pointer belongs to a class or not */
|
||||||
|
|
@ -753,8 +730,6 @@ SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *typ
|
||||||
return robj;
|
return robj;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Structure for command table */
|
/* Structure for command table */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
|
||||||
|
|
@ -4,25 +4,6 @@
|
||||||
* Tcl8 configuration module.
|
* Tcl8 configuration module.
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
%runtime "precommon.swg"
|
|
||||||
%insert(runtime) %{
|
|
||||||
|
|
||||||
#ifndef SWIG_ALLOW_RUNTIME
|
|
||||||
/* -----------------------------------------------------------------------------
|
|
||||||
* Disable runtime library use, everything is used as static
|
|
||||||
* ----------------------------------------------------------------------------- */
|
|
||||||
#ifndef SWIG_DISABLE_RUNTIME
|
|
||||||
#define SWIG_DISABLE_RUNTIME
|
|
||||||
#endif
|
|
||||||
#ifdef SWIG_GLOBAL
|
|
||||||
#undef SWIG_GLOBAL
|
|
||||||
#endif
|
|
||||||
#ifdef SWIG_NOINCLUDE
|
|
||||||
#undef SWIG_NOINCLUDE
|
|
||||||
#endif
|
|
||||||
#endif /* SWIG_ALLOW_RUNTIME */
|
|
||||||
|
|
||||||
%}
|
|
||||||
%runtime "common.swg"
|
%runtime "common.swg"
|
||||||
%runtime "swigtcl8.swg"
|
%runtime "swigtcl8.swg"
|
||||||
|
|
||||||
|
|
@ -664,9 +645,7 @@ SWIGEXPORT(int) SWIG_init(Tcl_Interp *interp) {
|
||||||
Tcl_Eval(interp, "namespace eval " SWIG_namespace " { }");
|
Tcl_Eval(interp, "namespace eval " SWIG_namespace " { }");
|
||||||
#endif
|
#endif
|
||||||
if (!_init) {
|
if (!_init) {
|
||||||
#ifdef SWIG_DISABLE_RUNTIME
|
|
||||||
SWIG_Tcl_LookupTypePointer(interp);
|
SWIG_Tcl_LookupTypePointer(interp);
|
||||||
#endif
|
|
||||||
for (i = 0; swig_types_initial[i]; i++) {
|
for (i = 0; swig_types_initial[i]; i++) {
|
||||||
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -244,10 +244,6 @@ class CSHARP : public Language {
|
||||||
|
|
||||||
Swig_banner(f_runtime); // Print the SWIG banner message
|
Swig_banner(f_runtime); // Print the SWIG banner message
|
||||||
|
|
||||||
if (NoInclude) {
|
|
||||||
Printf(f_runtime,"#define SWIG_NOINCLUDE\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
String *wrapper_name = NewString("");
|
String *wrapper_name = NewString("");
|
||||||
|
|
||||||
Printf(wrapper_name, "CSharp_%%f", imclass_name);
|
Printf(wrapper_name, "CSharp_%%f", imclass_name);
|
||||||
|
|
|
||||||
|
|
@ -359,10 +359,6 @@ public:
|
||||||
|
|
||||||
/* Write out directives and declarations */
|
/* Write out directives and declarations */
|
||||||
|
|
||||||
if (NoInclude) {
|
|
||||||
Printf(f_runtime, "#define SWIG_NOINCLUDE\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
module = Swig_copy_string(Char(Getattr(n,"name")));
|
module = Swig_copy_string(Char(Getattr(n,"name")));
|
||||||
|
|
||||||
if (CPlusPlus) {
|
if (CPlusPlus) {
|
||||||
|
|
|
||||||
|
|
@ -350,10 +350,6 @@ class JAVA : public Language {
|
||||||
|
|
||||||
Swig_banner(f_runtime); // Print the SWIG banner message
|
Swig_banner(f_runtime); // Print the SWIG banner message
|
||||||
|
|
||||||
if (NoInclude) {
|
|
||||||
Printf(f_runtime,"#define SWIG_NOINCLUDE\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (directorsEnabled()) {
|
if (directorsEnabled()) {
|
||||||
Printf(f_runtime,"#define SWIG_DIRECTORS\n");
|
Printf(f_runtime,"#define SWIG_DIRECTORS\n");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ char cvsroot_main_cxx[] = "$Header$";
|
||||||
int ForceExtern = 0; // Force extern mode
|
int ForceExtern = 0; // Force extern mode
|
||||||
int GenerateDefault = 1; // Generate default constructors
|
int GenerateDefault = 1; // Generate default constructors
|
||||||
char *Config = 0;
|
char *Config = 0;
|
||||||
int NoInclude = 0;
|
|
||||||
int Verbose = 0;
|
int Verbose = 0;
|
||||||
int NoExtern = 0;
|
int NoExtern = 0;
|
||||||
int NoExcept = 0;
|
int NoExcept = 0;
|
||||||
|
|
@ -79,10 +78,8 @@ static const char *usage2 = (const char*)"\
|
||||||
-nodirprot - Do not wrap director protected members\n\
|
-nodirprot - Do not wrap director protected members\n\
|
||||||
-noexcept - Do not wrap exception specifiers\n\
|
-noexcept - Do not wrap exception specifiers\n\
|
||||||
-noextern - Do not generate extern declarations\n\
|
-noextern - Do not generate extern declarations\n\
|
||||||
-noruntime - Do not include SWIG runtime code\n\
|
|
||||||
-o <outfile> - Set name of the output file to <outfile>\n\
|
-o <outfile> - Set name of the output file to <outfile>\n\
|
||||||
-outdir <dir> - Set language specific files output directory\n\
|
-outdir <dir> - Set language specific files output directory\n\
|
||||||
-runtime - Make the runtime support code globally visible.\n\
|
|
||||||
-small - Compile in virtual elimination & compact mode\n\
|
-small - Compile in virtual elimination & compact mode\n\
|
||||||
-swiglib - Report location of SWIG library and exit\n\
|
-swiglib - Report location of SWIG library and exit\n\
|
||||||
-v - Run in verbose mode\n\
|
-v - Run in verbose mode\n\
|
||||||
|
|
@ -312,16 +309,11 @@ void SWIG_getoptions(int argc, char *argv[])
|
||||||
Wrapper_compact_print_mode_set(1);
|
Wrapper_compact_print_mode_set(1);
|
||||||
Wrapper_virtual_elimination_mode_set(1);
|
Wrapper_virtual_elimination_mode_set(1);
|
||||||
Swig_mark_arg(i);
|
Swig_mark_arg(i);
|
||||||
} else if ((strcmp(argv[i],"-noruntime") == 0) || (strcmp(argv[i],"-c") == 0)) {
|
} else if ((strcmp(argv[i],"-noruntime") == 0) ||
|
||||||
NoInclude=1;
|
(strcmp(argv[i],"-c") == 0) ||
|
||||||
Preprocessor_define((DOH *) "SWIG_NOINCLUDE 1", 0);
|
(strcmp(argv[i], "-runtime") == 0)) {
|
||||||
Swig_mark_arg(i);
|
|
||||||
if (strcmp(argv[i],"-c") == 0) {
|
|
||||||
Swig_warning(WARN_DEPRECATED_OPTC, "SWIG",1, "-c command line option is deprecated. Use -noruntime instead.\n");
|
|
||||||
}
|
|
||||||
} else if ((strcmp(argv[i],"-runtime") == 0)) {
|
|
||||||
Preprocessor_define((String *) "SWIG_RUNTIME_MODE 1", 0);
|
|
||||||
Swig_mark_arg(i);
|
Swig_mark_arg(i);
|
||||||
|
Swig_warning(WARN_DEPRECATED_OPTC, "SWIG",1, "-c, -runtime, -noruntime command line options are deprecated.\n");
|
||||||
} else if ((strcmp(argv[i],"-make_default") == 0) || (strcmp(argv[i],"-makedefault") == 0)) {
|
} else if ((strcmp(argv[i],"-make_default") == 0) || (strcmp(argv[i],"-makedefault") == 0)) {
|
||||||
GenerateDefault = 1;
|
GenerateDefault = 1;
|
||||||
Swig_mark_arg(i);
|
Swig_mark_arg(i);
|
||||||
|
|
|
||||||
|
|
@ -1016,10 +1016,6 @@ MODULA3 ():
|
||||||
|
|
||||||
Swig_banner (f_runtime); // Print the SWIG banner message
|
Swig_banner (f_runtime); // Print the SWIG banner message
|
||||||
|
|
||||||
if (NoInclude) {
|
|
||||||
Printf (f_runtime, "#define SWIG_NOINCLUDE\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
String *wrapper_name = NewString ("");
|
String *wrapper_name = NewString ("");
|
||||||
|
|
||||||
Printf (wrapper_name, "Modula3_%%f", m3raw_name);
|
Printf (wrapper_name, "Modula3_%%f", m3raw_name);
|
||||||
|
|
|
||||||
|
|
@ -279,10 +279,6 @@ public:
|
||||||
Swig_insert_file("director.swg", f_directors_h);
|
Swig_insert_file("director.swg", f_directors_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NoInclude) {
|
|
||||||
Printf(f_runtime, "#define SWIG_NOINCLUDE\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Produce the enum_to_int and int_to_enum functions */
|
/* Produce the enum_to_int and int_to_enum functions */
|
||||||
|
|
||||||
Printf(f_enumtypes_type,"type c_enum_type = [ \n `unknown\n" );
|
Printf(f_enumtypes_type,"type c_enum_type = [ \n `unknown\n" );
|
||||||
|
|
|
||||||
|
|
@ -214,10 +214,6 @@ public:
|
||||||
|
|
||||||
Swig_banner(f_runtime);
|
Swig_banner(f_runtime);
|
||||||
|
|
||||||
if (NoInclude) {
|
|
||||||
Printf(f_runtime,"#define SWIG_NOINCLUDE\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
module = Copy(Getattr(n,"name"));
|
module = Copy(Getattr(n,"name"));
|
||||||
|
|
||||||
/* If we're in blessed mode, change the package name to "packagec" */
|
/* If we're in blessed mode, change the package name to "packagec" */
|
||||||
|
|
|
||||||
|
|
@ -135,9 +135,6 @@ public:
|
||||||
|
|
||||||
/* Standard stuff for the SWIG runtime section */
|
/* Standard stuff for the SWIG runtime section */
|
||||||
Swig_banner(f_runtime);
|
Swig_banner(f_runtime);
|
||||||
if (NoInclude) {
|
|
||||||
Printf(f_runtime, "#define SWIG_NOINCLUDE\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
Printf(f_header, "#define SWIG_init pike_module_init\n");
|
Printf(f_header, "#define SWIG_init pike_module_init\n");
|
||||||
Printf(f_header, "#define SWIG_name \"%s\"\n\n", module);
|
Printf(f_header, "#define SWIG_name \"%s\"\n\n", module);
|
||||||
|
|
|
||||||
|
|
@ -221,8 +221,6 @@ public:
|
||||||
Swig_banner(f_runtime);
|
Swig_banner(f_runtime);
|
||||||
|
|
||||||
Printf(f_runtime,"#define SWIGPYTHON\n");
|
Printf(f_runtime,"#define SWIGPYTHON\n");
|
||||||
if (NoInclude)
|
|
||||||
Printf(f_runtime,"#define SWIG_NOINCLUDE\n");
|
|
||||||
|
|
||||||
if (directorsEnabled()) {
|
if (directorsEnabled()) {
|
||||||
Printf(f_runtime,"#define SWIG_DIRECTORS\n");
|
Printf(f_runtime,"#define SWIG_DIRECTORS\n");
|
||||||
|
|
|
||||||
|
|
@ -397,10 +397,6 @@ public:
|
||||||
|
|
||||||
Swig_banner(f_runtime);
|
Swig_banner(f_runtime);
|
||||||
|
|
||||||
if (NoInclude) {
|
|
||||||
Printf(f_runtime, "#define SWIG_NOINCLUDE\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (directorsEnabled()) {
|
if (directorsEnabled()) {
|
||||||
Printf(f_runtime,"#define SWIG_DIRECTORS\n");
|
Printf(f_runtime,"#define SWIG_DIRECTORS\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ extern int line_number;
|
||||||
extern int start_line;
|
extern int start_line;
|
||||||
extern int CPlusPlus; // C++ mode
|
extern int CPlusPlus; // C++ mode
|
||||||
extern int Extend; // Extend mode
|
extern int Extend; // Extend mode
|
||||||
extern int NoInclude; // NoInclude flag
|
|
||||||
extern int Verbose;
|
extern int Verbose;
|
||||||
extern int IsVirtual;
|
extern int IsVirtual;
|
||||||
extern int ImportMode;
|
extern int ImportMode;
|
||||||
|
|
|
||||||
|
|
@ -158,11 +158,6 @@ public:
|
||||||
|
|
||||||
Swig_banner(f_runtime);
|
Swig_banner(f_runtime);
|
||||||
|
|
||||||
/* Include a Tcl configuration file */
|
|
||||||
if (NoInclude) {
|
|
||||||
Printf(f_runtime,"#define SWIG_NOINCLUDE\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set the module name, namespace, and prefix */
|
/* Set the module name, namespace, and prefix */
|
||||||
|
|
||||||
module = NewStringf("%(lower)s", Getattr(n,"name"));
|
module = NewStringf("%(lower)s", Getattr(n,"name"));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue