Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed ZTS build

  • Loading branch information...
commit f23e857676a00eefeb5886977316394ae898c023 1 parent 04dd48c
Dmitry Stogov authored
View
8 Zend/zend.c
@@ -505,9 +505,9 @@ static void compiler_globals_ctor(zend_compiler_globals *compiler_globals TSRMLS
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 @@ static void compiler_globals_dtor(zend_compiler_globals *compiler_globals TSRMLS
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;
}
View
2  Zend/zend_API.c
@@ -1026,7 +1026,7 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC
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
View
2  Zend/zend_API.h
@@ -208,7 +208,7 @@ typedef struct _zend_fcall_info_cache {
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
View
8 Zend/zend_compile.c
@@ -6140,18 +6140,18 @@ ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify
#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;
View
2  Zend/zend_globals.h
@@ -166,7 +166,7 @@ struct _zend_compiler_globals {
#endif /* ZEND_MULTIBYTE */
#ifdef ZTS
- HashTable **static_members;
+ zval ***static_members_table;
int last_static_member;
#endif
};
View
2  Zend/zend_opcode.c
@@ -175,7 +175,7 @@ ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC)
}
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
View
2  ext/reflection/php_reflection.c
@@ -1564,7 +1564,7 @@ ZEND_METHOD(reflection_function, __construct)
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;
Please sign in to comment.
Something went wrong with that request. Please try again.