Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/lib
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3682
Modified Files:
libtest.pl
Log Message:
check_null() added.
Index: libtest.pl
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/lib/libtest.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** libtest.pl 28 Dec 2006 18:51:42 -0000 1.1
--- libtest.pl 23 May 2007 17:24:32 -0000 1.2
***************
*** 35,37 ****
--- 35,47 ----
}
+ # On some systems, passing "" from C++ (e.g. in a std::string) will result
+ # in "" in Perl land, while sometimes it gives undef.
+ #
+ # This should be fixed.
+ #
+ sub check_null {
+ my $str = shift;
+
+ return ((!defined($str)) || ($str eq ""));
+ }
1;
|