Skip to content

Commit 421d62e

Browse files
Mikhail GalaninTotktonada
Mikhail Galanin
authored andcommitted
PHP 8.0: define TSRMLS* macros as no-op
The TSRM* macros are no-op since PHP 7.0. PHP 8.0 drops them at all. Define them as no-op in our code when building against PHP 8 and newer to overcome a build fail. See [1] and [2] (1.c) for details. Those macros could be removed from the code entirely (both definitions and usages), since we support PHP 7.0+. It is to be done later. [1]: https://wiki.php.net/rfc/native-tls [2]: https://github.com/php/php-src/blob/php-8.0.18RC1/UPGRADING.INTERNALS Part of tarantool#171
1 parent a631b56 commit 421d62e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/php_tarantool.h

+7
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
# define smart_string_free_ex(...) smart_str_free_ex(__VA_ARGS__)
3030
#endif
3131

32+
#if PHP_VERSION_ID >= 80000
33+
/* These macroses were removed in PHP 8. */
34+
# define TSRMLS_CC
35+
# define TSRMLS_DC
36+
# define TSRMLS_FETCH()
37+
#endif /* PHP_VERSION_ID >= 80000 */
38+
3239
#if PHP_VERSION_ID < 70300
3340
# define GC_SET_REFCOUNT(p, rc) do { \
3441
GC_REFCOUNT((p)) = (rc); \

0 commit comments

Comments
 (0)