Skip to content

Commit d4cb8f5

Browse files
committed
Revert "don't free interned strings on PHP >= 7.3"
This reverts commit aa041b4.
1 parent e8fd958 commit d4cb8f5

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

v8js_class.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -988,14 +988,12 @@ static void v8js_persistent_zval_ctor(zval *p) /* {{{ */
988988
}
989989
/* }}} */
990990

991-
#if PHP_VERSION_ID < 70300
992991
static void v8js_persistent_zval_dtor(zval *p) /* {{{ */
993992
{
994993
assert(Z_TYPE_P(p) == IS_STRING);
995994
free(Z_STR_P(p));
996995
}
997996
/* }}} */
998-
#endif
999997

1000998
static void v8js_script_free(v8js_script *res)
1001999
{
@@ -1059,11 +1057,7 @@ static int v8js_register_extension(zend_string *name, zend_string *source, zval
10591057

10601058
if (jsext->deps) {
10611059
jsext->deps_ht = (HashTable *) malloc(sizeof(HashTable));
1062-
#if PHP_VERSION_ID < 70300
10631060
zend_hash_init(jsext->deps_ht, jsext->deps_count, NULL, v8js_persistent_zval_dtor, 1);
1064-
#else
1065-
zend_hash_init(jsext->deps_ht, jsext->deps_count, NULL, NULL, 1);
1066-
#endif
10671061
zend_hash_copy(jsext->deps_ht, Z_ARRVAL_P(deps_arr), v8js_persistent_zval_ctor);
10681062
}
10691063

0 commit comments

Comments
 (0)