if (!FG(stream_filters)) {
php_stream_filter_factory tmpfactory;
- FG(stream_filters) = emalloc(sizeof(HashTable));
+ ALLOC_HASHTABLE(FG(stream_filters));
zend_hash_init(FG(stream_filters), 0, NULL, NULL, 1);
zend_hash_copy(FG(stream_filters), &stream_filters_hash, NULL, &tmpfactory, sizeof(php_stream_filter_factory));
}
if (!FG(stream_wrappers)) {
php_stream_wrapper tmpwrapper;
- FG(stream_wrappers) = emalloc(sizeof(HashTable));
+ ALLOC_HASHTABLE(FG(stream_wrappers));
zend_hash_init(FG(stream_wrappers), 0, NULL, NULL, 1);
zend_hash_copy(FG(stream_wrappers), &url_stream_wrappers_hash, NULL, &tmpwrapper, sizeof(php_stream_wrapper));
}
if (!FG(stream_wrappers)) {
php_stream_wrapper tmpwrapper;
- FG(stream_wrappers) = emalloc(sizeof(HashTable));
+ ALLOC_HASHTABLE(FG(stream_wrappers));
zend_hash_init(FG(stream_wrappers), 0, NULL, NULL, 1);
zend_hash_copy(FG(stream_wrappers), &url_stream_wrappers_hash, NULL, &tmpwrapper, sizeof(php_stream_wrapper));
}