Revision: 962
Author: [email protected]
Date: Fri Dec 18 07:09:18 2009
Log: compressed_io_croak() is only needed when HAS_ZLIB is defined.
http://code.google.com/p/perl-devel-nytprof/source/detail?r=962

Modified:
  /trunk/NYTProf.xs

=======================================
--- /trunk/NYTProf.xs   Fri Dec 18 07:09:15 2009
+++ /trunk/NYTProf.xs   Fri Dec 18 07:09:18 2009
@@ -465,6 +465,7 @@
  #  define CROAK_IF_NOT_STDIO(file, where)
  #endif

+#ifdef HAS_ZLIB
  #ifdef HASATTRIBUTE_NORETURN
  __attribute__noreturn__
  #endif
@@ -490,7 +491,6 @@
            what, NYTP_tell(file));
  }

-#ifdef HAS_ZLIB
  static void
  NYTP_start_deflate(NYTP_file file) {
      int status;
@@ -641,11 +641,11 @@
      if (FILE_STATE(ifile) == NYTP_FILE_STDIO) {
          return fread(buffer, 1, len, ifile->file);
      }
+#ifdef HAS_ZLIB
      else if (FILE_STATE(ifile) != NYTP_FILE_INFLATE) {
          compressed_io_croak(ifile, "NYTP_read");
          return 0;
      }
-#ifdef HAS_ZLIB
      while (1) {
          unsigned char *p = ifile->large_buffer + ifile->count;
          unsigned int remaining = ((unsigned char *) ifile->zs.next_out) -  
p;
@@ -786,11 +786,11 @@
          }
          return len;
      }
+#ifdef HAS_ZLIB
      else if (FILE_STATE(ofile) != NYTP_FILE_DEFLATE) {
          compressed_io_croak(ofile, "NYTP_write");
          return 0;
      }
-#ifdef HAS_ZLIB
      while (1) {
          unsigned int remaining
              = NYTP_FILE_LARGE_BUFFER_SIZE - ofile->zs.avail_in;

-- 
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]

Reply via email to