]> granicus.if.org Git - php/commitdiff
- Use relay to aid debugging
authorMarcus Boerger <helly@php.net>
Sun, 14 Jan 2007 19:13:34 +0000 (19:13 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 14 Jan 2007 19:13:34 +0000 (19:13 +0000)
main/streams/memory.c

index 6e493afa2b350f52a87bbf2bbcf65c6d34210c8a..fd191d687f05a30efc3a468b00670a28cc738c9e 100644 (file)
@@ -266,7 +266,7 @@ PHPAPI php_stream *_php_stream_memory_create(int mode STREAMS_DC TSRMLS_DC)
        self->mode = mode;
        self->owner_ptr = NULL;
        
-       stream = php_stream_alloc(&php_stream_memory_ops, self, 0, mode & TEMP_STREAM_READONLY ? "rb" : "w+b");
+       stream = php_stream_alloc_rel(&php_stream_memory_ops, self, 0, mode & TEMP_STREAM_READONLY ? "rb" : "w+b");
        stream->flags |= PHP_STREAM_FLAG_NO_BUFFER;
        return stream;
 }
@@ -520,7 +520,7 @@ PHPAPI php_stream *_php_stream_temp_create(int mode, size_t max_memory_usage STR
        self->smax = max_memory_usage;
        self->mode = mode;
        self->meta = NULL;
-       stream = php_stream_alloc(&php_stream_temp_ops, self, 0, mode & TEMP_STREAM_READONLY ? "rb" : "w+b");
+       stream = php_stream_alloc_rel(&php_stream_temp_ops, self, 0, mode & TEMP_STREAM_READONLY ? "rb" : "w+b");
        stream->flags |= PHP_STREAM_FLAG_NO_BUFFER;
        self->innerstream = php_stream_memory_create_rel(mode);
        ((php_stream_memory_data*)self->innerstream->abstract)->owner_ptr = &self->innerstream;