summaryrefslogtreecommitdiff
path: root/ext/rpc/rpc.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/rpc/rpc.h')
-rw-r--r--ext/rpc/rpc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/rpc/rpc.h b/ext/rpc/rpc.h
index 7cbb73564f..7a90290a16 100644
--- a/ext/rpc/rpc.h
+++ b/ext/rpc/rpc.h
@@ -123,4 +123,15 @@
efree(arg_types); \
efree(hash_val.str);
+#define ALLOC_CLASS_HASH(_class_hash, _handlers) \
+ if (_class_hash = pemalloc(sizeof(rpc_class_hash), TRUE)) { \
+ /* set up the cache */ \
+ zend_ts_hash_init(&(_class_hash->methods), 0, NULL, rpc_string_dtor, TRUE); \
+ zend_ts_hash_init(&(_class_hash->properties), 0, NULL, rpc_string_dtor, TRUE); \
+ _class_hash->singleton = FALSE; \
+ _class_hash->poolable = FALSE; \
+ _class_hash->data = NULL; \
+ _class_hash->handlers = _handlers; \
+ }
+
#endif \ No newline at end of file