Revision: 1097
Author: [email protected]
Date: Mon Mar 8 01:45:35 2010
Log: Add a wrapper for NYTP_write_comment and use it from nytprofmerge.
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1097
Modified:
/trunk/FileHandle.xs
/trunk/bin/nytprofmerge
=======================================
--- /trunk/FileHandle.xs Mon Mar 8 01:45:27 2010
+++ /trunk/FileHandle.xs Mon Mar 8 01:45:35 2010
@@ -744,3 +744,12 @@
int compression_level
#endif
+
+int
+NYTP_write_comment(handle, comment)
+NYTP_file handle
+char *comment
+ CODE:
+ RETVAL = NYTP_write_comment(handle, "%s", comment);
+ OUTPUT:
+ RETVAL
=======================================
--- /trunk/bin/nytprofmerge Sat Feb 20 08:31:12 2010
+++ /trunk/bin/nytprofmerge Mon Mar 8 01:45:35 2010
@@ -102,11 +102,12 @@
},
COMMENT => sub {
my (undef, $text) = @_;
+ chomp $text; # Arguably this is a bug in the callback interface.
# This isn't true unless we enable compression ourselves, and if we
# do that, the low level code will write out a correct comment
# automatically.
- return if $text =~ /\ACompressed at level \d with zlib [0-9.]+\n\z/;
- $out->write("#$text")
+ return if $text =~ /\ACompressed at level \d with zlib [0-9.]+\z/;
+ $out->write_comment($text)
},
ATTRIBUTE => sub {
my (undef, $key, $value) = @_;
--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [email protected]