Changeset 784 in svn for branches/1.3/xcache.c


Ignore:
Timestamp:
2011-04-22T15:18:42Z (4 years ago)
Author:
Xuefer
Message:

merge from trunk

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

  • branches/1.3/xcache.c

    r766 r784  
    22802280}
    22812281/* }}} */
     2282/* {{{ proto int xcache_get_refcount(mixed variable)
     2283   XCache internal uses only: Get reference count of variable */
     2284PHP_FUNCTION(xcache_get_refcount)
     2285{
     2286    zval *variable;
     2287    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &variable) == FAILURE) {
     2288        RETURN_NULL();
     2289    }
     2290
     2291    RETURN_LONG(Z_REFCOUNT_P(variable));
     2292}
     2293/* }}} */
     2294/* {{{ proto bool xcache_get_isref(mixed variable)
     2295   XCache internal uses only: Check if variable data is marked referenced */
     2296ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_isref, 0, 0, 1)
     2297    ZEND_ARG_INFO(1, variable)
     2298ZEND_END_ARG_INFO()
     2299
     2300PHP_FUNCTION(xcache_get_isref)
     2301{
     2302    zval *variable;
     2303    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &variable) == FAILURE) {
     2304        RETURN_NULL();
     2305    }
     2306
     2307    RETURN_BOOL(Z_ISREF_P(variable) && Z_REFCOUNT_P(variable) >= 3);
     2308}
     2309/* }}} */
    22822310#ifdef HAVE_XCACHE_DPRINT
    22832311/* {{{ proto bool  xcache_dprint(mixed value)
     
    24282456/* }}} */
    24292457#endif
    2430 /* {{{ proto mixed xcache_get_special_value(zval value) */
     2458/* {{{ proto mixed xcache_get_special_value(zval value)
     2459   XCache internal use only: For decompiler to get static value with type fixed */
    24312460PHP_FUNCTION(xcache_get_special_value)
    24322461{
     
    24532482        RETURN_NULL();
    24542483    }
     2484}
     2485/* }}} */
     2486/* {{{ proto int xcache_get_type(zval value)
     2487   XCache internal use only for disassembler to get variable type in engine level */
     2488PHP_FUNCTION(xcache_get_type)
     2489{
     2490    zval *value;
     2491
     2492    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &value) == FAILURE) {
     2493        return;
     2494    }
     2495
     2496    RETURN_LONG(Z_TYPE_P(value));
    24552497}
    24562498/* }}} */
     
    25072549#endif
    25082550    PHP_FE(xcache_get_special_value, NULL)
     2551    PHP_FE(xcache_get_type,          NULL)
    25092552    PHP_FE(xcache_get_op_type,       NULL)
    25102553    PHP_FE(xcache_get_data_type,     NULL)
     
    25212564    PHP_FE(xcache_unset,             NULL)
    25222565    PHP_FE(xcache_unset_by_prefix,   NULL)
     2566    PHP_FE(xcache_get_refcount,      NULL)
     2567    PHP_FE(xcache_get_isref,         arginfo_xcache_get_isref)
    25232568#ifdef HAVE_XCACHE_DPRINT
    25242569    PHP_FE(xcache_dprint,            NULL)
Note: See TracChangeset for help on using the changeset viewer.