Author: tim.bunce
Date: Mon Oct 27 01:29:56 2008
New Revision: 557
Modified:
trunk/NYTProf.xs
trunk/t/20.runtests.t
Log:
Make tag type consistently unsigned char.
Give better error if file uses compression but the NYTProf build doesn't.
Send test diff's to stderr so they show up in 'make test'.
Modified: trunk/NYTProf.xs
==============================================================================
--- trunk/NYTProf.xs (original)
+++ trunk/NYTProf.xs Mon Oct 27 01:29:56 2008
@@ -816,7 +816,7 @@
#ifdef HAS_ZLIB
if (compression_level) {
- const char tag = NYTP_TAG_START_DEFLATE;
+ const unsigned char tag = NYTP_TAG_START_DEFLATE;
NYTP_printf(out, "# Compressed at level %d with zlib %s\n",
compression_level, zlibVersion());
NYTP_write(out, &tag, sizeof(tag));
@@ -852,7 +852,7 @@
read_str(pTHX_ SV *sv) {
STRLEN len;
char *buf;
- char tag;
+ unsigned char tag;
NYTP_read(in, &tag, sizeof(tag), "string prefix");
@@ -1669,7 +1669,7 @@
int saved_errno = errno;
int prev_last_executed_fid = last_executed_fid;
int prev_last_executed_line = last_executed_line;
- const char tag = NYTP_TAG_DISCOUNT;
+ const unsigned char tag = NYTP_TAG_DISCOUNT;
/* Called _after_ ops that indicate we've completed a statement
* and are returning into the middle of some outer statement.
@@ -3113,13 +3113,15 @@
break;
}
-#ifdef HAS_ZLIB
case NYTP_TAG_START_DEFLATE:
{
+#ifdef HAS_ZLIB
NYTP_start_inflate(in);
+#else
+ croak("File uses compression but compression is not
supported by this build of NYTProf");
+#endif
break;
}
-#endif
default:
croak("File format error: token %d ('%c'), chunk %lu,
pos %ld%s",
Modified: trunk/t/20.runtests.t
==============================================================================
--- trunk/t/20.runtests.t (original)
+++ trunk/t/20.runtests.t Mon Oct 27 01:29:56 2008
@@ -251,7 +251,7 @@
# we don't care if this fails, it's just an aid to debug test failures
my @opts = split / /, $ENV{NYTPROF_DIFF_OPTS} || ''; # e.g. '-y'
@opts = ('-u') unless @opts;
- system("diff", @opts, @_);
+ system("diff @opts @_ 1>&2");
}
--~--~---------~--~----~------------~-------~--~----~
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]
-~----------~----~----~----~------~----~------~--~---