Ignore:
Timestamp:
2009-07-05T06:06:15+02:00 (5 years ago)
Author:
moo
Message:

merged r304,r305,r306,r307 from trunk

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

  • branches/1.3/coverager.c

    r406 r593  
    2727{ 
    2828    coverager_t cov = *(coverager_t*) pDest; 
    29 #ifdef DEBUG 
    30     fprintf(stderr, "destroy %p\n", cov); 
    31 #endif 
     29    TRACE("destroy %p", cov); 
    3230    zend_hash_destroy(cov); 
    3331    efree(cov); 
     
    3937    struct stat st; 
    4038 
    41 #ifdef DEBUG 
    42     fprintf(stderr, "mkdirs %s %d %s %d\n", root, rootlen, path, pathlen); 
    43 #endif 
     39    TRACE("mkdirs %s %d %s %d", root, rootlen, path, pathlen); 
    4440    fullpath = do_alloca(rootlen + pathlen + 1); 
    4541    memcpy(fullpath, root, rootlen); 
     
    5652            *chr = PHP_DIR_SEPARATOR; 
    5753        } 
    58 #ifdef DEBUG 
    59         fprintf(stderr, "mkdir %s\n", fullpath); 
    60 #endif 
     54        TRACE("mkdir %s", fullpath); 
    6155#if PHP_MAJOR_VERSION > 5 
    6256        php_stream_mkdir(fullpath, 0700, REPORT_ERRORS, NULL); 
     
    113107 
    114108    if (newfile) { 
    115 #ifdef DEBUG 
    116         fprintf(stderr, "new file\n"); 
    117 #endif 
     109        TRACE("%s", "new file"); 
    118110    } 
    119111    else if (outstat.st_size) { 
     
    123115            goto bailout; 
    124116        } 
    125 #ifdef DEBUG 
    126         fprintf(stderr, "oldsize %d\n", (int) len); 
    127 #endif 
     117        TRACE("oldsize %d", (int) len); 
    128118        do { 
    129119            p = (long *) contents; 
     
    133123            } 
    134124            if (*p++ != PCOV_HEADER_MAGIC) { 
    135 #ifdef DEBUG 
    136                 fprintf(stderr, "wrong magic in file %s\n", outfilename); 
    137 #endif 
     125                TRACE("wrong magic in file %s", outfilename); 
    138126                break; 
    139127            } 
     
    290278            strcpy(outfilename + dumpdir_len + size - 1, ".pcov"); 
    291279 
    292 #ifdef DEBUG 
    293             fprintf(stderr, "outfilename %s\n", outfilename); 
    294 #endif 
     280            TRACE("outfilename %s", outfilename); 
    295281            xc_coverager_save_cov(ZSTR_S(s), outfilename, *pcov TSRMLS_CC); 
    296282            zend_hash_move_forward_ex(XG(coverages), &pos); 
     
    354340 
    355341    if (zend_hash_find(XG(coverages), filename, len, (void **) &pcov) == SUCCESS) { 
    356 #ifdef DEBUG 
    357         fprintf(stderr, "got coverage %s %p\n", filename, *pcov); 
    358 #endif 
     342        TRACE("got coverage %s %p", filename, *pcov); 
    359343        return *pcov; 
    360344    } 
     
    363347        zend_hash_init(cov, 0, NULL, NULL, 0); 
    364348        zend_hash_add(XG(coverages), filename, len, (void **) &cov, sizeof(cov), NULL); 
    365 #ifdef DEBUG 
    366         fprintf(stderr, "new coverage %s %p\n", filename, cov); 
    367 #endif 
     349        TRACE("new coverage %s %p", filename, cov); 
    368350        return cov; 
    369351    } 
     
    534516    } 
    535517    if (*p++ != PCOV_HEADER_MAGIC) { 
    536 #ifdef DEBUG 
    537         fprintf(stderr, "wrong magic in xcache_coverager_decode"); 
    538 #endif 
     518        TRACE("%s", "wrong magic in xcache_coverager_decode"); 
    539519        return; 
    540520    } 
Note: See TracChangeset for help on using the changeset viewer.