Changeset 305 in svn for trunk/utils.c


Ignore:
Timestamp:
2006-12-08T17:11:19+01:00 (9 years ago)
Author:
Xuefer
Message:

TRACE() instead of ifdef/fprintf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/utils.c

    r295 r305  
    331331    zend_op *opline;
    332332
    333 #ifdef DEBUG
    334     fprintf(stderr, "binding %d\n", oplineno);
    335 #endif
     333    TRACE("binding %d", oplineno);
    336334    assert(oplineno >= 0);
    337335
     
    352350
    353351            parent_name = &(opline - 1)->op2.u.constant;
    354 #   ifdef DEBUG
    355             fprintf(stderr, "binding with parent %s\n", Z_STRVAL_P(parent_name));
    356 #   endif
     352            TRACE("binding with parent %s", Z_STRVAL_P(parent_name));
    357353            if (zend_lookup_class(Z_STRVAL_P(parent_name), Z_STRLEN_P(parent_name), &pce TSRMLS_CC) == FAILURE) {
    358354                return FAILURE;
     
    369365            zend_op *fetch_class_opline = opline - 1;
    370366
    371 #   ifdef DEBUG
    372             fprintf(stderr, "%s %p\n", Z_STRVAL(fetch_class_opline->op2.u.constant), Z_STRVAL(fetch_class_opline->op2.u.constant));
    373 #   endif
     367            TRACE("%s %p", Z_STRVAL(fetch_class_opline->op2.u.constant), Z_STRVAL(fetch_class_opline->op2.u.constant));
    374368            OP_ZVAL_DTOR(fetch_class_opline->op2);
    375369            fetch_class_opline->opcode = ZEND_NOP;
     
    707701}
    708702/* }}} */
     703int xc_vtrace(const char *fmt, va_list args) /* {{{ */
     704{
     705    vfprintf(stderr, fmt, args);
     706    return 0;
     707}
     708/* }}} */
     709int xc_trace(const char *fmt, ...) /* {{{ */
     710{
     711    va_list args;
     712
     713    va_start(args, fmt);
     714    xc_vtrace(fmt, args);
     715    va_end(args);
     716    return 0;
     717}
     718/* }}} */
Note: See TracChangeset for help on using the changeset viewer.