diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-02-15 22:31:23 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-02-15 22:31:23 -0800 |
commit | 12605ff99dc0b98fd730bbd2380934b87b8b32f5 (patch) | |
tree | 5e09993cf6bea20b2c35d09cb467fedb225bd5bd /perlio.c | |
parent | 962bcf2846ff67ac4c58856ea567b5bf0e9fb52e (diff) | |
download | perl-12605ff99dc0b98fd730bbd2380934b87b8b32f5.tar.gz |
add refcnt_inc/dec to perldiag
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2412,6 +2412,7 @@ PerlIOUnix_refcnt_inc(int fd) PL_perlio_fd_refcnt[fd]++; if (PL_perlio_fd_refcnt[fd] <= 0) { + /* diag_listed_as: refcnt_inc: fd %d%s */ Perl_croak(aTHX_ "refcnt_inc: fd %d: %d <= 0\n", fd, PL_perlio_fd_refcnt[fd]); } @@ -2422,6 +2423,7 @@ PerlIOUnix_refcnt_inc(int fd) MUTEX_UNLOCK(&PL_perlio_mutex); #endif } else { + /* diag_listed_as: refcnt_inc: fd %d%s */ Perl_croak(aTHX_ "refcnt_inc: fd %d < 0\n", fd); } } @@ -2437,10 +2439,12 @@ PerlIOUnix_refcnt_dec(int fd) MUTEX_LOCK(&PL_perlio_mutex); #endif if (fd >= PL_perlio_fd_refcnt_size) { + /* diag_listed_as: refcnt_dec: fd %d%s */ Perl_croak(aTHX_ "refcnt_dec: fd %d >= refcnt_size %d\n", fd, PL_perlio_fd_refcnt_size); } if (PL_perlio_fd_refcnt[fd] <= 0) { + /* diag_listed_as: refcnt_dec: fd %d%s */ Perl_croak(aTHX_ "refcnt_dec: fd %d: %d <= 0\n", fd, PL_perlio_fd_refcnt[fd]); } @@ -2450,6 +2454,7 @@ PerlIOUnix_refcnt_dec(int fd) MUTEX_UNLOCK(&PL_perlio_mutex); #endif } else { + /* diag_listed_as: refcnt_dec: fd %d%s */ Perl_croak(aTHX_ "refcnt_dec: fd %d < 0\n", fd); } return cnt; |