Changeset 588 for trunk/xcache.c
- Timestamp:
- 2009-04-01T10:06:38+02:00 (4 years ago)
- File:
-
- 1 edited
-
trunk/xcache.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache.c
r572 r588 1849 1849 } 1850 1850 /* }}} */ 1851 static void xc_copy_zend_constant(zend_constant *c) /* {{{ */ 1852 { 1853 c->name = zend_strndup(c->name, c->name_len - 1); 1854 if (!(c->flags & CONST_PERSISTENT)) { 1855 zval_copy_ctor(&c->value); 1856 } 1857 } 1858 /* }}} */ 1851 1859 static void xc_request_init(TSRMLS_D) /* {{{ */ 1852 1860 { … … 1854 1862 1855 1863 if (!XG(internal_table_copied)) { 1864 #ifdef HAVE_XCACHE_CONSTANT 1865 zend_constant tmp_const; 1866 #endif 1856 1867 zend_function tmp_func; 1857 1868 xc_cest_t tmp_cest; 1858 1869 1870 #ifdef HAVE_XCACHE_CONSTANT 1871 zend_hash_destroy(&XG(internal_constant_table)); 1872 #endif 1859 1873 zend_hash_destroy(&XG(internal_function_table)); 1860 1874 zend_hash_destroy(&XG(internal_class_table)); 1861 1875 1876 #ifdef HAVE_XCACHE_CONSTANT 1877 zend_hash_init_ex(&XG(internal_constant_table), 20, NULL, NULL, 1, 0); 1878 #endif 1862 1879 zend_hash_init_ex(&XG(internal_function_table), 100, NULL, NULL, 1, 0); 1863 1880 zend_hash_init_ex(&XG(internal_class_table), 10, NULL, NULL, 1, 0); 1864 1881 1882 #ifdef HAVE_XCACHE_CONSTANT 1883 zend_hash_copy(&XG(internal_constant_table), EG(zend_constants), (copy_ctor_func_t) xc_copy_zend_constant, &tmp_const, sizeof(tmp_const)); 1884 #endif 1865 1885 zend_hash_copy(&XG(internal_function_table), CG(function_table), NULL, &tmp_func, sizeof(tmp_func)); 1866 1886 zend_hash_copy(&XG(internal_class_table), CG(class_table), NULL, &tmp_cest, sizeof(tmp_cest)); … … 1921 1941 memset(xcache_globals, 0, sizeof(zend_xcache_globals)); 1922 1942 1943 #ifdef HAVE_XCACHE_CONSTANT 1944 zend_hash_init_ex(&xcache_globals->internal_constant_table, 1, NULL, NULL, 1, 0); 1945 #endif 1923 1946 zend_hash_init_ex(&xcache_globals->internal_function_table, 1, NULL, NULL, 1, 0); 1924 1947 zend_hash_init_ex(&xcache_globals->internal_class_table, 1, NULL, NULL, 1, 0); … … 1952 1975 1953 1976 if (xcache_globals->internal_table_copied) { 1977 #ifdef HAVE_XCACHE_CONSTANT 1978 zend_hash_destroy(&xcache_globals->internal_constant_table); 1979 #endif 1954 1980 zend_hash_destroy(&xcache_globals->internal_function_table); 1955 1981 zend_hash_destroy(&xcache_globals->internal_class_table);
Note: See TracChangeset
for help on using the changeset viewer.

