cvs: php4 /main streams.c user_streams.c

From: Date: Tue, 19 Mar 2002 13:42:26 +0000
Subject: cvs: php4 /main streams.c user_streams.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10415@lists.php.net to get a copy of this message
wez Tue Mar 19 08:42:26 2002 EDT Modified files: /php4/main streams.c user_streams.c Log: Make file_get_wrapper_data return the underlying PHP object for user-space streams. Index: php4/main/streams.c diff -u php4/main/streams.c:1.33 php4/main/streams.c:1.34 --- php4/main/streams.c:1.33 Mon Mar 18 22:51:01 2002 +++ php4/main/streams.c Tue Mar 19 08:42:25 2002 @@ -120,7 +120,7 @@ } if (stream->wrapperdata) { - FREE_ZVAL(stream->wrapperdata); + zval_ptr_dtor(&stream->wrapperdata); stream->wrapperdata = NULL; } Index: php4/main/user_streams.c diff -u php4/main/user_streams.c:1.1 php4/main/user_streams.c:1.2 --- php4/main/user_streams.c:1.1 Mon Mar 18 22:51:01 2002 +++ php4/main/user_streams.c Tue Mar 19 08:42:25 2002 @@ -152,6 +152,10 @@ if (Z_TYPE_P(zopened) == IS_STRING && opened_path) { *opened_path = estrndup(Z_STRVAL_P(zopened), Z_STRLEN_P(zopened)); } + + /* set wrapper data to be a reference to our object */ + stream->wrapperdata = us->object; + zval_add_ref(&stream->wrapperdata); } else { /* destroy the object */ zval_ptr_dtor(&us->object);

« previous php.cvs (#10415) next »