Changeset 88 in svn


Ignore:
Timestamp:
2006-07-09T14:47:31+02:00 (9 years ago)
Author:
Xuefer
Message:

possible fix for #14 "Cannot redeclare ()"

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/utils.c

    r19 r88  
    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)
  • trunk/utils.h

    r1 r88  
    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
  • trunk/xcache.h

    r78 r88  
    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.