Changeset 44d53f3 in git


Ignore:
Timestamp:
2006-07-09T12:47:31Z (13 years ago)
Author:
Xuefer <xuefer@…>
Branches:
1.1, 1.2, 1.3, 3.0, 3.1, 3.2, master, trunk
Children:
358fb1e
Parents:
e771c8e
Message:

possible fix for #14 "Cannot redeclare ()"

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@88 c26eb9a1-5813-0410-bd6c-c2e55f420ca7

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • utils.c

    rd7d6864 r44d53f3  
    265265#endif
    266266
    267 void xc_install_function(char *filename, zend_function *func, zend_uchar type, char *key, uint len TSRMLS_DC) /* {{{ */
     267void xc_install_function(char *filename, zend_function *func, zend_uchar type, void *key, uint len TSRMLS_DC) /* {{{ */
    268268{
    269269    if (func->type == ZEND_USER_FUNCTION) {
    270         if (zend_u_hash_add(CG(function_table), type, key, len,
     270        if (*(char *) key == '\0') {
     271            zend_u_hash_update(CG(function_table), type, key, len,
     272                        func, sizeof(zend_op_array),
     273                        NULL
     274                        );
     275        }
     276        else if (zend_u_hash_add(CG(function_table), type, key, len,
    271277                    func, sizeof(zend_op_array),
    272278                    NULL
     
    285291    ZESW(void *stored_ce_ptr, NOTHING);
    286292
    287     if (zend_u_hash_add(CG(class_table), type, key, len,
     293    if (*(char *) key == '\0') {
     294        zend_u_hash_update(CG(class_table), type, key, len,
     295                    cest, sizeof(xc_cest_t),
     296                    ZESW(&stored_ce_ptr, NULL)
     297                    );
     298    }
     299    else if (zend_u_hash_add(CG(class_table), type, key, len,
    288300                cest, sizeof(xc_cest_t),
    289301                ZESW(&stored_ce_ptr, NULL)
  • utils.h

    r4389208 r44d53f3  
    2626
    2727/* installer */
    28 void xc_install_function(char *filename, zend_function *func, zend_uchar type, char *key, uint len TSRMLS_DC);
     28void xc_install_function(char *filename, zend_function *func, zend_uchar type, void *key, uint len TSRMLS_DC);
    2929ZESW(xc_cest_t *, void) xc_install_class(char *filename, xc_cest_t *cest, zend_uchar type, void *key, uint len TSRMLS_DC);
    3030
  • xcache.h

    ree150ff r44d53f3  
    7878       zend_hash_add(ht, arKey, nKeyLength, pData, nDataSize, pDest)
    7979
     80#   define zend_u_hash_update(ht, type, arKey, nKeyLength, pData, nDataSize, pDest) \
     81       zend_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest)
     82
    8083#   define zend_u_hash_find(ht, type, arKey, nKeyLength, pData) \
    8184       zend_hash_find(ht, arKey, nKeyLength, pData)
Note: See TracChangeset for help on using the changeset viewer.