dmitry                                   Mon, 24 May 2010 17:07:52 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=299702

Log:
Fixed ZTS build

Changed paths:
    U   php/php-src/trunk/Zend/zend.c
    U   php/php-src/trunk/Zend/zend_API.c
    U   php/php-src/trunk/Zend/zend_API.h
    U   php/php-src/trunk/Zend/zend_compile.c
    U   php/php-src/trunk/Zend/zend_globals.h
    U   php/php-src/trunk/Zend/zend_opcode.c
    U   php/php-src/trunk/ext/reflection/php_reflection.c

Modified: php/php-src/trunk/Zend/zend.c
===================================================================
--- php/php-src/trunk/Zend/zend.c       2010-05-24 17:06:09 UTC (rev 299701)
+++ php/php-src/trunk/Zend/zend.c       2010-05-24 17:07:52 UTC (rev 299702)
@@ -505,9 +505,9 @@

        compiler_globals->last_static_member = 
zend_hash_num_elements(compiler_globals->class_table);
        if (compiler_globals->last_static_member) {
-               compiler_globals->static_members = 
(HashTable**)calloc(compiler_globals->last_static_member, sizeof(HashTable*));
+               compiler_globals->static_members_table = 
calloc(compiler_globals->last_static_member, sizeof(zval**));
        } else {
-               compiler_globals->static_members = NULL;
+               compiler_globals->static_members_table = NULL;
        }
 }
 /* }}} */
@@ -526,8 +526,8 @@
                zend_hash_destroy(compiler_globals->auto_globals);
                free(compiler_globals->auto_globals);
        }
-       if (compiler_globals->static_members) {
-               free(compiler_globals->static_members);
+       if (compiler_globals->static_members_table) {
+               free(compiler_globals->static_members_table);
        }
        compiler_globals->last_static_member = 0;
 }

Modified: php/php-src/trunk/Zend/zend_API.c
===================================================================
--- php/php-src/trunk/Zend/zend_API.c   2010-05-24 17:06:09 UTC (rev 299701)
+++ php/php-src/trunk/Zend/zend_API.c   2010-05-24 17:07:52 UTC (rev 299702)
@@ -1026,7 +1026,7 @@
                                zend_update_class_constants(class_type->parent 
TSRMLS_CC);
                        }
 #if ZTS
-                       
CG(static_members)[(zend_intptr_t)(class_type->static_members)] = 
emalloc(sizeof(zval*) * class_type->default_static_members_count);
+                       
CG(static_members_table)[(zend_intptr_t)(class_type->static_members_table)] = 
emalloc(sizeof(zval*) * class_type->default_static_members_count);
 #else
                        class_type->static_members_table = 
emalloc(sizeof(zval*) * class_type->default_static_members_count);
 #endif

Modified: php/php-src/trunk/Zend/zend_API.h
===================================================================
--- php/php-src/trunk/Zend/zend_API.h   2010-05-24 17:06:09 UTC (rev 299701)
+++ php/php-src/trunk/Zend/zend_API.h   2010-05-24 17:07:52 UTC (rev 299702)
@@ -208,7 +208,7 @@
        INIT_OVERLOADED_CLASS_ENTRY(class_container, ZEND_NS_NAME(ns, 
class_name), functions, handle_fcall, handle_propget, handle_propset)

 #ifdef ZTS
-#      define CE_STATIC_MEMBERS(ce) 
(((ce)->type==ZEND_USER_CLASS)?(ce)->static_members:CG(static_members_table)[(zend_intptr_t)(ce)->static_members_table])
+#      define CE_STATIC_MEMBERS(ce) 
(((ce)->type==ZEND_USER_CLASS)?(ce)->static_members_table:CG(static_members_table)[(zend_intptr_t)(ce)->static_members_table])
 #else
 #      define CE_STATIC_MEMBERS(ce) ((ce)->static_members_table)
 #endif

Modified: php/php-src/trunk/Zend/zend_compile.c
===================================================================
--- php/php-src/trunk/Zend/zend_compile.c       2010-05-24 17:06:09 UTC (rev 
299701)
+++ php/php-src/trunk/Zend/zend_compile.c       2010-05-24 17:07:52 UTC (rev 
299702)
@@ -6140,18 +6140,18 @@
 #ifdef ZTS
                int n = zend_hash_num_elements(CG(class_table));

-               if (CG(static_members) && n >= CG(last_static_member)) {
+               if (CG(static_members_table) && n >= CG(last_static_member)) {
                        /* Support for run-time declaration: dl() */
                        CG(last_static_member) = n+1;
-                       CG(static_members) = realloc(CG(static_members), 
(n+1)*sizeof(HashTable*));
-                       CG(static_members)[n] = NULL;
+                       CG(static_members_table) = 
realloc(CG(static_members_table), (n+1)*sizeof(zval**));
+                       CG(static_members_table)[n] = NULL;
                }
                ce->static_members_table = (zval**)(zend_intptr_t)n;
 #else
                ce->static_members_table = NULL;
 #endif
        } else {
-               ce->static_members_table = &ce->default_static_members_table;
+               ce->static_members_table = ce->default_static_members_table;
        }

        ce->default_properties_count = 0;

Modified: php/php-src/trunk/Zend/zend_globals.h
===================================================================
--- php/php-src/trunk/Zend/zend_globals.h       2010-05-24 17:06:09 UTC (rev 
299701)
+++ php/php-src/trunk/Zend/zend_globals.h       2010-05-24 17:07:52 UTC (rev 
299702)
@@ -166,7 +166,7 @@
 #endif /* ZEND_MULTIBYTE */

 #ifdef ZTS
-       HashTable **static_members;
+       zval ***static_members_table;
        int last_static_member;
 #endif
 };

Modified: php/php-src/trunk/Zend/zend_opcode.c
===================================================================
--- php/php-src/trunk/Zend/zend_opcode.c        2010-05-24 17:06:09 UTC (rev 
299701)
+++ php/php-src/trunk/Zend/zend_opcode.c        2010-05-24 17:07:52 UTC (rev 
299702)
@@ -175,7 +175,7 @@
                }
                efree(CE_STATIC_MEMBERS(*pce));
 #ifdef ZTS
-               CG(static_members)[(zend_intptr_t)((*pce)->static_members)] = 
NULL;
+               
CG(static_members_table)[(zend_intptr_t)((*pce)->static_members_table)] = NULL;
 #else
                (*pce)->static_members_table = NULL;
 #endif

Modified: php/php-src/trunk/ext/reflection/php_reflection.c
===================================================================
--- php/php-src/trunk/ext/reflection/php_reflection.c   2010-05-24 17:06:09 UTC 
(rev 299701)
+++ php/php-src/trunk/ext/reflection/php_reflection.c   2010-05-24 17:07:52 UTC 
(rev 299702)
@@ -1564,7 +1564,7 @@

        MAKE_STD_ZVAL(name);
        ZVAL_STRING(name, fptr->common.function_name, 1);
-       reflection_update_property(object, "name", name TSRMLS_CC);
+       reflection_update_property(object, "name", name);
        intern->ptr = fptr;
        intern->ref_type = REF_TYPE_FUNCTION;
        intern->obj = closure;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to