mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
- Fix copy&paste problem where we allocated according to an old structure
- decleration and not the new one.
This commit is contained in:
parent
bdc88cd7b6
commit
e8fe69884f
2 changed files with 1 additions and 22 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue