summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.current12
-rw-r--r--Doc/Manual/Advanced.html458
-rw-r--r--Doc/Manual/chapters1
-rw-r--r--Examples/test-suite/clientdata_prop_runtime.i1
-rw-r--r--Examples/test-suite/common.mk9
-rw-r--r--Examples/test-suite/imports_runtime.i3
-rw-r--r--Examples/test-suite/python/Makefile.in2
-rw-r--r--Examples/test-suite/template_typedef_import_runtime.i3
-rw-r--r--Lib/chicken/chicken.swg1
-rw-r--r--Lib/chicken/precommon.swg19
-rw-r--r--Lib/common.swg48
-rw-r--r--Lib/guile/guile_gh.swg2
-rw-r--r--Lib/guile/guile_gh_run.swg158
-rw-r--r--Lib/guile/guile_scm.swg1
-rw-r--r--Lib/guile/guile_scm_run.swg61
-rw-r--r--Lib/guile/precommon.swg19
-rw-r--r--Lib/mzscheme/mzscheme.swg1
-rw-r--r--Lib/mzscheme/precommon.swg19
-rw-r--r--Lib/perl5/perl5.swg21
-rw-r--r--Lib/perl5/perlrun.swg32
-rw-r--r--Lib/perl5/precommon.swg19
-rw-r--r--Lib/php4/php4.swg1
-rw-r--r--Lib/php4/php4run.swg14
-rw-r--r--Lib/php4/precommon.swg19
-rw-r--r--Lib/pike/pikerun.swg13
-rw-r--r--Lib/pike/precommon.swg19
-rw-r--r--Lib/python/precommon.swg19
-rw-r--r--Lib/python/pyinit.swg2
-rw-r--r--Lib/python/pyrun.swg64
-rw-r--r--Lib/python/pyruntime.swg19
-rw-r--r--Lib/ruby/precommon.swg46
-rw-r--r--Lib/ruby/ruby.swg30
-rw-r--r--Lib/ruby/rubydec.swg19
-rw-r--r--Lib/ruby/rubydef.swg47
-rw-r--r--Lib/swig.swg10
-rw-r--r--Lib/tcl/precommon.swg19
-rw-r--r--Lib/tcl/swigtcl8.swg59
-rw-r--r--Lib/tcl/tcl8.swg21
-rw-r--r--Source/Modules/csharp.cxx4
-rw-r--r--Source/Modules/guile.cxx4
-rw-r--r--Source/Modules/java.cxx4
-rw-r--r--Source/Modules/main.cxx16
-rw-r--r--Source/Modules/modula3.cxx4
-rwxr-xr-xSource/Modules/ocaml.cxx4
-rw-r--r--Source/Modules/perl5.cxx4
-rw-r--r--Source/Modules/pike.cxx3
-rw-r--r--Source/Modules/python.cxx2
-rw-r--r--Source/Modules/ruby.cxx4
-rw-r--r--Source/Modules/swigmod.h1
-rw-r--r--Source/Modules/tcl8.cxx5
50 files changed, 204 insertions, 1162 deletions
diff --git a/CHANGES.current b/CHANGES.current
index 19739847e..f702fd8ba 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -1,6 +1,18 @@
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
- Split the python std/STL C++ library files, now
all the language independent definitions are under
diff --git a/Doc/Manual/Advanced.html b/Doc/Manual/Advanced.html
deleted file mode 100644
index 09301c8e7..000000000
--- a/Doc/Manual/Advanced.html
+++ /dev/null
@@ -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
-&gt;&gt;&gt; <b>from a import *</b>
-&gt;&gt;&gt; <b>from b import *</b>
-&gt;&gt;&gt; <b># Create a new "b"</b>
-&gt;&gt;&gt; <b>b = new_b()</b>
-&gt;&gt;&gt; <b># Call a function in the base class</b>
-...
-&gt;&gt;&gt; <b>a_foo(b,3)</b>
-Traceback (innermost last):
- File "&lt;stdin&gt;", line 1, in ?
-TypeError: Type error in argument 1 of a_foo. Expected _a_p.
-&gt;&gt;&gt;
-</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
-&gt; <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 =&gt; { Real, Float }
-Real =&gt; { double, Float }
-Float =&gt; { double, Real }
-RealPtr =&gt; { Real * }
-Real * =&gt; { 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 =&gt; { B, C, E } "B isa A, C isa A, E isa A"
-B =&gt; { C, E } "C isa B, E isa B"
-C =&gt; { E } "E isa C"
-D =&gt; { E } "E isa D"
-E =&gt; { }
-</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>
diff --git a/Doc/Manual/chapters b/Doc/Manual/chapters
index e5f1970ee..d6bfcae90 100644
--- a/Doc/Manual/chapters
+++ b/Doc/Manual/chapters
@@ -27,4 +27,3 @@ Python.html
Ruby.html
Tcl.html
Extending.html
-Advanced.html
diff --git a/Examples/test-suite/clientdata_prop_runtime.i b/Examples/test-suite/clientdata_prop_runtime.i
deleted file mode 100644
index 45d31084f..000000000
--- a/Examples/test-suite/clientdata_prop_runtime.i
+++ /dev/null
@@ -1 +0,0 @@
-%module clientdata_prop_runtime
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk
index 14f868e14..eebb6528e 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -35,7 +35,7 @@ TARGETPREFIX =
TARGETSUFFIX =
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)
-LIBS = -L. -l$*_runtime
+LIBS = -L.
LIBPREFIX = lib
#
@@ -369,15 +369,10 @@ swig_and_compile_c = \
$(LANGUAGE)$(VARIANT)
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 \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile CXXSRCS="$(CXXSRCS)" \
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" \
$(LANGUAGE)$(VARIANT)_cpp; \
done
diff --git a/Examples/test-suite/imports_runtime.i b/Examples/test-suite/imports_runtime.i
deleted file mode 100644
index eafb94f80..000000000
--- a/Examples/test-suite/imports_runtime.i
+++ /dev/null
@@ -1,3 +0,0 @@
-// Empty module for building the runtime library
-%module imports_runtime
-
diff --git a/Examples/test-suite/python/Makefile.in b/Examples/test-suite/python/Makefile.in
index 5594e778b..d83788d06 100644
--- a/Examples/test-suite/python/Makefile.in
+++ b/Examples/test-suite/python/Makefile.in
@@ -42,7 +42,7 @@ C_TEST_CASES += \
include $(srcdir)/../common.mk
# Overridden variables here
-LIBS = -L. -l_$*_runtime
+LIBS = -L.
# Rules for the different types of tests
%.cpptest:
diff --git a/Examples/test-suite/template_typedef_import_runtime.i b/Examples/test-suite/template_typedef_import_runtime.i
deleted file mode 100644
index ee20dd7c0..000000000
--- a/Examples/test-suite/template_typedef_import_runtime.i
+++ /dev/null
@@ -1,3 +0,0 @@
-// Empty module for building the runtime library
-%module template_typedef_import_runtime
-
diff --git a/Lib/chicken/chicken.swg b/Lib/chicken/chicken.swg
index 435a2d64a..085a946c8 100644
--- a/Lib/chicken/chicken.swg
+++ b/Lib/chicken/chicken.swg
@@ -10,7 +10,6 @@
#include "chicken.h"
%}
-%insert(runtime) "precommon.swg"
%insert(runtime) "common.swg"; // Common type-checking code
%insert(runtime) "chickenrun.swg"; // CHICKEN run-time code
diff --git a/Lib/chicken/precommon.swg b/Lib/chicken/precommon.swg
deleted file mode 100644
index 329986e51..000000000
--- a/Lib/chicken/precommon.swg
+++ /dev/null
@@ -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
-
diff --git a/Lib/common.swg b/Lib/common.swg
index e08462cc1..f92789f05 100644
--- a/Lib/common.swg
+++ b/Lib/common.swg
@@ -25,13 +25,7 @@
# define SWIGEXPORT(a) a
#endif
-#define SWIGIMPORT(a) a
-
-#ifdef SWIG_GLOBAL
-# define SWIGRUNTIME(a) SWIGEXPORT(a)
-#else
-# define SWIGRUNTIME(a) static a
-#endif
+#define SWIGRUNTIME(x) static x
#ifdef __cplusplus
extern "C" {
@@ -50,27 +44,11 @@ typedef struct swig_type_info {
struct swig_type_info *prev;
} 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_handle = &swig_type_list;
/* Register a type mapping with the type-checking */
-SWIGRUNTIME(swig_type_info *)
+static swig_type_info *
SWIG_TypeRegister(swig_type_info *ti) {
swig_type_info *tc, *head, *ret, *next;
/* Check to see if this type has already been registered */
@@ -110,7 +88,7 @@ SWIG_TypeRegister(swig_type_info *ti) {
}
/* Check the typename */
-SWIGRUNTIME(swig_type_info *)
+static swig_type_info *
SWIG_TypeCheck(char *c, swig_type_info *ty) {
swig_type_info *s;
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 */
-SWIGRUNTIME(void *)
+static inline void *
SWIG_TypeCast(swig_type_info *ty, void *ptr) {
if ((!ty) || (!ty->converter)) return ptr;
return (*ty->converter)(ptr);
}
/* Dynamic pointer casting. Down an inheritance hierarchy */
-SWIGRUNTIME(swig_type_info *)
+static swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
swig_type_info *lastty = 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 */
-SWIGRUNTIME(const char *)
+static inline const char *
SWIG_TypeName(const swig_type_info *ty) {
return ty->name;
}
@@ -163,7 +141,7 @@ SWIG_TypeName(const swig_type_info *ty) {
/* Return the pretty name associated with this type,
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) {
/* The "str" field contains the equivalent pretty names of the
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 */
-SWIGRUNTIME(swig_type_info *)
+static swig_type_info *
SWIG_TypeQuery(const char *name) {
swig_type_info *ty = *swig_type_list_handle;
while (ty) {
@@ -230,7 +208,7 @@ SWIG_TypeQuery(const char *name) {
}
/* Set the clientdata field for a type */
-SWIGRUNTIME(void)
+static void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
swig_type_info *tc, *equiv;
if (ti->clientdata == clientdata) return;
@@ -250,7 +228,7 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
}
/* Pack binary data into a string */
-SWIGRUNTIME(char *)
+static char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
static char hex[17] = "0123456789abcdef";
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 */
-SWIGRUNTIME(char *)
+static char *
SWIG_UnpackData(char *c, void *ptr, size_t sz) {
register unsigned char uu = 0;
register int d;
@@ -292,7 +270,7 @@ SWIG_UnpackData(char *c, void *ptr, size_t sz) {
* of equivalent types. It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
-SWIGRUNTIME(void)
+static void
SWIG_PropagateClientData(swig_type_info *type) {
swig_type_info *equiv = type->next;
swig_type_info *tc;
@@ -310,8 +288,6 @@ SWIG_PropagateClientData(swig_type_info *type) {
}
}
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/Lib/guile/guile_gh.swg b/Lib/guile/guile_gh.swg
index bf64bf9f4..8484ba4e9 100644
--- a/Lib/guile/guile_gh.swg
+++ b/Lib/guile/guile_gh.swg
@@ -12,9 +12,9 @@
static int _swig_init = 0;
if (!_swig_init) {
+ SWIG_Guile_Init();
SWIG_Guile_RegisterTypes(swig_types, swig_types_initial);
_swig_init = 1;
}
- SWIG_Guile_Init();
%}
diff --git a/Lib/guile/guile_gh_run.swg b/Lib/guile/guile_gh_run.swg
index a0093e6da..248093a41 100644
--- a/Lib/guile/guile_gh_run.swg
+++ b/Lib/guile/guile_gh_run.swg
@@ -36,14 +36,6 @@ extern "C" {
(char *) FUNC_NAME, (char *) msg, \
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_UNSPECIFIED SCM_UNSPECIFIED
@@ -121,7 +113,7 @@ typedef struct swig_type_info {
int dummy;
} swig_type_info;
-SWIGSTATIC void
+static void
SWIG_Guile_RegisterTypes (swig_type_info **table,
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
C++). */
-SWIGSTATIC void
+static void
SWIG_RegisterMapping (const char *origtype, const char *newtype,
swig_converter_func cast);
/* Dynamic pointer casting. Down an inheritance hierarchy */
-SWIGSTATIC swig_type_info *
+static swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr);
/* Register SWIG smobs with Guile. */
-SWIGSTATIC void
+static void
SWIG_Guile_Init();
/* 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,
return nonzero; on success, return 0. */
-SWIGSTATIC int
+static int
SWIG_Guile_GetPtr (SCM s, void **result, swig_type_info *type);
/* Get a pointer value from a smob. If there is a type-mismatch,
signal a wrong-type-arg error for the given argument number. */
-SWIGSTATIC void *
+static void *
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
int argnum, const char *func_name);
/* Make a smob from a pointer and typeinfo. */
-SWIGSTATIC SCM
+static SCM
SWIG_Guile_MakePtr (void *ptr, swig_type_info *type);
/* Get arguments from an argument list */
-SWIGSTATIC int
+static int
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
int reqargs, int optargs,
const char *procname);
@@ -175,11 +167,6 @@ typedef SCM (*swig_guile_proc)();
}
#endif
-/* guiledec.swg ends here */
-
-#ifndef SWIG_NOINCLUDE
-/* SWIG pointer structure */
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -197,19 +184,21 @@ struct SwigPtrType {
struct SwigCast *cast; /* List of compatible types */
};
-/* Some variables */
-
-static int SwigPtrMax = 64; /* Max entries that can be held */
- /* (may be adjusted dynamically) */
-static int SwigPtrN = 0; /* Current number of entries */
-static int SwigPtrSort = 0; /* Status flag indicating sort */
-
-/* Pointer table */
-static SwigPtrType *SwigPtrList = 0; /* Table containing types and
+struct swig_module_info {
+ int PtrMax;/* Max entries that can be held *//* (may be adjusted dynamically) */
+ int PtrN;/* Current number of entries */
+ int PtrSort;/* Status flag indicating sort */
+ SwigPtrType *PtrList; /* Table containing types and
equivalences; items will only
be appended */
-static size_t *SwigPtrTbl = 0; /* Sorted indirect table; items will
- be inserted */
+ size_t *PtrTbl;/* Sorted indirect table; items will 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 */
static int
@@ -217,34 +206,34 @@ swigsort (const void *data1, const void *data2)
{
size_t index1 = * (size_t *) data1;
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 */
-SWIGSTATIC size_t
+static size_t
SWIG_RegisterType (const char *type, const char *prettyname)
{
int i;
/* Allocate the pointer table if necessary */
- if (!SwigPtrList) {
- SwigPtrList = (SwigPtrType *) malloc(SwigPtrMax*sizeof(SwigPtrType));
- SwigPtrTbl = (size_t *) malloc(SwigPtrMax*sizeof(size_t));
- SwigPtrN = 0;
+ if (!SwigModule->PtrList) {
+ SwigModule->PtrList = (SwigPtrType *) malloc(SwigModule->PtrMax*sizeof(SwigPtrType));
+ SwigModule->PtrTbl = (size_t *) malloc(SwigModule->PtrMax*sizeof(size_t));
+ SwigModule->PtrN = 0;
}
/* Grow the table if necessary */
- if (SwigPtrN >= SwigPtrMax) {
- SwigPtrMax = 2*SwigPtrMax;
- SwigPtrList = (SwigPtrType *) realloc((char *) SwigPtrList,
- SwigPtrMax*sizeof(SwigPtrType));
- SwigPtrTbl = (size_t *) realloc((char *) SwigPtrTbl,
- SwigPtrMax*sizeof(size_t));
+ if (SwigModule->PtrN >= SwigModule->PtrMax) {
+ SwigModule->PtrMax = 2*SwigModule->PtrMax;
+ SwigModule->PtrList = (SwigPtrType *) realloc((char *) SwigModule->PtrList,
+ SwigModule->PtrMax*sizeof(SwigPtrType));
+ SwigModule->PtrTbl = (size_t *) realloc((char *) SwigModule->PtrTbl,
+ SwigModule->PtrMax*sizeof(size_t));
}
/* Look up type */
- for (i = 0; i < SwigPtrN; i++)
- if (strcmp(SwigPtrList[i].name,type) == 0) {
+ for (i = 0; i < SwigModule->PtrN; i++)
+ if (strcmp(SwigModule->PtrList[i].name,type) == 0) {
if (prettyname!=NULL)
- SwigPtrList[i].prettyname = prettyname;
+ SwigModule->PtrList[i].prettyname = prettyname;
return i;
}
{
@@ -253,20 +242,20 @@ SWIG_RegisterType (const char *type, const char *prettyname)
#if 0
fprintf(stderr, "New type: %s\n", type);
#endif
- tag = SwigPtrTbl[SwigPtrN] = SwigPtrN;
- t = &SwigPtrList[tag];
+ tag = SwigModule->PtrTbl[SwigModule->PtrN] = SwigModule->PtrN;
+ t = &SwigModule->PtrList[tag];
t->name = type;
t->prettyname = prettyname;
- t->tag = SwigPtrN;
+ t->tag = SwigModule->PtrN;
t->cast = NULL;
- SwigPtrN++;
- SwigPtrSort = 0;
+ SwigModule->PtrN++;
+ SwigModule->PtrSort = 0;
return tag;
}
}
/* Register two data types and their mapping with the type checker. */
-SWIGSTATIC void
+static void
SWIG_RegisterMapping (const char *origtype, const char *newtype,
swig_converter_func cast)
{
@@ -276,7 +265,7 @@ SWIG_RegisterMapping (const char *origtype, const char *newtype,
size_t t1 = SWIG_RegisterType(newtype, NULL);
struct SwigCast *c;
/* 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 (cast) c->cast = cast;
}
@@ -284,8 +273,8 @@ SWIG_RegisterMapping (const char *origtype, const char *newtype,
c = (struct SwigCast *) malloc(sizeof(struct SwigCast));
c->type = t1;
c->cast = cast;
- c->next = SwigPtrList[t].cast;
- SwigPtrList[t].cast = c;
+ c->next = SwigModule->PtrList[t].cast;
+ SwigModule->PtrList[t].cast = c;
}
}
}
@@ -295,9 +284,9 @@ SWIG_RegisterMapping (const char *origtype, const char *newtype,
static 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 */
- SwigPtrSort = 1;
+ SwigModule->PtrSort = 1;
}
/* Look up pointer-type entry in table */
@@ -307,16 +296,16 @@ swigcmp (const void *key, const void *data)
{
char *k = (char *) key;
size_t index = *(size_t *)data;
- return strcmp(k, SwigPtrList[index].name);
+ return strcmp(k, SwigModule->PtrList[index].name);
}
static SwigPtrType *
SWIG_GetPtrType (const char *_t)
{
size_t *result;
- if (!SwigPtrSort) SWIG_SortTable();
- result = (size_t *) bsearch(_t, SwigPtrTbl, SwigPtrN, sizeof(size_t), swigcmp);
- if (result!=NULL) return SwigPtrList+*result;
+ if (!SwigModule->PtrSort) SWIG_SortTable();
+ result = (size_t *) bsearch(_t, SwigModule->PtrTbl, SwigModule->PtrN, sizeof(size_t), swigcmp);
+ if (result!=NULL) return SwigModule->PtrList+*result;
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
datatype. */
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 */;
if (c) {
/* Get pointer value. */
@@ -351,7 +340,7 @@ SWIG_Cast (void *source, size_t source_type,
}
/* Dynamic pointer casting. Down an inheritance hierarchy */
-SWIGSTATIC swig_type_info *
+static swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
{
swig_type_info *lastty = ty;
@@ -365,18 +354,16 @@ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
/* Function for getting a pointer value */
-static unsigned long swig_tag = 0;
-
-SWIGSTATIC SCM
+static SCM
SWIG_Guile_MakePtr (void *ptr, swig_type_info *type)
{
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);
}
/* Return 0 if successful. */
-SWIGSTATIC int
+static int
SWIG_Guile_GetPtr(SCM s, void **result, swig_type_info *type)
{
if (SCM_NULLP(s)) {
@@ -384,7 +371,7 @@ SWIG_Guile_GetPtr(SCM s, void **result, swig_type_info *type)
return 0;
}
else if (SCM_NIMP(s)
- && (unsigned long) SCM_TYP16(s) == swig_tag) {
+ && (unsigned long) SCM_TYP16(s) == SwigModule->swig_tag) {
if (type)
return !SWIG_Cast((void *) SCM_CDR(s),
(long) SCM_CAR(s) >> 16,
@@ -397,7 +384,7 @@ SWIG_Guile_GetPtr(SCM s, void **result, swig_type_info *type)
return 1;
}
-SWIGSTATIC void *
+static void *
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
int argnum, const char *func_name)
{
@@ -415,9 +402,9 @@ static int
print_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
{
scm_puts((char *) "#<swig ", port);
- if (SwigPtrList[(long) SCM_CAR(swig_smob) >> 16].prettyname != NULL)
- scm_puts((char*) SwigPtrList[(long) SCM_CAR(swig_smob) >> 16].prettyname, port);
- else scm_puts((char*) SwigPtrList[(long) SCM_CAR(swig_smob) >> 16].name, port);
+ if (SwigModule->PtrList[(long) SCM_CAR(swig_smob) >> 16].prettyname != NULL)
+ scm_puts((char*) SwigModule->PtrList[(long) SCM_CAR(swig_smob) >> 16].prettyname, port);
+ else scm_puts((char*) SwigModule->PtrList[(long) SCM_CAR(swig_smob) >> 16].name, port);
scm_puts((char *) " ", port);
scm_intprint((long) SCM_CDR(swig_smob), 16, port);
scm_puts((char *) ">", port);
@@ -434,18 +421,27 @@ equalp_swig (SCM A, SCM B)
else return SCM_BOOL_F;
}
-SWIGSTATIC void
+static void
SWIG_Guile_Init (void)
{
- if (swig_tag == 0) {
- swig_tag = scm_make_smob_type_mfpe((char *) "swig", 0, NULL, NULL,
+ SCM pointer;
+
+ 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);
+ }
+ } else {
+ SwigModule = (struct swig_module_info *) gh_scm2ulong(pointer);
}
}
/* Convert datatype table */
-SWIGSTATIC
+static
void SWIG_Guile_RegisterTypes(swig_type_info **table,
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,
int reqargs, int optargs,
const char *procname)
@@ -489,7 +485,3 @@ SWIG_Guile_GetArgs (SCM *dest, SCM rest,
#ifdef __cplusplus
}
#endif
-
-/* guile.swg ends here */
-
-#endif
diff --git a/Lib/guile/guile_scm.swg b/Lib/guile/guile_scm.swg
index 28e778ab4..60bd58519 100644
--- a/Lib/guile/guile_scm.swg
+++ b/Lib/guile/guile_scm.swg
@@ -5,7 +5,6 @@
#define SWIGGUILE_SCM
-%runtime "precommon.swg"
%runtime "common.swg"
%runtime "guile_scm_run.swg"
diff --git a/Lib/guile/guile_scm_run.swg b/Lib/guile/guile_scm_run.swg
index 67c1daa28..bd6ba1148 100644
--- a/Lib/guile/guile_scm_run.swg
+++ b/Lib/guile/guile_scm_run.swg
@@ -48,42 +48,7 @@ typedef struct swig_guile_clientdata {
(char *) FUNC_NAME, (char *) msg, \
SCM_EOL, SCM_BOOL_F); else
-#ifdef SWIG_NOINCLUDE
-
-/* 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 *)
+static char *
SWIG_Guile_scm2newstr(SCM str, size_t *len) {
#define FUNC_NAME "SWIG_Guile_scm2newstr"
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_slot_ref(x, swig_symbol) : (x) )
-SWIGRUNTIME(SCM)
+static SCM
SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner)
{
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)
{
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);
}
-SWIGRUNTIME(swig_type_info *)
+static swig_type_info *
SWIG_Guile_PointerType(SCM object)
{
SCM smob = SWIG_Guile_GetSmob(object);
@@ -170,7 +135,7 @@ SWIG_Guile_PointerType(SCM object)
}
/* Return 0 if successful. */
-SWIGRUNTIME(int)
+static int
SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
{
swig_type_info *cast;
@@ -200,7 +165,7 @@ SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
return 1;
}
-SWIGRUNTIME(void *)
+static inline void *
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
int argnum, int flags, const char *func_name)
{
@@ -212,7 +177,7 @@ SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
return result;
}
-SWIGRUNTIME(int)
+static inline int
SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type)
{
void *result;
@@ -223,14 +188,14 @@ SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type)
else return 1;
}
-SWIGRUNTIME(int)
+static inline int
SWIG_Guile_IsPointer (SCM s)
{
return SWIG_Guile_IsPointerOfType (s, NULL);
}
/* Mark a pointer object non-collectable */
-SWIGRUNTIME(void)
+static void
SWIG_Guile_MarkPointerNoncollectable(SCM s)
{
SCM smob = SWIG_Guile_GetSmob(s);
@@ -243,7 +208,7 @@ SWIG_Guile_MarkPointerNoncollectable(SCM s)
}
/* Mark a pointer object destroyed */
-SWIGRUNTIME(void)
+static void
SWIG_Guile_MarkPointerDestroyed(SCM s)
{
SCM smob = SWIG_Guile_GetSmob(s);
@@ -339,7 +304,7 @@ ensure_smob_tag(SCM swig_module,
}
}
-SWIGRUNTIME(void)
+static void
SWIG_Guile_Init ()
{
SCM swig_module;
@@ -386,7 +351,7 @@ SWIG_Guile_Init ()
#endif
}
-SWIGRUNTIME(int)
+static int
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
int reqargs, int optargs,
const char *procname)
@@ -412,8 +377,6 @@ SWIG_Guile_GetArgs (SCM *dest, SCM rest,
return num_args_passed;
}
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/Lib/guile/precommon.swg b/Lib/guile/precommon.swg
deleted file mode 100644
index d7ab8f6a9..000000000
--- a/Lib/guile/precommon.swg
+++ /dev/null
@@ -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
-
diff --git a/Lib/mzscheme/mzscheme.swg b/Lib/mzscheme/mzscheme.swg
index a2a841974..de325456d 100644
--- a/Lib/mzscheme/mzscheme.swg
+++ b/Lib/mzscheme/mzscheme.swg
@@ -3,7 +3,6 @@
file. */
/* Include headers */
-%runtime "precommon.swg"
%runtime "common.swg"
%runtime "mzrun.swg"
diff --git a/Lib/mzscheme/precommon.swg b/Lib/mzscheme/precommon.swg
deleted file mode 100644
index 473450823..000000000
--- a/Lib/mzscheme/precommon.swg
+++ /dev/null
@@ -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
-
diff --git a/Lib/perl5/perl5.swg b/Lib/perl5/perl5.swg
index ea207afb3..4b7a68e51 100644
--- a/Lib/perl5/perl5.swg
+++ b/Lib/perl5/perl5.swg
@@ -4,25 +4,6 @@
* 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 "perlrun.swg" // Perl runtime functions
%runtime "noembed.h" // undefine Perl5 macros
@@ -602,9 +583,7 @@ XS(SWIG_init) {
int i;
static int _init = 0;
if (!_init) {
-#ifdef SWIG_DISABLE_RUNTIME
SWIG_Perl_LookupTypePointer();
-#endif
for (i = 0; swig_types_initial[i]; i++) {
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
}
diff --git a/Lib/perl5/perlrun.swg b/Lib/perl5/perlrun.swg
index 2f77ef586..4c8c35898 100644
--- a/Lib/perl5/perlrun.swg
+++ b/Lib/perl5/perlrun.swg
@@ -185,19 +185,7 @@ static void SWIG_Perl_LookupTypePointer() {
}
}
-#ifdef SWIG_NOINCLUDE
-
-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 *)
+static swig_type_info *
SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty) {
swig_type_info *s;
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 */
-SWIGRUNTIME(int)
+static int
SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
swig_type_info *tc;
void *voidptr = (void *)0;
@@ -285,7 +273,7 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *
return 0;
}
-SWIGRUNTIME(void)
+static void
SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
if (ptr && (flags & SWIG_SHADOW)) {
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) {
SV *result = sv_newmortal();
SWIG_MakePtr(result, ptr, t, flags);
return result;
}
-SWIGRUNTIME(void)
+static void
SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
char result[1024];
char *r = result;
@@ -333,7 +321,7 @@ SWIGRUNTIME(void)
}
/* 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_type_info *tc;
char *c = 0;
@@ -351,17 +339,17 @@ SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_
return 0;
}
-SWIGRUNTIME(void)
+static inline void
SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT const char *error) {
if (error) sv_setpv(perl_get_sv("@", TRUE), error);
}
-SWIGRUNTIME(void)
+static inline void
SWIG_Perl_SetErrorSV(SWIG_MAYBE_PERL_OBJECT SV *error) {
if (error) sv_setsv(perl_get_sv("@", TRUE), error);
}
-SWIGRUNTIME(void)
+static inline void
SWIG_Perl_SetErrorf(const char *fmt, ...) {
va_list args;
va_start(args, fmt);
@@ -369,8 +357,6 @@ SWIG_Perl_SetErrorf(const char *fmt, ...) {
va_end(args);
}
-#endif
-
/* Macros for low-level exception handling */
#define SWIG_fail goto fail
#define SWIG_croak(x) { SWIG_SetError(x); goto fail; }
diff --git a/Lib/perl5/precommon.swg b/Lib/perl5/precommon.swg
deleted file mode 100644
index 761bda60a..000000000
--- a/Lib/perl5/precommon.swg
+++ /dev/null
@@ -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
-
diff --git a/Lib/php4/php4.swg b/Lib/php4/php4.swg
index 35f35a362..8019ac44f 100644
--- a/Lib/php4/php4.swg
+++ b/Lib/php4/php4.swg
@@ -5,7 +5,6 @@
*
*/
-%runtime "precommon.swg"
%runtime "common.swg" // common type checking code
%runtime "php4run.swg" // Php4 runtime functions
%include "utils.i" // building blocks
diff --git a/Lib/php4/php4run.swg b/Lib/php4/php4run.swg
index 2dba64f1d..3d1c05a37 100644
--- a/Lib/php4/php4run.swg
+++ b/Lib/php4/php4run.swg
@@ -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
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) {
static char hex[17] = "0123456789abcdef";
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) {
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)
-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_object_wrapper *value=NULL;
/* 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
ptr calling making appropriate casting functions according to ty
We don't use this any more */
-SWIGRUNTIME(int)
+static int
SWIG_ConvertPtr_(char *c, void **ptr, swig_type_info *ty) {
register int d;
unsigned long p;
@@ -159,7 +159,7 @@ type_error:
SWIG_ZTS_ConvertResourcePtr which gets the type name from the resource
and the registered zend destructors for which we have one per type each
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_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
and type info from the resource in z. z must be a resource
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_object_wrapper *value;
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
or an OBJECT whose _cPtr is a string or resource pointing to the object
STRING pointers are very depracated */
-SWIGRUNTIME(int)
+static int
SWIG_ZTS_ConvertPtr(zval *z, void **ptr, swig_type_info *ty TSRMLS_DC) {
char *c;
zval *val;
diff --git a/Lib/php4/precommon.swg b/Lib/php4/precommon.swg
deleted file mode 100644
index 174661698..000000000
--- a/Lib/php4/precommon.swg
+++ /dev/null
@@ -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
-
diff --git a/Lib/pike/pikerun.swg b/Lib/pike/pikerun.swg
index 63af4c607..f112a0aed 100644
--- a/Lib/pike/pikerun.swg
+++ b/Lib/pike/pikerun.swg
@@ -30,15 +30,8 @@ typedef struct swig_object_wrapper {
#define SWIG_ConvertPtr SWIG_Pike_ConvertPtr
#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 */
-SWIGRUNTIME(int)
+static int
SWIG_Pike_ConvertPtr(struct object *obj, void **ptr, swig_type_info *ty, int flags) {
char *storage;
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 */
-SWIGRUNTIME(struct object *)
+static struct object *
SWIG_Pike_NewPointerObj(void *ptr, swig_type_info *type, int own) {
return 0;
}
-
-#endif
diff --git a/Lib/pike/precommon.swg b/Lib/pike/precommon.swg
deleted file mode 100644
index 5adafe186..000000000
--- a/Lib/pike/precommon.swg
+++ /dev/null
@@ -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
-
diff --git a/Lib/python/precommon.swg b/Lib/python/precommon.swg
deleted file mode 100644
index 9446ab378..000000000
--- a/Lib/python/precommon.swg
+++ /dev/null
@@ -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
-
diff --git a/Lib/python/pyinit.swg b/Lib/python/pyinit.swg
index a736b6dbb..6095af663 100644
--- a/Lib/python/pyinit.swg
+++ b/Lib/python/pyinit.swg
@@ -22,9 +22,7 @@ SWIGEXPORT(void) SWIG_init(void) {
d = PyModule_GetDict(m);
if (!typeinit) {
-#ifdef SWIG_DISABLE_RUNTIME
SWIG_Python_LookupTypePointer(&swig_type_list_handle);
-#endif
for (i = 0; swig_types_initial[i]; i++) {
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
}
diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg
index 3da4cd810..8c0270da8 100644
--- a/Lib/python/pyrun.swg
+++ b/Lib/python/pyrun.swg
@@ -12,37 +12,6 @@
extern "C" {
#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.
* ----------------------------------------------------------------------------- */
@@ -166,7 +135,7 @@ static PyTypeObject varlinktype = {
};
/* Create a variable linking object for use later */
-SWIGRUNTIME(PyObject *)
+static PyObject *
SWIG_Python_newvarlink(void) {
swig_varlinkobject *result = 0;
result = PyMem_NEW(swig_varlinkobject,1);
@@ -178,7 +147,7 @@ SWIG_Python_newvarlink(void) {
return ((PyObject*) result);
}
-SWIGRUNTIME(void)
+static void
SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
swig_varlinkobject *v;
swig_globalvar *gv;
@@ -196,7 +165,7 @@ SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int
* errors manipulation
* ----------------------------------------------------------------------------- */
-SWIGRUNTIME(void)
+static void
SWIG_Python_TypeError(const char *type, PyObject *obj)
{
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)
{
if (type) {
@@ -222,7 +191,7 @@ SWIG_Python_NullRef(const char *type)
}
}
-SWIGRUNTIME(int)
+static int
SWIG_Python_AddErrMesg(const char* mesg, int infront)
{
if (PyErr_Occurred()) {
@@ -247,7 +216,7 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront)
}
}
-SWIGRUNTIME(int)
+static int
SWIG_Python_ArgFail(int argnum)
{
if (PyErr_Occurred()) {
@@ -266,7 +235,7 @@ SWIG_Python_ArgFail(int argnum)
* ----------------------------------------------------------------------------- */
/* Convert a pointer value */
-SWIGRUNTIME(int)
+static int
SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
swig_type_info *tc;
char *c = 0;
@@ -376,7 +345,7 @@ type_error:
}
/* 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) {
void *result;
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 */
-SWIGRUNTIME(int)
+static int
SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty, int flags) {
swig_type_info *tc;
char *c = 0;
@@ -420,7 +389,7 @@ type_error:
}
/* Create a new pointer string */
-SWIGRUNTIME(char *)
+static char *
SWIG_Python_PointerStr(char *buff, void *ptr, const char *name, size_t bsz) {
char *r = buff;
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 */
-SWIGRUNTIME(PyObject *)
+static PyObject *
SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
PyObject *robj;
if (!ptr) {
@@ -466,7 +435,7 @@ SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
return robj;
}
-SWIGRUNTIME(PyObject *)
+static PyObject *
SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
char result[1024];
char *r = result;
@@ -483,7 +452,7 @@ SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
* ----------------------------------------------------------------------------- */
/* Install Constants */
-SWIGRUNTIME(void)
+static void
SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
int i;
PyObject *obj;
@@ -521,7 +490,7 @@ SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
}
/* Fix SwigMethods to carry the callback ptrs when needed */
-SWIGRUNTIME(void)
+static void
SWIG_Python_FixMethods(PyMethodDef *methods,
swig_const_info *const_table,
swig_type_info **types,
@@ -563,7 +532,7 @@ SWIG_Python_FixMethods(PyMethodDef *methods,
/* -----------------------------------------------------------------------------
* Lookup type pointer
* ----------------------------------------------------------------------------- */
-SWIGRUNTIME(void)
+static void
SWIG_Python_LookupTypePointer(swig_type_info ***type_list_handle) {
PyObject *module, *pointer;
void *type_pointer;
@@ -583,9 +552,6 @@ SWIG_Python_LookupTypePointer(swig_type_info ***type_list_handle) {
}
}
-#endif /* SWIG_NOINCLUDE */
-
-
#ifdef __cplusplus
}
#endif
diff --git a/Lib/python/pyruntime.swg b/Lib/python/pyruntime.swg
index f4af6ca21..d0a3d8514 100644
--- a/Lib/python/pyruntime.swg
+++ b/Lib/python/pyruntime.swg
@@ -4,25 +4,6 @@
#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) "pyapi.swg"; /* SWIG/Pyton API */
%insert(runtime) "pyrun.swg"; /* Python run-time code */
diff --git a/Lib/ruby/precommon.swg b/Lib/ruby/precommon.swg
deleted file mode 100644
index e2171ea34..000000000
--- a/Lib/ruby/precommon.swg
+++ /dev/null
@@ -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)
-
diff --git a/Lib/ruby/ruby.swg b/Lib/ruby/ruby.swg
index 320d599c8..0ceccd412 100644
--- a/Lib/ruby/ruby.swg
+++ b/Lib/ruby/ruby.swg
@@ -5,38 +5,8 @@
* ---------------------------------------------------------------------- */
%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"
-
-%insert(runtime) %{
-#ifdef SWIG_NOINCLUDE
-%}
-%runtime "rubydec.swg"
-%insert(runtime) %{
-#else
-%}
%runtime "rubydef.swg"
-%insert(runtime) %{
-#endif
-%}
#define %alias %feature("alias")
#define %freefunc %feature("freefunc")
diff --git a/Lib/ruby/rubydec.swg b/Lib/ruby/rubydec.swg
deleted file mode 100644
index 5789b9621..000000000
--- a/Lib/ruby/rubydec.swg
+++ /dev/null
@@ -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
diff --git a/Lib/ruby/rubydef.swg b/Lib/ruby/rubydef.swg
index d77d6bcc5..e8ac42dd9 100644
--- a/Lib/ruby/rubydef.swg
+++ b/Lib/ruby/rubydef.swg
@@ -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 */
#ifdef __cplusplus
extern "C" {
@@ -8,7 +33,7 @@ static VALUE _cSWIG_Pointer = Qnil;
static VALUE swig_runtime_data_type_pointer = Qnil;
/* Initialize Ruby runtime support */
-SWIGRUNTIME(void)
+static void
SWIG_Ruby_InitRuntime(void)
{
VALUE pointer;
@@ -17,7 +42,6 @@ SWIG_Ruby_InitRuntime(void)
_mSWIG = rb_define_module("SWIG");
}
-#ifdef SWIG_DISABLE_RUNTIME
/* first check if pointer already created */
pointer = rb_gv_get("$swig_runtime_data_type_pointer");
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);
rb_define_readonly_variable("$swig_runtime_data_type_pointer", &swig_runtime_data_type_pointer);
}
-#endif
}
/* Define Ruby class for C type */
-SWIGRUNTIME(void)
+static void
SWIG_Ruby_define_class(swig_type_info *type)
{
VALUE klass;
@@ -48,7 +71,7 @@ SWIG_Ruby_define_class(swig_type_info *type)
}
/* Create a new pointer object */
-SWIGRUNTIME(VALUE)
+static VALUE
SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int own)
{
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) */
-SWIGRUNTIME(VALUE)
+static VALUE
SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
{
VALUE obj;
@@ -85,7 +108,7 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
}
/* Get type mangle from class name */
-SWIGRUNTIME(char *)
+static char *
SWIG_Ruby_MangleStr(VALUE obj)
{
VALUE stype = rb_iv_get(obj, "__swigtype__");
@@ -93,7 +116,7 @@ SWIG_Ruby_MangleStr(VALUE obj)
}
/* Convert a pointer value */
-SWIGRUNTIME(int)
+static int
SWIG_Ruby_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags)
{
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 */
-SWIGRUNTIME(void *)
+static inline void *
SWIG_Ruby_MustGetPtr(VALUE obj, swig_type_info *ty, int argnum, int flags)
{
void *result;
@@ -144,7 +167,7 @@ SWIG_Ruby_MustGetPtr(VALUE obj, swig_type_info *ty, int argnum, int flags)
}
/* Check convert */
-SWIGRUNTIME(int)
+static inline int
SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
{
char *c = SWIG_MangleStr(obj);
@@ -153,7 +176,7 @@ SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
return SWIG_TypeCheck(c,ty) != 0;
}
-SWIGRUNTIME(VALUE)
+static VALUE
SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
char result[1024];
char *r = result;
@@ -165,7 +188,7 @@ SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
}
/* 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_type_info *tc;
char *c;
diff --git a/Lib/swig.swg b/Lib/swig.swg
index 0bc9cebc3..92fb048ca 100644
--- a/Lib/swig.swg
+++ b/Lib/swig.swg
@@ -271,16 +271,6 @@ namespace std {
%define SWIG_TYPECHECK_STRING_ARRAY 1140 %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
* returned by value. This is necessary to handle objects that define
diff --git a/Lib/tcl/precommon.swg b/Lib/tcl/precommon.swg
deleted file mode 100644
index 7a9f23811..000000000
--- a/Lib/tcl/precommon.swg
+++ /dev/null
@@ -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
-
diff --git a/Lib/tcl/swigtcl8.swg b/Lib/tcl/swigtcl8.swg
index 25f1277c6..6a7b7ef8e 100644
--- a/Lib/tcl/swigtcl8.swg
+++ b/Lib/tcl/swigtcl8.swg
@@ -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 */
static Tcl_HashTable swigobjectTable;
static int swigobjectTableinit = 0;
/* Acquire ownership of a pointer */
-SWIGRUNTIME(void)
+static void
SWIG_Tcl_Acquire(void *ptr) {
Tcl_HashEntry *entryPtr;
int newobj;
@@ -162,7 +139,7 @@ SWIG_Tcl_Acquire(void *ptr) {
}
/* Disown a pointer. Returns 1 if we owned it to begin with */
-SWIGRUNTIME(int)
+static int
SWIG_Tcl_Disown(void *ptr) {
Tcl_HashEntry *entryPtr;
if (!swigobjectTableinit) return 0;
@@ -174,7 +151,7 @@ SWIG_Tcl_Disown(void *ptr) {
return 0;
}
-SWIGRUNTIME(int)
+static inline int
SWIG_Tcl_Thisown(void *ptr) {
if (!swigobjectTableinit) return 0;
if (Tcl_FindHashEntry(&swigobjectTable, (char *) ptr)) {
@@ -184,7 +161,7 @@ SWIG_Tcl_Thisown(void *ptr) {
}
/* 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_type_info *tc;
/* 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 */
-SWIGRUNTIME(int)
+static inline int
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);
}
/* Convert a pointer value */
-SWIGRUNTIME(char *)
+static char *
SWIG_Tcl_PointerTypeFromString(char *c) {
char d;
/* 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 */
-SWIGRUNTIME(int)
+static int
SWIG_Tcl_ConvertPacked(Tcl_Interp *interp, Tcl_Obj *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
swig_type_info *tc;
char *c;
@@ -280,7 +257,7 @@ type_error:
/* 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) {
if (ptr) {
*(c++) = '_';
@@ -293,7 +270,7 @@ SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int flags) {
}
/* Create a new pointer object */
-SWIGRUNTIME(Tcl_Obj *)
+static Tcl_Obj *
SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
Tcl_Obj *robj;
char result[512];
@@ -302,7 +279,7 @@ SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
return robj;
}
-SWIGRUNTIME(Tcl_Obj *)
+static Tcl_Obj *
SWIG_Tcl_NewPackedObj(void *ptr, int sz, swig_type_info *type, int flags) {
char result[1024];
char *r = result;
@@ -318,7 +295,7 @@ static Tcl_HashTable swigconstTable;
static int swigconstTableinit = 0;
/* Install Constants */
-SWIGRUNTIME(void)
+static void
SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
int i;
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) {
Tcl_HashEntry *entryPtr;
if (!swigconstTableinit) return 0;
@@ -371,7 +348,7 @@ SWIG_Tcl_GetConstant(const char *key) {
}
/* Get arguments */
-SWIGRUNTIME(int)
+static int
SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fmt, ...) {
int argno = 0, opt = 0;
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_instance *si = (swig_instance *) clientData;
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 */
-SWIGRUNTIME(int)
+static int
SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST _objv[]) {
char *method, *attrname;
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 */
-SWIGRUNTIME(int)
+static int
SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
Tcl_Obj *newObj = 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 */
-SWIGRUNTIME(Tcl_Obj *)
+static Tcl_Obj *
SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *type, int flags) {
Tcl_Obj *robj = SWIG_NewPointerObj(thisvalue, type,0);
/* 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;
}
-#endif
-
/* Structure for command table */
typedef struct {
const char *name;
diff --git a/Lib/tcl/tcl8.swg b/Lib/tcl/tcl8.swg
index 6739c4445..f8575da47 100644
--- a/Lib/tcl/tcl8.swg
+++ b/Lib/tcl/tcl8.swg
@@ -4,25 +4,6 @@
* 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 "swigtcl8.swg"
@@ -664,9 +645,7 @@ SWIGEXPORT(int) SWIG_init(Tcl_Interp *interp) {
Tcl_Eval(interp, "namespace eval " SWIG_namespace " { }");
#endif
if (!_init) {
-#ifdef SWIG_DISABLE_RUNTIME
SWIG_Tcl_LookupTypePointer(interp);
-#endif
for (i = 0; swig_types_initial[i]; i++) {
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
}
diff --git a/Source/Modules/csharp.cxx b/Source/Modules/csharp.cxx
index fb142630f..c6e3b7374 100644
--- a/Source/Modules/csharp.cxx
+++ b/Source/Modules/csharp.cxx
@@ -244,10 +244,6 @@ class CSHARP : public Language {
Swig_banner(f_runtime); // Print the SWIG banner message
- if (NoInclude) {
- Printf(f_runtime,"#define SWIG_NOINCLUDE\n");
- }
-
String *wrapper_name = NewString("");
Printf(wrapper_name, "CSharp_%%f", imclass_name);
diff --git a/Source/Modules/guile.cxx b/Source/Modules/guile.cxx
index 58fc5f920..d0a1847b5 100644
--- a/Source/Modules/guile.cxx
+++ b/Source/Modules/guile.cxx
@@ -359,10 +359,6 @@ public:
/* Write out directives and declarations */
- if (NoInclude) {
- Printf(f_runtime, "#define SWIG_NOINCLUDE\n");
- }
-
module = Swig_copy_string(Char(Getattr(n,"name")));
if (CPlusPlus) {
diff --git a/Source/Modules/java.cxx b/Source/Modules/java.cxx
index 1eba32cfe..ff1977e2e 100644
--- a/Source/Modules/java.cxx
+++ b/Source/Modules/java.cxx
@@ -350,10 +350,6 @@ class JAVA : public Language {
Swig_banner(f_runtime); // Print the SWIG banner message
- if (NoInclude) {
- Printf(f_runtime,"#define SWIG_NOINCLUDE\n");
- }
-
if (directorsEnabled()) {
Printf(f_runtime,"#define SWIG_DIRECTORS\n");
diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
index be5467662..161c7f415 100644
--- a/Source/Modules/main.cxx
+++ b/Source/Modules/main.cxx
@@ -34,7 +34,6 @@ char cvsroot_main_cxx[] = "$Header$";
int ForceExtern = 0; // Force extern mode
int GenerateDefault = 1; // Generate default constructors
char *Config = 0;
- int NoInclude = 0;
int Verbose = 0;
int NoExtern = 0;
int NoExcept = 0;
@@ -79,10 +78,8 @@ static const char *usage2 = (const char*)"\
-nodirprot - Do not wrap director protected members\n\
-noexcept - Do not wrap exception specifiers\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\
-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\
-swiglib - Report location of SWIG library and exit\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_virtual_elimination_mode_set(1);
Swig_mark_arg(i);
- } else if ((strcmp(argv[i],"-noruntime") == 0) || (strcmp(argv[i],"-c") == 0)) {
- NoInclude=1;
- Preprocessor_define((DOH *) "SWIG_NOINCLUDE 1", 0);
+ } else if ((strcmp(argv[i],"-noruntime") == 0) ||
+ (strcmp(argv[i],"-c") == 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_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)) {
GenerateDefault = 1;
Swig_mark_arg(i);
diff --git a/Source/Modules/modula3.cxx b/Source/Modules/modula3.cxx
index 7e7f4b649..cf95f4540 100644
--- a/Source/Modules/modula3.cxx
+++ b/Source/Modules/modula3.cxx
@@ -1016,10 +1016,6 @@ MODULA3 ():
Swig_banner (f_runtime); // Print the SWIG banner message
- if (NoInclude) {
- Printf (f_runtime, "#define SWIG_NOINCLUDE\n");
- }
-
String *wrapper_name = NewString ("");
Printf (wrapper_name, "Modula3_%%f", m3raw_name);
diff --git a/Source/Modules/ocaml.cxx b/Source/Modules/ocaml.cxx
index a80198f3d..0cc5cd0ff 100755
--- a/Source/Modules/ocaml.cxx
+++ b/Source/Modules/ocaml.cxx
@@ -279,10 +279,6 @@ public:
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 */
Printf(f_enumtypes_type,"type c_enum_type = [ \n `unknown\n" );
diff --git a/Source/Modules/perl5.cxx b/Source/Modules/perl5.cxx
index 9c10d55a4..c90e6c345 100644
--- a/Source/Modules/perl5.cxx
+++ b/Source/Modules/perl5.cxx
@@ -214,10 +214,6 @@ public:
Swig_banner(f_runtime);
- if (NoInclude) {
- Printf(f_runtime,"#define SWIG_NOINCLUDE\n");
- }
-
module = Copy(Getattr(n,"name"));
/* If we're in blessed mode, change the package name to "packagec" */
diff --git a/Source/Modules/pike.cxx b/Source/Modules/pike.cxx
index 41a26ddb7..32a0450ea 100644
--- a/Source/Modules/pike.cxx
+++ b/Source/Modules/pike.cxx
@@ -135,9 +135,6 @@ public:
/* Standard stuff for the SWIG runtime section */
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_name \"%s\"\n\n", module);
diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx
index ca8acd705..89b312006 100644
--- a/Source/Modules/python.cxx
+++ b/Source/Modules/python.cxx
@@ -221,8 +221,6 @@ public:
Swig_banner(f_runtime);
Printf(f_runtime,"#define SWIGPYTHON\n");
- if (NoInclude)
- Printf(f_runtime,"#define SWIG_NOINCLUDE\n");
if (directorsEnabled()) {
Printf(f_runtime,"#define SWIG_DIRECTORS\n");
diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx
index f1d890563..975c31402 100644
--- a/Source/Modules/ruby.cxx
+++ b/Source/Modules/ruby.cxx
@@ -397,10 +397,6 @@ public:
Swig_banner(f_runtime);
- if (NoInclude) {
- Printf(f_runtime, "#define SWIG_NOINCLUDE\n");
- }
-
if (directorsEnabled()) {
Printf(f_runtime,"#define SWIG_DIRECTORS\n");
}
diff --git a/Source/Modules/swigmod.h b/Source/Modules/swigmod.h
index 05c3bc15b..aa867b558 100644
--- a/Source/Modules/swigmod.h
+++ b/Source/Modules/swigmod.h
@@ -40,7 +40,6 @@ extern int line_number;
extern int start_line;
extern int CPlusPlus; // C++ mode
extern int Extend; // Extend mode
-extern int NoInclude; // NoInclude flag
extern int Verbose;
extern int IsVirtual;
extern int ImportMode;
diff --git a/Source/Modules/tcl8.cxx b/Source/Modules/tcl8.cxx
index 3407e3337..1b1e0ebc6 100644
--- a/Source/Modules/tcl8.cxx
+++ b/Source/Modules/tcl8.cxx
@@ -158,11 +158,6 @@ public:
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 */
module = NewStringf("%(lower)s", Getattr(n,"name"));