From 73069100fd26935ae3dca6c090c53a76b0aa9939 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sun, 14 May 2006 00:45:27 +0000 Subject: [PATCH] - Change to use dedicated stream ops --- ext/standard/tests/file/stream_rfc2397_001.phpt | 2 +- ext/standard/tests/file/stream_rfc2397_002.phpt | 12 ++++++------ main/streams/memory.c | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ext/standard/tests/file/stream_rfc2397_001.phpt b/ext/standard/tests/file/stream_rfc2397_001.phpt index 23a5730923..774bb089bc 100755 --- a/ext/standard/tests/file/stream_rfc2397_001.phpt +++ b/ext/standard/tests/file/stream_rfc2397_001.phpt @@ -1,5 +1,5 @@ --TEST-- -Stream: RFC2397 +Stream: RFC2397 getting the data --FILE-- string(7) "RFC2397" ["stream_type"]=> - string(4) "TEMP" + string(7) "RFC2397" ["mode"]=> string(1) "r" ["unread_bytes"]=> @@ -58,7 +58,7 @@ array(8) { ["wrapper_type"]=> string(7) "RFC2397" ["stream_type"]=> - string(4) "TEMP" + string(7) "RFC2397" ["mode"]=> string(1) "r" ["unread_bytes"]=> @@ -89,7 +89,7 @@ array(9) { ["wrapper_type"]=> string(7) "RFC2397" ["stream_type"]=> - string(4) "TEMP" + string(7) "RFC2397" ["mode"]=> string(1) "r" ["unread_bytes"]=> @@ -114,7 +114,7 @@ array(10) { ["wrapper_type"]=> string(7) "RFC2397" ["stream_type"]=> - string(4) "TEMP" + string(7) "RFC2397" ["mode"]=> string(1) "r" ["unread_bytes"]=> @@ -141,7 +141,7 @@ array(10) { ["wrapper_type"]=> string(7) "RFC2397" ["stream_type"]=> - string(4) "TEMP" + string(7) "RFC2397" ["mode"]=> string(1) "r" ["unread_bytes"]=> @@ -168,7 +168,7 @@ array(11) { ["wrapper_type"]=> string(7) "RFC2397" ["stream_type"]=> - string(4) "TEMP" + string(7) "RFC2397" ["mode"]=> string(1) "r" ["unread_bytes"]=> diff --git a/main/streams/memory.c b/main/streams/memory.c index 426635fad3..5ba9902ebb 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -656,6 +656,7 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, cha /* store data */ php_stream_temp_write(stream, comma, dlen TSRMLS_CC); php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs TSRMLS_CC); + stream->ops = &php_stream_rfc2397_ops; ts = (php_stream_temp_data*)stream->abstract; assert(ts != NULL); ts->mode = mode && mode[0] == 'r' ? TEMP_STREAM_READONLY : 0; -- 2.50.1