mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
check g_signal_new() calls
Original commit message from CVS: check g_signal_new() calls
This commit is contained in:
parent
3863b258b2
commit
04d02e08b6
2 changed files with 44 additions and 0 deletions
|
@ -38,6 +38,7 @@ sub check_debugging();
|
||||||
sub check_old_typefind();
|
sub check_old_typefind();
|
||||||
sub check_bad_casts();
|
sub check_bad_casts();
|
||||||
sub check_old_plugin();
|
sub check_old_plugin();
|
||||||
|
sub check_signal_new();
|
||||||
|
|
||||||
sub m_check_plugindir();
|
sub m_check_plugindir();
|
||||||
|
|
||||||
|
@ -69,6 +70,7 @@ foreach $filename (<FIND>) {
|
||||||
check_old_typefind();
|
check_old_typefind();
|
||||||
check_bad_casts();
|
check_bad_casts();
|
||||||
check_old_plugin();
|
check_old_plugin();
|
||||||
|
check_signal_new();
|
||||||
}
|
}
|
||||||
|
|
||||||
open FIND, "find . -name \"Makefile.am\" -print|";
|
open FIND, "find . -name \"Makefile.am\" -print|";
|
||||||
|
@ -377,3 +379,23 @@ sub check_old_plugin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for calls to g_signal_new() with a callback type of G_TYPE_POINTER
|
||||||
|
#
|
||||||
|
sub check_signal_new()
|
||||||
|
{
|
||||||
|
my $n = 0;
|
||||||
|
my $lineno = 1;
|
||||||
|
|
||||||
|
foreach $line (@lines){
|
||||||
|
if($line =~ /g_signal_new/){
|
||||||
|
$n=5;
|
||||||
|
}
|
||||||
|
if($n>0 && $line =~ /G_TYPE_POINTER/){
|
||||||
|
print "W: ($lineno) g_signal_new() with callback type of G_TYPE_POINTER. Register and use a boxed type instead.\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$n--;
|
||||||
|
$lineno++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ sub check_debugging();
|
||||||
sub check_old_typefind();
|
sub check_old_typefind();
|
||||||
sub check_bad_casts();
|
sub check_bad_casts();
|
||||||
sub check_old_plugin();
|
sub check_old_plugin();
|
||||||
|
sub check_signal_new();
|
||||||
|
|
||||||
sub m_check_plugindir();
|
sub m_check_plugindir();
|
||||||
|
|
||||||
|
@ -69,6 +70,7 @@ foreach $filename (<FIND>) {
|
||||||
check_old_typefind();
|
check_old_typefind();
|
||||||
check_bad_casts();
|
check_bad_casts();
|
||||||
check_old_plugin();
|
check_old_plugin();
|
||||||
|
check_signal_new();
|
||||||
}
|
}
|
||||||
|
|
||||||
open FIND, "find . -name \"Makefile.am\" -print|";
|
open FIND, "find . -name \"Makefile.am\" -print|";
|
||||||
|
@ -377,3 +379,23 @@ sub check_old_plugin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for calls to g_signal_new() with a callback type of G_TYPE_POINTER
|
||||||
|
#
|
||||||
|
sub check_signal_new()
|
||||||
|
{
|
||||||
|
my $n = 0;
|
||||||
|
my $lineno = 1;
|
||||||
|
|
||||||
|
foreach $line (@lines){
|
||||||
|
if($line =~ /g_signal_new/){
|
||||||
|
$n=5;
|
||||||
|
}
|
||||||
|
if($n>0 && $line =~ /G_TYPE_POINTER/){
|
||||||
|
print "W: ($lineno) g_signal_new() with callback type of G_TYPE_POINTER. Register and use a boxed type instead.\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$n--;
|
||||||
|
$lineno++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue