Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: experimental/n…
Fetching contributors…

Cannot retrieve contributors at this time

file 35 lines (30 sloc) 0.95 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
#ifndef ZEND_OBJECTS_H
#define ZEND_OBJECTS_H

#include "zend.h"

typedef struct _zend_object_bucket {
zend_bool valid;
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;

void zend_objects_init(zend_objects *objects, zend_uint init_size);
void zend_objects_destroy(zend_objects *objects);
zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type);
zend_object *zend_objects_get_address(zend_object_handle handle);
void zend_objects_add_ref(zend_object_handle handle);
void zend_objects_del_ref(zend_object_handle handle);
void zend_objects_delete_obj(zend_object_handle handle);
zend_object_value zend_objects_clone_obj(zend_object_handle handle);

#endif /* ZEND_OBJECTS_H */
Something went wrong with that request. Please try again.