OK, this one isn''t working so well as I hoped. This is generally the
right solution but there are problems with our wrapping that this
exposes. Stick with the previous one for now.
Roy
Roy Sutton wrote:> This patch implements a more generic solution to the problem that will
> work for all our integer types at least. Use this instead of the last
> version I sent, please.
>
> Roy
> ------------------------------------------------------------------------
>
> Index: wxruby2/swig/typemap.i
> ==================================================================> ---
wxruby2/swig/typemap.i (revision 574)
> +++ wxruby2/swig/typemap.i (working copy)
> @@ -21,6 +21,13 @@
>
> %include "typemaps.i"
>
> +%typemap(directorargout) ( int * OUTPUT ) {
> + if($1 != NULL)
> + *$1 = (int)NUM2INT(rb_ary_shift(result));
> + else
> + rb_ary_shift(result); // Guess we should shift it anyhow!
> +}
> +
> /*
> Currently incompatible with the ruby post-processing of swigged .cpp files
> Needs to be fixed in fixdeleting.rb before this can be uncommented out
> @@ -454,3 +461,5 @@
> %typemap(out) wxSystemMetric {
> $result = INT2NUM((int)$1);
> }
> +
> +%apply int *OUTPUT { int * x , int * y , int * w, int * h };
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> wxruby-users mailing list
> wxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users