Update of /cvsroot/fxruby/FXRuby/swig-interfaces
In directory usw-pr-cvs1:/tmp/cvs-serv5321/swig-interfaces
Modified Files:
Tag: release10
typemaps.i
Log Message:
Fix for SF Bug #550349. For functions that have input arguments of
type "const FXString&" but also specify a default argument value which
is a literal string, e.g.
void somefunc(const FXString& title = "Hello");
the previous typemap I had was not working properly. The new one should.
Index: typemaps.i
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/swig-interfaces/typemaps.i,v
retrieving revision 1.35.2.2
retrieving revision 1.35.2.3
diff -C2 -d -r1.35.2.2 -r1.35.2.3
*** typemaps.i 25 Apr 2002 22:29:03 -0000 1.35.2.2
--- typemaps.i 29 Apr 2002 22:23:41 -0000 1.35.2.3
***************
*** 39,52 ****
/* Convert Ruby string to const FXString& */
! %typemap(ruby, in) const FXString& {
if ($input != Qnil) {
Check_Type($input, T_STRING);
! $1 = new FXString(STR2CSTR($input));
} else {
! $1 = new FXString;
}
}
-
- %typemap(ruby, freearg) const FXString& "delete $1;";
/* Convert Ruby true and false to FXbool inputs */
--- 39,51 ----
/* Convert Ruby string to const FXString& */
! %typemap(ruby, in) const FXString& (SwigValueWrapper<FXString> p) {
if ($input != Qnil) {
Check_Type($input, T_STRING);
! p = FXString(STR2CSTR($input));
} else {
! p = FXString::null;
}
+ $1 = &p;
}
/* Convert Ruby true and false to FXbool inputs */
|