diff options
author | Nikita Popov <nikic@php.net> | 2016-07-23 00:00:13 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2016-07-23 00:00:13 +0200 |
commit | 07af6ba898e8fb6402643f12ccb769c5466698ad (patch) | |
tree | 809573592e8cbf8c3363ce4130096442b95d6a39 /Zend/zend_globals.h | |
parent | 40b312d4c2d129f2085af585566fa417b43419e8 (diff) | |
download | php-git-07af6ba898e8fb6402643f12ccb769c5466698ad.tar.gz |
Make sure TOKEN_PARSE mode is thread safe
Introduce an on_event_context passed to the on_event hook. Use this
context to pass along the token array. Previously this was stored
in a non-tls global :/
Diffstat (limited to 'Zend/zend_globals.h')
-rw-r--r-- | Zend/zend_globals.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index 3a4f0c1940..fbbf503c41 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -292,7 +292,8 @@ struct _zend_php_scanner_globals { int scanned_string_len; /* hooks */ - void (* on_event)(zend_php_scanner_event event, int token, int line); + void (*on_event)(zend_php_scanner_event event, int token, int line, void *context); + void *on_event_context; }; #endif /* ZEND_GLOBALS_H */ |