Skip to content

Commit

Permalink
Removed EG(valid_symbol_table). Used EG(active) instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Jun 26, 2017
1 parent 24030d5 commit caaeb48
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion Zend/zend.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,6 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals) /* {{
zend_get_windows_version_info(&executor_globals->windows_version_info);
#endif
executor_globals->flags = EG_FLAGS_INITIAL;
executor_globals->valid_symbol_table = 0;
}
/* }}} */

Expand Down
2 changes: 0 additions & 2 deletions Zend/zend_execute_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ void init_executor(void) /* {{{ */
zend_vm_stack_init();

zend_hash_init(&EG(symbol_table), 64, NULL, ZVAL_PTR_DTOR, 0);
EG(valid_symbol_table) = 1;

zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_activator);

Expand Down Expand Up @@ -267,7 +266,6 @@ void shutdown_executor(void) /* {{{ */
/* All resources and objects are destroyed. */
/* No PHP callback functions may be called after this point. */
EG(active) = 0;
EG(valid_symbol_table) = 0;

zend_try {
zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_deactivator);
Expand Down
1 change: 0 additions & 1 deletion Zend/zend_globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ struct _zend_executor_globals {
struct _zend_module_entry *current_module;

zend_bool active;
zend_bool valid_symbol_table;
zend_uchar flags;

zend_long assertions;
Expand Down
4 changes: 2 additions & 2 deletions main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
efree(docref_buf);
}

if (PG(track_errors) && module_initialized && EG(valid_symbol_table) &&
if (PG(track_errors) && module_initialized && EG(active) &&
(Z_TYPE(EG(user_error_handler)) == IS_UNDEF || !(EG(user_error_handler_error_reporting) & type))) {
zval tmp;
ZVAL_STRINGL(&tmp, buffer, buffer_len);
Expand Down Expand Up @@ -1235,7 +1235,7 @@ static ZEND_COLD void php_error_cb(int type, const char *error_filename, const u
return;
}

if (PG(track_errors) && module_initialized && EG(valid_symbol_table)) {
if (PG(track_errors) && module_initialized && EG(active)) {
zval tmp;

ZVAL_STRINGL(&tmp, buffer, buffer_len);
Expand Down

1 comment on commit caaeb48

@Jan-E
Copy link
Contributor

@Jan-E Jan-E commented on caaeb48 Jul 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.