Remove integers_runme.ss because Chicken does not test for integer overflow
Fixes to get apply_strings.i to work in the testsuite Minor documentation updates git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9170 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
546723d379
commit
b3cc02cfd0
5 changed files with 15 additions and 12 deletions
|
|
@ -1,6 +1,12 @@
|
|||
Version 1.3.30 (in progress)
|
||||
============================
|
||||
|
||||
06/20/2006: wuzzeb (John Lenz)
|
||||
[Chicken]
|
||||
Minor fixes to get apply_strings.i testsuite to pass
|
||||
Remove integers_runme.scm from the testsuite, because SWIG and Chicken does
|
||||
handle overflows.
|
||||
|
||||
06/17/2006: olly
|
||||
[php] Added some missing keywords to the PHP4 keyword list, and
|
||||
fixed __LINE__ and __FILE__ which were in the wrong category.
|
||||
|
|
|
|||
|
|
@ -548,7 +548,9 @@ all the modules.</p>
|
|||
<a href="SWIGPlus.html#SWIGPlus_default_args">%feature(compactdefaultargs)</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p>TinyCLOS has a limitation such that generic methods do not properly work on methods
|
||||
<h3><a name="Chicken_nn19"></a>18.7.1 TinyCLOS problems with Chicken version <= 1.92</h3>
|
||||
|
||||
<p>In Chicken versions equal to or below 1.92, TinyCLOS has a limitation such that generic methods do not properly work on methods
|
||||
with different number of specializers: TinyCLOS assumes that every method added to a generic function
|
||||
will have the same number of specializers. SWIG generates functions with different lengths of specializers
|
||||
when C/C++ functions are overloaded. For example, the code</p>
|
||||
|
|
@ -571,13 +573,12 @@ int foo(int a);
|
|||
<p>Using unpatched TinyCLOS, the second <code>(define-method)</code> will replace the first one,
|
||||
so calling <code>(foo 3 f)</code> will produce an error.</p>
|
||||
|
||||
<p>There are two solutions to this: the
|
||||
<p>There are three solutions to this. The easist is to upgrade to the latest Chicken version. Otherwise, the
|
||||
file <tt>Lib/chicken/tinyclos-multi-generic.patch</tt> in the SWIG source contains a patch against
|
||||
tinyclos.scm inside the chicken source to add support into TinyCLOS for multi-argument generics.
|
||||
tinyclos.scm inside the 1.92 chicken source to add support into TinyCLOS for multi-argument generics. (This patch was accepted into Chicken)
|
||||
This requires chicken to be rebuilt and custom install of chicken. An alternative is the <tt>Lib/chicken/multi-generic.scm</tt>
|
||||
file in the SWIG source. This file can be loaded after TinyCLOS is loaded, and it will override some functions
|
||||
inside TinyCLOS to correctly support multi-argument generics. This solution will work on any install of chicken.
|
||||
Please see the comments at the top of both files for more information.</p>
|
||||
inside TinyCLOS to correctly support multi-argument generics. Please see the comments at the top of both files for more information.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
(load "integers.so")
|
||||
(define-macro (throws-exception? form)
|
||||
`(condition-case (begin ,form #f)
|
||||
((exn) #t)))
|
||||
|
||||
(include "../schemerunme/integers.scm")
|
||||
|
|
@ -335,7 +335,7 @@ SIMPLE_TYPEMAP(double, C_c_double, C_flonum, C_swig_is_number, (double), C_SIZEO
|
|||
$result = C_SCHEME_FALSE;
|
||||
}
|
||||
else {
|
||||
int string_len = strlen ($1);
|
||||
int string_len = strlen ((char *) ($1));
|
||||
C_word *string_space = C_alloc (C_SIZEOF_STRING (string_len));
|
||||
$result = C_string (&string_space, string_len, s);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
;; This file is no longer neccissary with Chicken versions avove 1.92
|
||||
;;
|
||||
;; This file overrides two functions inside TinyCLOS to provide support
|
||||
;; for multi-argument generics. There are many ways of linking this file
|
||||
;; into your code... all that needs to happen is this file must be
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue