Skip to content

Commit 12a43ed

Browse files
author
Dave Beazley
committed
The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
1 parent 5fcae5e commit 12a43ed

File tree

1,508 files changed

+125431
-32479
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,508 files changed

+125431
-32479
lines changed

.cvsignore

+3
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ Makefile
33
swig
44
*.tar.gz
55
configure
6+
swig.spec
7+
autom4te.cache
8+
.gdbinit

ANNOUNCE

+51-50
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,74 @@
1+
*** ANNOUNCE: SWIG 1.3.16 ***
12

2-
*** ANNOUNCE : SWIG1.3 (Alpha 5) ***
3+
http://www.swig.org
34

4-
September 22, 2000
5+
October 14, 2002
56

6-
Overview
7-
--------
8-
We're pleased to announce the next installment of the SWIG1.3
9-
redevelopment effort. This release represents a reasonably stable
10-
snapshot of the CVS repository that has undergone extensive testing
11-
and debugging. However, this release also represents work in progress
12-
so there may be obscure bugs and problems that we haven't found yet.
13-
Please send us your feedback.
7+
We're pleased to announce SWIG 1.3.16, the latest installment in the
8+
SWIG development effort. SWIG-1.3.16 is mostly a bug-fix release to
9+
SWIG-1.3.15.
10+
11+
What is SWIG?
12+
-------------
13+
SWIG is a software development tool that reads C/C++ header files and
14+
generates the wrapper code needed to make C and C++ code accessible
15+
from other languages including Perl, Python, Tcl, Ruby, PHP, Java,
16+
Guile, Mzscheme, and Ocaml. Major applications of SWIG include
17+
generation of scripting language extension modules, rapid prototyping,
18+
testing, and user interface development for large C/C++ systems.
1419

1520
Availability:
1621
-------------
1722
The release is available for download on Sourceforge at
1823

19-
http://download.sourceforge.net/swig/swig1.3a5.tar.gz
20-
21-
What's new?
22-
-----------
23-
On the surface, this release still looks a lot like SWIG1.1p5 except
24-
that a lot of bugs have been fixed and the language modules tend to
25-
generate smaller and more efficient wrappers. New modules have also
26-
been added to support Ruby and Mzscheme. In addition, Python, Perl,
27-
and Guile support has been enhanced to support new releases such as
28-
Python1.6 and Perl5.6.
29-
30-
Under the hood, you will find that this release is an almost complete
31-
reimplementation of SWIG's internals. In fact the only code that
32-
still remains from SWIG1.1 is the C/C++ parser and the language
33-
modules (all of which have undergone significant changes as well). As
34-
a result, a lot of minor improvements can be found throughout the
35-
system and things that used to cause problems may now work (for
36-
instance, pointers to functions are now supported). In addition, this
37-
release incorporates a number of feature requests that have been made
38-
on the mailing list.
39-
40-
What's broken?
41-
--------------
42-
As this is a work in progress, a number of features are still missing
43-
or incomplete. The documentation system is still missing and won't be
44-
reimplemented for some time. The Java module is also temporarily out
45-
of service for this release. In addition, C++ programmers who make
46-
extensive use of typemaps may encounter a few strange problems
47-
(although SWIG will generate warning messages).
24+
http://prdownloads.sourceforge.net/swig/swig-1.3.16.tar.gz
25+
26+
Within the next day, a Windows version will also be made available at
27+
28+
http://prdownloads.sourceforge.net/swig/swigwin-1.3.16.zip
29+
30+
Release numbers
31+
---------------
32+
With SWIG1.3, we are adopting an odd/even version numbering scheme for
33+
SWIG. Odd version numbers (1.3, 1.5, 1.7, etc...) are considered to
34+
be development releases. Even numbers (1.4,1.6,1.8) are stable
35+
releases. The current 1.3 effort is working to produce a stable 2.0
36+
release. A stable 2.0 release will not be made until it can
37+
accompanied by fully updated documentation. In the meantime, we will
38+
continue to make periodic 1.3.x releases.
4839

4940
We need your help!
5041
------------------
51-
Even if you are perfectly happy with SWIG1.1, we can use your
42+
Even if you are perfectly happy with SWIG1.1, we can still use your
5243
feedback. First, we like to know about compilation problems and other
5344
issues concerning the building of SWIG. Second, if SWIG1.3 is unable
5445
to compile your old interface files, we would like to get information
5546
about the features you are using. This information will help us find
5647
bugs in the SWIG1.3 release, develop techniques for supporting
5748
backwards compatibility, and write documentation that addresses
5849
specific issues related to migrating from SWIG1.1 to SWIG1.3.
59-
Finally, we are still looking for volunteers to work on aspects of
60-
SWIG development. Please send email to [email protected] for
61-
details.
50+
51+
We are also looking for volunteers who would like to work on various
52+
aspects of SWIG development. SWIG is an unfunded project that would
53+
not exist without volunteers. We are also looking for the developers
54+
of other SWIG language modules. If you have developed a SWIG module
55+
and would like to see it incorporated into the new release, please
56+
contact us to obtain SWIG-CVS access. We are also more than willing
57+
to help port your module from SWIG1.1 to SWIG1.3. Please send email
58+
to [email protected] for further information.
6259

6360
Please report problems with this release to [email protected].
6461

6562
--- The SWIG Developers
6663

67-
David Beazley
68-
Thien-Thi Nguyen
69-
Matthias K�ppe
70-
Masaki Fukushima
71-
Harco de Hilster
72-
Loic Dachary
73-
Oleg Tolmatcev
64+
65+
66+
67+
68+
69+
70+
71+
72+
73+
74+

CHANGES.current

+232
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
Version 1.3.17 (November 22, 2002)
2+
==================================
3+
11/19/2002: beazley
4+
Fixed [ 613922 ] preprocessor errors with HAVE_LONG_LONG.
5+
6+
11/19/2002: beazley
7+
Fixed [ 615480 ] mzscheme SWIG_MustGetPtr_.
8+
9+
11/19/2002: beazley
10+
Fixed [ 635119 ] SWIG_croak causes compiler warning.
11+
12+
11/16/2002: cheetah (William Fulton)
13+
[Java] Added typemaps for pointers to class members.
14+
15+
11/15/2002: cheetah (William Fulton)
16+
[Java] Bug fix: Overloaded C++ functions which cannot be overloaded in Java
17+
once again issue a warning.
18+
19+
11/14/2002: cheetah (William Fulton)
20+
[Java] Handling of NULL pointers is improved. A java null object will now
21+
be translated to and from a NULL C/C++ pointer by default. Previously when
22+
wrapping:
23+
24+
class SomeClass {...};
25+
void foo(SomeClass *s);
26+
27+
and it was called from Java with null:
28+
29+
modulename.foo(null)
30+
31+
a Java NullPointerException was thrown. Extra typemaps had to be written in
32+
order to obtain a NULL pointer to pass to functions like this one. Now the
33+
default wrapping will detect 'null' and translate it into a NULL pointer.
34+
Also if a function returns a NULL pointer, eg:
35+
36+
SomeClass *bar() { return NULL; }
37+
38+
Then this used to be wrapped with a SomeClass proxy class holding a NULL
39+
pointer. Now null is returned instead. These changes are subtle but useful.
40+
The original behaviour can be obtained by using the original typemaps:
41+
42+
%typemap(javaout) SWIGTYPE {
43+
return new $&javaclassname($jnicall, true);
44+
}
45+
%typemap(javaout) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] {
46+
return new $javaclassname($jnicall, $owner);
47+
}
48+
%typemap(javagetcptr) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] %{
49+
protected static long getCPtr($javaclassname obj) {
50+
return obj.swigCPtr;
51+
}
52+
%}
53+
54+
*** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
55+
56+
57+
11/12/2002: beazley
58+
Fixed problem with abstract methods and signatures. For example:
59+
60+
class abstract_foo {
61+
public:
62+
virtual int meth(int meth_param) = 0;
63+
};
64+
65+
66+
class abstract_bar : public abstract_foo {
67+
public:
68+
int meth(int meth_param_1, int meth_param_2) { return 0; }
69+
};
70+
71+
In this case, abstract_bar is still abstract.
72+
73+
Fixes [ 628438 ] Derived abstract class not abstract.
74+
Reported and patched by Scott Michel.
75+
76+
11/11/2002: beazley
77+
Fixed a matching problem with typemaps and array dimensions. For example, if you
78+
had this:
79+
80+
typedef char blah[20];
81+
82+
and a typemap:
83+
84+
%typemap() char [ANY] {
85+
... $1_dim0 ...
86+
}
87+
88+
then $1_dim* variables weren't be expanded properly. It should work now.
89+
Problem reported by Pankaj Kumar Goel.
90+
91+
11/07/2002: mkoeppe
92+
Added an experimental new module that dumps SWIG's parse
93+
tree as (Common) Lisp s-expressions. The module is
94+
invoked with SWIG's -sexp command-line switch. The output
95+
can be read into Common Lisp. There is (prototype)
96+
example Lisp code that generates Foreign Function Interface
97+
definitions for use with Kevin Rosenberg's UFFI.
98+
99+
*** EXPERIMENTAL NEW FEATURE ***
100+
101+
11/07/2002: mkoeppe
102+
Removed duplicate declaration of "cpp_template_decl" in
103+
parser.y; bison 1.75 complained.
104+
105+
11/06/2002: cheetah (William Fulton)
106+
[Java] Default primitive array handling has changed like arrays of classes.
107+
C primitive arrays are no longer wrapped by a Java array but with a pointer
108+
(type wrapper class). Again the changes have been made for efficiency reasons.
109+
The original typemaps have been moved into arrays_java.i, so the original
110+
behaviour can be obtained merely including this file:
111+
112+
%include "arrays_java.i"
113+
114+
The array support functions are no longer generated by default. They are only
115+
generated when including this file, thus this often unused code is only
116+
generated when specifically requiring this type of array support.
117+
118+
*** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
119+
120+
11/05/2002: ljohnson (Lyle Johnson)
121+
[Ruby] Added support for nested module declarations (as was
122+
previously added for the Perl module). So a %module directive
123+
of the form:
124+
125+
%module "Outer::Inner::Foo"
126+
127+
will nest everything as (in Ruby code):
128+
129+
module Outer
130+
module Inner
131+
module Foo
132+
# stuff goes here
133+
end
134+
end
135+
end
136+
137+
11/05/2002: mkoeppe
138+
[MzScheme] Add an argument (-declaremodule) that generates
139+
code to correctly declare a primitive module extension.
140+
Patch submitted by Bruce Butterfield.
141+
142+
11/02/2002: cheetah (William Fulton)
143+
[Java] Added patch submitted by Michael Cahill to remove unused parameter
144+
warnings for the jenv and cls parameters. This patch also also allows one
145+
to use "void" in the jni typemap for any type without code being generated
146+
attempting to return a value.
147+
148+
10/29/2002: cheetah (William Fulton)
149+
[Java] Array handling is different. Arrays of classes are no longer wrapped
150+
with proxy arrays, eg wrapping
151+
152+
class X {...};
153+
X foo[10];
154+
155+
used to be wrapped with these Java getters and setters:
156+
157+
public static void setFoo(X[] value) {...}
158+
public static X[] getFoo() {...}
159+
160+
This approach is very inefficient as the entire array is copied numerous
161+
times on each invocation of the getter or setter. These arrays are now
162+
wrapped with a pointer so it is only possible to access the first array element
163+
using a proxy class:
164+
165+
public static void setFoo(X value) {...}
166+
public static X getFoo() {...}
167+
168+
Arrays of enums have also been similarly changed. This behaviour is now like the
169+
other SWIG language's implementation and the array library should be used to
170+
access the other elements. The original behaviour can be achieved using the
171+
macros and typemaps in arrays_java.i, for example:
172+
173+
%include "arrays_java.i"
174+
JAVA_ARRAYSOFCLASSES(X)
175+
class X {...};
176+
X foo[10];
177+
178+
*** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
179+
180+
10/29/2002: cheetah (William Fulton)
181+
[Java] Two new typemaps javain and javaout for generating the proxy class
182+
and type wrapper class method calls to the JNI class. The new typemaps are
183+
really used for transforming the jstype (used in proxy class and type wrapper
184+
classes) to the jtype (used in the JNI class) and visa versa. A javain typemap
185+
is required whenever an in typemap is written and similarly javaout for an out
186+
typemap. An example is probably best to show them working:
187+
188+
%typemap(javain) Class "Class.getCPtr($javainput)"
189+
%typemap(javain) unsigned short "$javainput"
190+
%typemap(javaout) Class * {
191+
return new Class($jnicall, $owner);
192+
}
193+
194+
%inline %{
195+
class Class {};
196+
Class * bar(Class cls, unsigned short ush) { return new Class(); };
197+
%}
198+
199+
The generated proxy code is then:
200+
201+
public static Class bar(Class cls, int ush) {
202+
return new Class(exampleJNI.bar(Class.getCPtr(cls), ush), false);
203+
}
204+
205+
206+
Some new special variables have been introduced in order to use these typemaps.
207+
Here $javainput has been replaced by 'cls' and 'ush'. $jnicall has been replaced by
208+
the native method call, 'exampleJNI.bar(...)' and $owner has been replaced by 'false'.
209+
$javainput is analogous to the $input special variable. It is replaced by the parameter name.
210+
$jnicall is analogous to $action in %exception. It is replaced by the call to the native
211+
method in the JNI class.
212+
$owner is replaced by either true if %newobject has been used otherwise false.
213+
214+
The java.swg file contains default javain and javout typemaps which will produce the same code
215+
as previously. This change is only of concern to those who have written their own typemaps as
216+
you will then most likely have to write your own javain and javaout typemaps.
217+
218+
The javaout typemap also makes it possible to use a Java downcast to be used on abstract
219+
proxy base classes. See the Java documentation on dynamic_cast.
220+
221+
*** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
222+
223+
10/24/2002: ttn
224+
[Methodology] Upgaded to libtool 1.4.3, presumably w/ better
225+
support for newish platforms (like MacOS X).
226+
227+
10/21/2002: ttn
228+
Fixed Runtime/Makefile.in bug -- thanks to Richard Calmbach.
229+
230+
10/18/2002: ttn
231+
Fixed typo in doh.h -- thanks to Max Horn.
232+

Doc/engineering.html renamed to Doc/Devel/engineering.html

+4-9
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,10 @@ <h2>2. Programming Languages and Libraries </h2>
8181

8282
All SWIG modules must be written in either ANSI C or one of the
8383
scripting languages for which SWIG can generate an interface (e.g.,
84-
Perl, Python, or Tcl). <B>C++ is NOT an acceptable alternative and
85-
will not be utilized for any future development due to the fact that
86-
it is too complicated, too dogmatic, too problematic, and that Dave
87-
would rather take a bullet to the head than write one more line of
88-
code in this most decidedly unpleasant language. </B> Rare exceptions
89-
to this rule may be made if there is a justifiable need to interface
90-
an existing piece of software written in C++ into the SWIG module
91-
system. Anyone who finds this rule to be unreasonable is more than
92-
welcome to go write their own wrapper generator--so there.
84+
Perl, Python, or Tcl). C++ is currently being used to write
85+
SWIG modules, but it is only being utilized to avoid working with
86+
a lot of pointers to functions. <b>Advanced C++ features like namespaces, templates,
87+
and overloading should not be used.</b>.
9388

9489
<p>
9590
Module writers should make every attempt to use only those functions

Doc/index.html renamed to Doc/Devel/index.html

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
This directory contains SWIG documentation:
88

99
<ul>
10-
<li><a href="whitepaper.html">Project Overview Whitepaper</a>
1110
<li><a href="engineering.html">Engineering Manual</a>
1211
<li><a href="internals.html">Internals Manual</a>
1312
<li><a href="migrate.txt">SWIG1.3 Migration Guide</a>

0 commit comments

Comments
 (0)