Skip to content

Commit 38b96cf

Browse files
committed
WIP
1 parent b4d5f4e commit 38b96cf

File tree

3 files changed

+15
-21
lines changed

3 files changed

+15
-21
lines changed

configure.ac

-1
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,6 @@ PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c \
17081708
if test "$WASI" = "yes"; then
17091709
PHP_ADD_SOURCES(wasi, unistd.c,)
17101710
PHP_ADD_SOURCES(wasi/main, network.c php_open_temporary_file.c,)
1711-
PHP_ADD_SOURCES(wasi/main/streams, streams.c,)
17121711
else
17131712
PHP_ADD_SOURCES(main, php_syslog.c network.c,)
17141713
fi

main/streams/streams.c

+15
Original file line numberDiff line numberDiff line change
@@ -1814,6 +1814,21 @@ int php_init_stream_wrappers(int module_number)
18141814
#endif
18151815
) ? SUCCESS : FAILURE;
18161816
}
1817+
#else
1818+
int php_init_stream_wrappers(int module_number)
1819+
{
1820+
le_stream = zend_register_list_destructors_ex(stream_resource_regular_dtor, NULL, "stream", module_number);
1821+
le_pstream = zend_register_list_destructors_ex(NULL, stream_resource_persistent_dtor, "persistent stream", module_number);
1822+
1823+
/* Filters are cleaned up by the streams they're attached to */
1824+
le_stream_filter = zend_register_list_destructors_ex(NULL, NULL, "stream filter", module_number);
1825+
1826+
zend_hash_init(&url_stream_wrappers_hash, 8, NULL, NULL, 1);
1827+
zend_hash_init(php_get_stream_filters_hash_global(), 8, NULL, NULL, 1);
1828+
zend_hash_init(php_stream_xport_get_hash(), 8, NULL, NULL, 1);
1829+
1830+
return SUCCESS;
1831+
}
18171832
#endif // __wasi__
18181833

18191834
void php_shutdown_stream_wrappers(int module_number)

wasi/main/streams/streams.c

-20
This file was deleted.

0 commit comments

Comments
 (0)