Changeset 323 in svn


Ignore:
Timestamp:
2006-12-10T09:18:09+01:00 (8 years ago)
Author:
Xuefer
Message:

add xc_php_addref_dmz and s/xc_php_remove_dmz/xc_php_release_dmz/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache.c

    r322 r323  
    148148}
    149149/* }}} */
    150 static void xc_php_remove_dmz(xc_entry_data_php_t *php) /* {{{ */
     150static void xc_php_addref_dmz(xc_entry_data_php_t *php) /* {{{ */
     151{
     152    php->refcount ++;
     153}
     154/* }}} */
     155static void xc_php_release_dmz(xc_entry_data_php_t *php) /* {{{ */
    151156{
    152157    if (-- php->refcount == 0) {
     
    237242{
    238243    if (xce->type == XC_TYPE_PHP) {
    239         xc_php_remove_dmz(xce->data.php);
     244        xc_php_release_dmz(xce->data.php);
    240245    }
    241246    xce->cache->mem->handlers->free(xce->cache->mem, (xc_entry_t *)xce);
     
    12911296        if (newlycompiled) {
    12921297            stored_php = xc_php_store_dmz(&php TSRMLS_CC);
    1293             /* error */
    12941298            if (!stored_php) {
     1299                /* error */
    12951300                break;
    12961301            }
    12971302        }
    12981303        /* entry_store */
     1304        xc_php_addref_dmz(stored_php);
    12991305        stored_xce = xc_entry_store_dmz(&xce TSRMLS_CC);
    13001306        if (stored_xce) {
    13011307            stored_xce->data.php = stored_php;
    1302             stored_php->refcount ++;
    13031308        }
    13041309        else {
    13051310            /* error */
    1306             xc_php_remove_dmz(stored_php);
    1307             stored_php = NULL;
     1311            xc_php_release_dmz(stored_php);
    13081312        }
    13091313    } LEAVE_LOCK_EX(cache);
Note: See TracChangeset for help on using the changeset viewer.