From 6b55d8f1eb59ac5c780295da2bcfe84aa6d15488 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 9 Feb 2005 20:50:35 +0000 Subject: [PATCH] testsuite/gst-lint: Check for non-statically scoped parent_class variables. This won't be a problem once plugins are... Original commit message from CVS: * testsuite/gst-lint: Check for non-statically scoped parent_class variables. This won't be a problem once plugins are loaded with RTLD_LOCAL. --- ChangeLog | 6 ++++++ tests/old/testsuite/gst-lint | 17 ++++++++++++++++- testsuite/gst-lint | 17 ++++++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d0e88d2dbf..8c73f7a1c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-02-09 David Schleef + + * testsuite/gst-lint: Check for non-statically scoped + parent_class variables. This won't be a problem once + plugins are loaded with RTLD_LOCAL. + 2005-02-09 Ronald S. Bultje * ext/mplex/gstmplexibitstream.cc: diff --git a/tests/old/testsuite/gst-lint b/tests/old/testsuite/gst-lint index 4b99a1da96..a924f052d2 100755 --- a/tests/old/testsuite/gst-lint +++ b/tests/old/testsuite/gst-lint @@ -48,6 +48,7 @@ sub check_explicit_caps(); sub check_signals(); sub check_gettext(); sub check_padtemplate(); +sub check_parent_class(); sub m_check_plugindir(); sub m_check_interfaces(); @@ -78,6 +79,7 @@ foreach $filename () { check_signals(); check_gettext(); check_padtemplate(); + check_parent_class(); # less important stuff check_license(); @@ -548,7 +550,20 @@ sub check_padtemplate() { foreach $line (@lines){ if ($line =~ /GstStaticPadTemplate/ && !($line =~ /static/)) { - print "W: pad template definitions should be static\n" + print "W: pad template definitions should be static\n"; + return; + } + } +} + +# +# Check that parent_class is statically scoped +# +sub check_parent_class() +{ + foreach $line (@lines){ + if ($line =~ /Gst.*\*\s*parent_class/ && !($line =~ /static/)) { + print "E: parent_class definitions should be static\n"; return; } } diff --git a/testsuite/gst-lint b/testsuite/gst-lint index 4b99a1da96..a924f052d2 100755 --- a/testsuite/gst-lint +++ b/testsuite/gst-lint @@ -48,6 +48,7 @@ sub check_explicit_caps(); sub check_signals(); sub check_gettext(); sub check_padtemplate(); +sub check_parent_class(); sub m_check_plugindir(); sub m_check_interfaces(); @@ -78,6 +79,7 @@ foreach $filename () { check_signals(); check_gettext(); check_padtemplate(); + check_parent_class(); # less important stuff check_license(); @@ -548,7 +550,20 @@ sub check_padtemplate() { foreach $line (@lines){ if ($line =~ /GstStaticPadTemplate/ && !($line =~ /static/)) { - print "W: pad template definitions should be static\n" + print "W: pad template definitions should be static\n"; + return; + } + } +} + +# +# Check that parent_class is statically scoped +# +sub check_parent_class() +{ + foreach $line (@lines){ + if ($line =~ /Gst.*\*\s*parent_class/ && !($line =~ /static/)) { + print "E: parent_class definitions should be static\n"; return; } }