--- ./Gtk/gtk-0.99.typemap.orig 2013-10-05 11:49:16.000000000 +0400 +++ ./Gtk/gtk-0.99.typemap 2013-10-05 11:50:55.000000000 +0400 @@ -62,8 +62,8 @@ } while(0) T_GtkPTROBJOrNULL - $var = SvTRUE($arg) ? Cast$type(SvGtkObjectRef($arg, \"" . ($foo=$ntype,$foo=~s/_OrNULL//,$foo). "\")) : 0 - + $var = SvTRUE($arg) ? Cast$type(SvGtkObjectRef($arg, \"" . (our $foo=$ntype,$foo=~s/_OrNULL//,$foo). "\")) : 0 + T_GtkPTROBJUp $var = Cast$type(SvGtkObjectRef($arg, \"${ntype}\")) @@ -95,14 +95,14 @@ do { if (!$arg || !SvOK($arg)) croak(\"$var is not of type ${ntype}\"); - $var = Sv" . ($foo=$ntype, $foo=~s/://g, $foo=~s/^GtkGdk/Gdk/, $foo) . "($arg); + $var = Sv" . (our $foo=$ntype, $foo=~s/://g, $foo=~s/^GtkGdk/Gdk/, $foo) . "($arg); } while (0) T_SimpleValOrNULL - $var = ($arg && SvOK($arg)) ? Sv" . ($foo=$ntype, $foo=~s/://g, $foo=~s/^GtkGdk/Gdk/, $foo=~s/_OrNULL$//, $foo) . "($arg) : 0 + $var = ($arg && SvOK($arg)) ? Sv" . (our $foo=$ntype, $foo=~s/://g, $foo=~s/^GtkGdk/Gdk/, $foo=~s/_OrNULL$//, $foo) . "($arg) : 0 T_SimplePtr - $var = Sv" . ($foo=$ntype, $foo=~s/://g, $foo=~s/^GtkGdk/Gdk/, $foo) . "($arg,0) + $var = Sv" . (our $foo=$ntype, $foo=~s/://g, $foo=~s/^GtkGdk/Gdk/, $foo) . "($arg,0) OUTPUT