diff options
| author | Dmitry Stogov <dmitry@php.net> | 2008-01-24 10:49:26 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2008-01-24 10:49:26 +0000 |
| commit | 03c018d34eb49019964ba690595f52a2db977584 (patch) | |
| tree | 52ef8b48d88d4e1e7543a2dc817e2b90151ac913 /Zend/zend_API.c | |
| parent | 3bd291e11856cebaf48f7b203865e2bffac95200 (diff) | |
| download | php-git-03c018d34eb49019964ba690595f52a2db977584.tar.gz | |
Fixed GC bug
Diffstat (limited to 'Zend/zend_API.c')
| -rw-r--r-- | Zend/zend_API.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index ca7c16e891..fcf8f2e499 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2850,7 +2850,7 @@ ZEND_API int zend_declare_property_null(zend_class_entry *ce, char *name, int na zval *property; if (ce->type & ZEND_INTERNAL_CLASS) { - property = malloc(sizeof(zval)); + ALLOC_PERMANENT_ZVAL(property); } else { ALLOC_ZVAL(property); } @@ -2864,7 +2864,7 @@ ZEND_API int zend_declare_property_bool(zend_class_entry *ce, char *name, int na zval *property; if (ce->type & ZEND_INTERNAL_CLASS) { - property = malloc(sizeof(zval)); + ALLOC_PERMANENT_ZVAL(property); } else { ALLOC_ZVAL(property); } @@ -2879,7 +2879,7 @@ ZEND_API int zend_declare_property_long(zend_class_entry *ce, char *name, int na zval *property; if (ce->type & ZEND_INTERNAL_CLASS) { - property = malloc(sizeof(zval)); + ALLOC_PERMANENT_ZVAL(property); } else { ALLOC_ZVAL(property); } @@ -2894,7 +2894,7 @@ ZEND_API int zend_declare_property_double(zend_class_entry *ce, char *name, int zval *property; if (ce->type & ZEND_INTERNAL_CLASS) { - property = malloc(sizeof(zval)); + ALLOC_PERMANENT_ZVAL(property); } else { ALLOC_ZVAL(property); } @@ -2910,7 +2910,7 @@ ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int int len = strlen(value); if (ce->type & ZEND_INTERNAL_CLASS) { - property = malloc(sizeof(zval)); + ALLOC_PERMANENT_ZVAL(property); ZVAL_STRINGL(property, zend_strndup(value, len), len, 0); } else { ALLOC_ZVAL(property); @@ -2926,7 +2926,7 @@ ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, char *name, int zval *property; if (ce->type & ZEND_INTERNAL_CLASS) { - property = malloc(sizeof(zval)); + ALLOC_PERMANENT_ZVAL(property); ZVAL_STRINGL(property, zend_strndup(value, value_len), value_len, 0); } else { ALLOC_ZVAL(property); @@ -2948,7 +2948,7 @@ ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, char *name, zval *constant; if (ce->type & ZEND_INTERNAL_CLASS) { - constant = malloc(sizeof(zval)); + ALLOC_PERMANENT_ZVAL(constant); } else { ALLOC_ZVAL(constant); } @@ -2963,7 +2963,7 @@ ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, char *name, zval *constant; if (ce->type & ZEND_INTERNAL_CLASS) { - constant = malloc(sizeof(zval)); + ALLOC_PERMANENT_ZVAL(constant); } else { ALLOC_ZVAL(constant); } @@ -2978,7 +2978,7 @@ ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, char *name, zval *constant; if (ce->type & ZEND_INTERNAL_CLASS) { - constant = malloc(sizeof(zval)); + ALLOC_PERMANENT_ZVAL(constant); } else { ALLOC_ZVAL(constant); } @@ -2993,7 +2993,7 @@ ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, char *name zval *constant; if (ce->type & ZEND_INTERNAL_CLASS) { - constant = malloc(sizeof(zval)); + ALLOC_PERMANENT_ZVAL(constant); } else { ALLOC_ZVAL(constant); } @@ -3008,7 +3008,7 @@ ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, char *nam zval *constant; if (ce->type & ZEND_INTERNAL_CLASS) { - constant = malloc(sizeof(zval)); + ALLOC_PERMANENT_ZVAL(constant); ZVAL_STRINGL(constant, zend_strndup(value, value_length), value_length, 0); } else { ALLOC_ZVAL(constant); |
