Re: cvs: php4 /ext/standard basic_functions.c
| From: | Joey Smith | Date: | Tue, 10 Jul 2001 00:41:33 +0000 |
| Subject: | Re: cvs: php4 /ext/standard basic_functions.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-6142@lists.php.net to get a copy of this message | ||
Are there many more of these out there? If you can tell me what to look
for, I'd be more than glad to take the time to try and clean them all
up.
BTW, as a side question, can't we somehow use the reference counting to
save ourselves a bit of this? I'm waiting for my book on how garbage
collection works, but it just seems to me that STR_FREE ought to be able
to see that strtok_string was still in use, and just decrease the
refcount by one, or something...
Don't hesitate to correct me. ;)
On Sun, 8 Jul 2001, Sascha Schumann wrote the following to php-cvs@lists.ph...:
> sas Sun Jul 8 19:28:50 2001 EDT
>
> Modified files:
> /php4/ext/standard basic_functions.c
> Log:
> Reset strtok_string, so that strtok can be used in all session handler
> functions.
>
>
> Index: php4/ext/standard/basic_functions.c
> diff -u php4/ext/standard/basic_functions.c:1.355 php4/ext/standard/basic_functions.c:1.356
> --- php4/ext/standard/basic_functions.c:1.355 Wed Jul 4 06:10:29 2001
> +++ php4/ext/standard/basic_functions.c Sun Jul 8 19:28:48 2001
> @@ -17,7 +17,7 @@
> +----------------------------------------------------------------------+
> */
>
> -/* $Id: basic_functions.c,v 1.355 2001/07/04 10:10:29 wez Exp $ */
> +/* $Id: basic_functions.c,v 1.356 2001/07/08 23:28:48 sas Exp $ */
>
> #include "php.h"
> #include "php_main.h"
> @@ -885,6 +885,7 @@
> BLS_FETCH();
>
> STR_FREE(BG(strtok_string));
> + BG(strtok_string) = NULL;
> #ifdef HAVE_PUTENV
> zend_hash_destroy(&BG(putenv_ht));
> #endif
>
>
>
>