Changeset 217 in svn


Ignore:
Timestamp:
2006-10-07T01:55:45Z (9 years ago)
Author:
Xuefer
Message:

processor: reset refcount to 0 to kill leak warning

Location:
trunk/processor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/head.m4

    r200 r217  
    278278/* }}} */
    279279#endif
     280int xc_hash_reset_zval_refcount_applyer(void *pDest TSRMLS_DC) /* {{{ */
     281{
     282    zval **zv = (zval **) pDest;
     283    ZVAL_REFCOUNT(*zv) = 1;
     284    return ZEND_HASH_APPLY_KEEP;
     285}
     286/* }}} */
     287static void xc_hash_reset_zval_refcount(HashTable *hash TSRMLS_DC) /* {{{ */
     288{
     289    zend_hash_apply(hash, xc_hash_reset_zval_refcount_applyer TSRMLS_CC);
     290}
     291/* }}} */
    280292/* {{{ call op_array ctor handler */
    281293extern zend_bool xc_have_op_array_ctor;
  • trunk/processor/processor.m4

    r212 r217  
    295295
    296296    STRUCT(HashTable, default_properties, HashTable_zval_ptr)
     297    IFSTORE(`xc_hash_reset_zval_refcount(&dst->default_properties TSRMLS_CC);')
    297298    IFCOPY(`dst->builtin_functions = src->builtin_functions;')
    298299    DONE(builtin_functions)
     
    308309#   endif
    309310    STRUCT(HashTable, constants_table, HashTable_zval_ptr)
     311    IFSTORE(`xc_hash_reset_zval_refcount(&dst->constants_table TSRMLS_CC);')
    310312
    311313    dnl runtime binding: ADD_INTERFACE will deal with it
Note: See TracChangeset for help on using the changeset viewer.