summaryrefslogtreecommitdiff
path: root/Zend/zend_objects.h
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2001-08-07 03:17:33 +0000
committerAndi Gutmans <andi@php.net>2001-08-07 03:17:33 +0000
commit5af7770a816fd74331afdee06e61acea184ac87d (patch)
tree33f971900976da98abd9585e593f0edde3f8671b /Zend/zend_objects.h
parent6737ea6fd45c12fcd1282f325202d652878afd26 (diff)
downloadphp-git-5af7770a816fd74331afdee06e61acea184ac87d.tar.gz
- Sync Engine2 CVS with latest Engine CVS
Diffstat (limited to 'Zend/zend_objects.h')
-rw-r--r--Zend/zend_objects.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/Zend/zend_objects.h b/Zend/zend_objects.h
new file mode 100644
index 0000000000..30660a6666
--- /dev/null
+++ b/Zend/zend_objects.h
@@ -0,0 +1,34 @@
+#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_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);
+
+#endif /* ZEND_OBJECTS_H */ \ No newline at end of file