helly Sat Jun 14 15:30:42 2003 EDT
Modified files:
/php4/ext/standard file.c
/php4/main/streams streams.c
Log:
Fix ZTS mode (hopefully all is working fine now again)
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.348 php4/ext/standard/file.c:1.349
--- php4/ext/standard/file.c:1.348 Sat Jun 14 13:08:49 2003
+++ php4/ext/standard/file.c Sat Jun 14 15:30:42 2003
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.348 2003/06/14 17:08:49 helly Exp $ */
+/* $Id: file.c,v 1.349 2003/06/14 19:30:42 helly Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -130,8 +130,10 @@
static ZEND_RSRC_DTOR_FUNC(file_context_dtor)
{
php_stream_context *context = (php_stream_context*)rsrc->ptr;
- zval_dtor(context->options);
- context->options = NULL;
+ if (context->options) {
+ zval_ptr_dtor(&context->options);
+ context->options = NULL;
+ }
php_stream_context_free(context);
}
Index: php4/main/streams/streams.c
diff -u php4/main/streams/streams.c:1.25 php4/main/streams/streams.c:1.26
--- php4/main/streams/streams.c:1.25 Fri Jun 13 17:33:59 2003
+++ php4/main/streams/streams.c Sat Jun 14 15:30:42 2003
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.25 2003/06/13 21:33:59 pollita Exp $ */
+/* $Id: streams.c,v 1.26 2003/06/14 19:30:42 helly Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -413,7 +413,7 @@
size_t justread = 0;
int flags;
php_stream_bucket *bucket;
- php_stream_filter_status_t status;
+ php_stream_filter_status_t status = PSFS_ERR_FATAL;
php_stream_filter *filter;
/* read a chunk into a bucket */
@@ -893,7 +893,7 @@
php_stream_bucket *bucket;
php_stream_bucket_brigade brig_in = { NULL, NULL }, brig_out = { NULL, NULL };
php_stream_bucket_brigade *brig_inp = &brig_in, *brig_outp = &brig_out,
*brig_swap;
- php_stream_filter_status_t status;
+ php_stream_filter_status_t status = PSFS_ERR_FATAL;
php_stream_filter *filter;
if (buf) {
@@ -1618,7 +1618,10 @@
PHPAPI void php_stream_context_free(php_stream_context *context)
{
- zval_ptr_dtor(&context->options);
+ if (context->options) {
+ zval_ptr_dtor(&context->options);
+ context->options = NULL;
+ }
efree(context);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php