cvs: pecl /date date.c
| From: | Pierre-Alain Joye | Date: | Thu, 08 Jan 2004 19:11:28 +0000 |
| Subject: | cvs: pecl /date date.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-696@lists.php.net to get a copy of this message | ||
pajoye Thu Jan 8 14:11:28 2004 EDT
Modified files:
/pecl/date date.c
Log:
- Remove the alloc of the property htable in date_ctor
Not used except in properties_get, set it to NULL to save us
from one of the crash in debug mode
still the SHUTDOWN issue...
Index: pecl/date/date.c
diff -u pecl/date/date.c:1.4 pecl/date/date.c:1.5
--- pecl/date/date.c:1.4 Thu Jan 8 09:17:12 2004
+++ pecl/date/date.c Thu Jan 8 14:11:28 2004
@@ -15,7 +15,7 @@
| Author: Pierre-Alain Joye <paj@pearfr.org> |
+----------------------------------------------------------------------+
- $Id: date.c,v 1.4 2004/01/08 14:17:12 iliaa Exp $
+ $Id: date.c,v 1.5 2004/01/08 19:11:28 pajoye Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -127,8 +127,10 @@
{
date_object *date = (date_object *) object;
- zend_hash_destroy(date->zo.properties);
- FREE_HASHTABLE(date->zo.properties);
+ if (date->zo.properties) {
+ zend_hash_destroy(date->zo.properties);
+ FREE_HASHTABLE(date->zo.properties);
+ }
date_free(date->ptr);
@@ -171,10 +173,14 @@
intern->zo.ce = class_type;
intern->zo.in_get = 0;
intern->zo.in_set = 0;
+ intern->zo.properties = NULL;
+/* Attempt to remove crashes */
+/*
ALLOC_HASHTABLE(intern->zo.properties);
zend_hash_init(intern->zo.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(intern->zo.properties, &class_type->default_properties,
(copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
+*/
/* retval.handle = zend_objects_store_put(intern, date_objects_dtor, date_objects_clone
TSRMLS_CC); */
retval.handle = zend_objects_store_put(intern, date_objects_dtor, NULL TSRMLS_CC);