- Fix copy&paste problem where we allocated according to an old structure

- decleration and not the new one.
This commit is contained in:
Andi Gutmans 2002-06-15 08:47:11 +00:00
parent bdc88cd7b6
commit e8fe69884f
2 changed files with 1 additions and 22 deletions

View file

@ -3,27 +3,6 @@
#include "zend.h"
typedef struct _zend_object_bucket {
zend_bool valid;
zend_bool destructor_called;
union _bucket {
struct {
zend_object object;
zend_uint refcount;
} obj;
struct {
int next;
} free_list;
} bucket;
} zend_object_bucket;
typedef struct _zend_objects {
zend_object_bucket *object_buckets;
zend_uint top;
zend_uint size;
int free_list_head;
} zend_objects;
zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type);
zend_object *zend_objects_get_address(zval *object);
zend_object_value zend_objects_clone_obj(zval *object TSRMLS_DC);

View file

@ -8,7 +8,7 @@
void zend_objects_store_init(zend_objects_store *objects, zend_uint init_size)
{
objects->object_buckets = (zend_object_store_bucket *) emalloc(init_size * sizeof(zend_object_bucket));
objects->object_buckets = (zend_object_store_bucket *) emalloc(init_size * sizeof(zend_object_store_bucket));
objects->top = 1; /* Skip 0 so that handles are true */
objects->size = init_size;
objects->free_list_head = -1;