Changeset 669


Ignore:
Timestamp:
2009-08-07T04:31:12+02:00 (5 years ago)
Author:
moo
Message:

use XCACHE_ERROR_CACHING macro to simplify ifdefs

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/utils.c

    r668 r669  
    530530#define OG(x) (sandbox->orig_##x) 
    531531/* }}} */ 
    532 #if defined(E_STRICT) || defined(E_DEPRECATED) 
     532#ifdef XCACHE_ERROR_CACHING 
    533533static void xc_sandbox_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) /* {{{ */ 
    534534{ 
     
    540540    assert(sandbox != NULL); 
    541541    switch (type) { 
    542 #ifdef E_STRICT: 
     542#ifdef E_STRICT 
    543543    case E_STRICT: 
    544544#endif 
     
    740740    sandbox->filename = filename; 
    741741 
    742 #ifdef E_STRICT 
     742#ifdef XCACHE_ERROR_CACHING 
    743743    sandbox->orig_user_error_handler_error_reporting = EG(user_error_handler_error_reporting); 
    744744    EG(user_error_handler_error_reporting) = 0; 
     
    823823    } 
    824824 
    825 #ifdef E_STRICT 
     825#ifdef XCACHE_ERROR_CACHING 
    826826    /* restore trigger errors */ 
    827827    for (i = 0; i < sandbox->compilererror_cnt; i ++) { 
     
    840840{ 
    841841    XG(sandbox) = NULL; 
    842 #ifdef E_STRICT 
     842#ifdef XCACHE_ERROR_CACHING 
    843843    EG(user_error_handler_error_reporting) = sandbox->orig_user_error_handler_error_reporting; 
    844844    zend_error_cb = sandbox->orig_zend_error_cb; 
     
    886886    memcpy(&EG(included_files), &OG(included_files), sizeof(EG(included_files))); 
    887887 
    888 #ifdef E_STRICT 
     888#ifdef XCACHE_ERROR_CACHING 
    889889    if (sandbox->compilererrors) { 
    890890        zend_uint i; 
  • trunk/utils.h

    r668 r669  
    7474ZESW(xc_cest_t *, void) xc_install_class(char *filename, xc_cest_t *cest, int oplineno, zend_uchar type, zstr key, uint len, ulong h TSRMLS_DC); 
    7575 
     76#if defined(E_STRICT) || defined(E_DEPRECATED) 
     77#define XCACHE_ERROR_CACHING 
     78#endif 
     79 
    7680/* sandbox */ 
    7781typedef struct { 
     
    98102    Bucket    *tmp_internal_class_tail; 
    99103 
    100 #if defined(E_STRICT) || defined(E_DEPRECATED) 
     104#ifdef XCACHE_ERROR_CACHING 
    101105    int orig_user_error_handler_error_reporting; 
    102106    void (*orig_zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args); 
  • trunk/xcache.c

    r662 r669  
    756756    } 
    757757#endif 
    758 #ifdef E_STRICT 
     758#ifdef XCACHE_ERROR_CACHING 
    759759    /* restore trigger errors */ 
    760760    for (i = 0; i < p->compilererror_cnt; i ++) { 
     
    15361536#undef X_FREE_UNUSED 
    15371537    /* }}} */ 
    1538 #ifdef E_STRICT 
     1538#ifdef XCACHE_ERROR_CACHING 
    15391539    php->compilererrors = ((xc_sandbox_t *) XG(sandbox))->compilererrors; 
    15401540    php->compilererror_cnt = ((xc_sandbox_t *) XG(sandbox))->compilererror_cnt; 
Note: See TracChangeset for help on using the changeset viewer.