summaryrefslogtreecommitdiff
path: root/Zend/zend_globals.h
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2016-07-23 00:00:13 +0200
committerNikita Popov <nikic@php.net>2016-07-23 00:00:13 +0200
commit07af6ba898e8fb6402643f12ccb769c5466698ad (patch)
tree809573592e8cbf8c3363ce4130096442b95d6a39 /Zend/zend_globals.h
parent40b312d4c2d129f2085af585566fa417b43419e8 (diff)
downloadphp-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.h3
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 */