diff options
Diffstat (limited to 'perl_checker_fake_packages')
-rw-r--r-- | perl_checker_fake_packages/Gtk2.pm | 1 | ||||
-rwxr-xr-x | perl_checker_fake_packages/gen.pl | 15 |
2 files changed, 12 insertions, 4 deletions
diff --git a/perl_checker_fake_packages/Gtk2.pm b/perl_checker_fake_packages/Gtk2.pm index 67b7e42..df62941 100644 --- a/perl_checker_fake_packages/Gtk2.pm +++ b/perl_checker_fake_packages/Gtk2.pm @@ -1220,6 +1220,7 @@ sub Gtk2::set_text {} sub Gtk2::set_text_aa_gc { my ($_style, $_state, $_gc) = @_ } sub Gtk2::set_text_gc { my ($_style, $_state, $_gc) = @_ } sub Gtk2::set_text_with_mnemonic { my ($_label, $_str) = @_ } +sub Gtk2::set_tip { my ($_widget, $_tip_text, $o_tip_private) = @_ } sub Gtk2::set_title { my ($_DUMMY0, $_DUMMY1) = @_ } sub Gtk2::set_tooltips { my ($_toolbar, $_enable) = @_ } sub Gtk2::set_transient_for { my ($_DUMMY0, $_DUMMY1) = @_ } diff --git a/perl_checker_fake_packages/gen.pl b/perl_checker_fake_packages/gen.pl index 4aa5c0c..0a42db2 100755 --- a/perl_checker_fake_packages/gen.pl +++ b/perl_checker_fake_packages/gen.pl @@ -16,14 +16,15 @@ sub gtk2 { each_index { if (/^\s*sub\s+(\w+)/) { my $fun = $1; + my $line = $::i; #- obtain first statement of function local $_ = $_; if (/^\s*sub\s+\w+\s*{?\s*$/) { if ($contents[$::i+1] =~ /^\s*{\s*$/) { - $_ .= $contents[$::i+1] . $contents[$::i+2]; + $_ .= $contents[++$line] . $contents[++$line]; } else { - $_ .= $contents[$::i+1]; + $_ .= $contents[++$line]; } } @@ -60,9 +61,15 @@ sub gtk2 { #- methods with variable list of arguments (which branch to different XS functions) #- Gtk2::_Helpers::check_usage(\@_, [ 'Gtk2::GSList group' ], [ 'Gtk2::GSList group', 'string label' ]); - if (/Gtk2::_Helpers::check_usage\(\\\@_, (.*)\);/) { + if (/Gtk2::_Helpers::check_usage\(\\\@_, (.*)/) { + my $various = $1; + while ($various !~ /\)\s*;\s*$/) { + $various .= $contents[++$line]; + } + $various =~ s/\)\s*;\s*$//; + my $subroutine = ' { my ('; - my @various = split /\]\s*,/, $1; + my @various = split /\]\s*,/, $various; s/[\[\]]//g foreach @various; my @mandatory = split /,/, $various[0]; my $proto2varname = sub { $_[0] =~ /\s*'\s*\S+\s+(.*)\s*'/; $1 }; |